What happend to gSystem->Load() in ROOT 6.20?

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

  1. .L spec_func.C++
  2. exit root
  3. run root again
  4. gSystem->Load(“spec_func_C.so”)
  5. 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

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?

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.

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.

Linking explicitly against libHist might work. @pcanal what’s the best way of doing that?

Linking explicitly against libHist might work. @pcanal what’s the best way of doing that?

gSystem->SetMakeSharedLib(TString(gSystem->GetMakeSharedLib()).ReplaceAll("$LinkedLibs","-lHist $LinkedLibs"));

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