Cannot compile function more than once in same ROOT session

Hello,

[ root version: 5.32, 5.30 (but not 5.26 and 5.18)
Linux version: OpenSuse 11.4 64 bit
A variety of workstations with Intel Xeon, Intel Core2, Intel i7
A variety of laptops (e.g. Sony Vaio laptop with intel core i5)
No example function sent , because -any- function that compiles exhibits the behaviour below. ]

For the last few months we have been living with the problem below after upgrading to version 5.30 (from 5.18 and 5.26). More recently I tested version 5.32 and got the same result. We’ve been searching the web hoping for the problem (and its solution) to appear but have found no evidence that anyone else is experiencing it. So, likely there is something particularly unusual with our installation or setup. Hopefully this can be dispatched quickly.

It used to be that we could compile -any- function, say func.C, using .L func.C++ as many times as we liked within a single ROOT session (e.g. while developing the software). Now, however, we find this no longer works and we get an error message that the function “is not defined in the current scope”:

[saull@thouse]~>root -l -n (same result without -n flag)
root [0] .L func.C++
Info in TUnixSystem::ACLiC: creating shared library /home/saull/./func_C.so
root [1] func()
1
root [2] .L func.C++ (whether modified or not)
Info in : unmodified script has already been compiled and loaded
Info in : it will be regenerated and reloaded!
Info in TUnixSystem::ACLiC: creating shared library /home/saull/./func_C.so
root [3] func()
Error: Function func() is not defined in current scope (tmpfile):1:
*** Interpreter error recovered ***

Indeed, the .functions and .files commands each confirm that the function is there before the second compile, then gone after. We each use our own versions of .rootlogon.C and .rootrc so do not expect an explanation there. Both location-dependent and location-independent installations give the same result.

Has the ability to compile more than once in a ROOT session been removed?

One other thing to mention is that the appearance of the problem also coincides with our upgrade from OpenSuse 10.3 to 11.4. We will explore that further if there is no quick answer from the ROOT experts.

Any suggestions you have would be appreciated. Thanks.

Cheers,
Pat

Dr. Patrick Saull
National Research Council email: patrick.saull@nrc-cnrc.gc.ca
Ionizing Radiation Standards phone: (613) 993-2715 ext 240 or 243
1200 Montreal Road, M-35 fax: (613) 952-9865
Ottawa, ON
K1A OR6 Canada

[quote]Has the ability to compile more than once in a ROOT session been removed?[/quote]No, it has not been removed …

[quote]For the last few months we have been living with the problem below after upgrading to version 5.30 (from 5.18 and 5.26). More recently I tested version 5.32 and got the same result. We’ve been searching the web hoping for the problem (and its solution) to appear but have found no evidence that anyone else is experiencing it. So, likely there is something particularly unusual with our installation or setup. Hopefully this can be dispatched quickly. [/quote]Indeed, I can not reproduce the problem :frowning:.

Can you try the following test: root [0] .L func.C++ root [1] func root [2] .U func_C.so root [3] func // it should complain about func not being defined root [4] .L func_C.so root [5] func

Thanks,
Philippe.

Thanks for your reply. We still have the problem.

Below is the result of your suggested commands. Hope you can spot something. Thanks again. -Pat

[saull@lurup]~>root -l -n
root [0] .L func.C++
Info in <TUnixSystem::ACLiC>: creating shared library /home/saull/./func_C.so
root [1] func
(const void (*)())0x7fde8cdac150
root [2] .U func_C.so
root [3] func
Error: Symbol func is not defined in current scope  (tmpfile):1:
*** Interpreter error recovered ***
root [4] .L func_C.so 
root [5] func
Error: Symbol func is not defined in current scope  (tmpfile):1:
*** Interpreter error recovered ***

Hi Pat,

Unfortunately the problem is real and exist in the OpenSuse’s dynamic loader implementation.
They have been aware of the problem for a year, see bugzilla.novell.com/show_bug.cgi?id=680125
but consider the problem to be minor. Until this problem is fixed by OpenSuse, reloading library will not work.

Cheers,
Philippe.

Wow. Thanks for looking into this, Philippe. And thanks to Fons for submitting a query to Bugzilla re the status. I’ll try to pursue this with Suse as well. It’s surprising that no one else in the Suse/ROOT community has complained about this to date.
Cheers,
Pat