LeWhoo
March 26, 2020, 9:20am
1
Dear ROOTers,
I’ve just stumbled upon a strange behaviour in ROOT 6.20. If I create a simple C function in a file, for example this:
spec_test.C (113 Bytes)
Then in ROOT shell do
.L spec_func.C++
exit root
run root again
gSystem->Load(“spec_func_C.so”)
test_fun()
On ROOT 6.20 I am getting
root [1] test_fun()
/home/lewhoo/opt/root-6.20.00/bin/root.exe: symbol lookup error: /home/lewhoo/workspace/root_problems/spec_test_C.so: undefined symbol: _ZN6TGraphC1Ev
If I do the same on ROOT 6.18 everything seems to be fine:
root [1] test_fun()
(TGraph *) 0x2d28dd0
This is not a TGraph issue, as I discovered it first with TSpectrum in a completely different function, called from python.
The same problem occurs at the current master. I am running Fedora 31.
I just tried with the master on Windows, and it works just fine:
C:\Users\bellenot\Downloads>root -l
root [0] gSystem->Load("spec_test_C.dll")
(int) 0
root [1] test_fun()
(TGraph *) 0xe21f478
root [2] .q
LeWhoo
March 26, 2020, 10:01am
3
Here it is Fedora 31, compiled with gcc 9.2.1. Windows and linux shared libraries symbols loading differ significantly as far as I know, so I would not be surprised if it worked in one case, not the other.
We test the master every day on Fedora 31 with gcc9, and I think we would have seen this kind of behaviour. @Axel , are you aware of such issue?
Axel
March 26, 2020, 11:23am
5
Thanks, I acknowledge that this is an issue. I have created https://sft.its.cern.ch/jira/browse/ROOT-10637
Thanks for your report, LeWhoo!
Axel.
LeWhoo
March 26, 2020, 11:25am
6
Thanks. In the meantime, is there some kind of workaround for ROOT 6.20? At the moment I can easily use 6.18, but I am afraid that soon some of users of my code will upgrade to 6.20 and they may have a problem.
Axel
March 26, 2020, 11:28am
7
Linking explicitly against libHist might work. @pcanal what’s the best way of doing that?
pcanal
March 27, 2020, 12:57am
8
Linking explicitly against libHist might work. @pcanal what’s the best way of doing that?
gSystem->SetMakeSharedLib(TString(gSystem->GetMakeSharedLib()).ReplaceAll("$LinkedLibs","-lHist $LinkedLibs"));
system
Closed
April 10, 2020, 12:57am
9
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
This should be fixed in the master.
1 Like