Hi,
I am not very deep in compilations etc., so for me - this is a strange problem between versions 5.30.01 and 5.32.00. I use a code with dlopen, dlclose etc… in 5.30.01 and it works fine. I just wanted to move to the 5.32 version, but root has problems to find libraries during compilation and run.
This is how I install:
echo $ROOTSYS
gives my $HOME/root
echo $LD_LIBRARY_PATH
:$HOME/root/lib/root
./configure linux --prefix=$HOME/root --etcdir=$HOME/root/etc --enable-opengl --enable-mysql --enable-minuit2 --enable-xml --enable-python --enable-roofit --enable-fftw3 --enable-gsl-shared --enable-mathmore
time make && time make install
When I compile my code in 5.30.01, I do this for the plugin (library)
g++ -fPIC -c plug_analyze.cpp `root-config --libs --cflags --glibs` -lXMLIO
gcc -shared -o plug_analyze.so plug_analyze.o
I compile in the root CINT with .L mut_queue.C++g, which works fine in 5.30.01 and I can run the program from CINT
… but it gives in 5.32.01 these undefined references…
.....
/home/ojr/Install/58_kibbler/mut_queue_C_ACLiC_dict.o: In function `mut_queue_masterthread(void*)':
/home/ojr/Install/58_kibbler/./mut_queue.C:148: undefined reference to `dlopen'
....
/home/ojr/Install/58_kibbler/./mut_queue.C:506: undefined reference to `dlclose'
collect2: ld returned 1 exit status
Error in <ACLiC>: Compilation failed!
1/ I have found, that I can compile (.L mut_queue.C++g) if I do
gSystem->Load("/usr/lib/libdl.so");
before. BUT, when I run the compiled code from CINT, it crashes at the moment it runs an external function from *.so It says something like - unknown symbol … xxxTH1Fxxx of xxxTSocketxxx…
I have changed the compilation of .so this way
g++ -shared `root-config --libs --cflags --glibs` -lXMLIO -o plug_queue.so plug_queue.o
g++ -fPIC -c plug_queue.cpp `root-config --libs --cflags --glibs` -lXMLIO
It still crashes, but at least it doesnt complain the unknown symbols TH1F or TSocket. However, I think that it makes seg.violation when it reaches the point with TH1F. Here I have no idea.
I use the same computers, same environment, I just remove one version and place another. Now I just check if 5.30.06 has the same problem (and I think that yes)
Thanks for hints. I feel quite puzzled with this.
best regards
jaromir
root-config --libs --cflags --glibs
-L/home/ojr/root/lib/root -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic -pthread -m32 -I/home/ojr/root/include/root -L/home/ojr/root/lib/root -lGui
root-config --libs --cflags --glibs
-L/home/ojr/root/lib/root -lGpad -lHist -lGraf -lGraf3d -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lRIO -lNet -lThread -lCore -lCint -pthread -lm -ldl -rdynamic -pthread -m32 -I/home/ojr/root/include/root -L/home/ojr/root/lib/root -lGui