Dear ROOT devs,
I am using a shared library with ROOT. Everything works fine when I use it in a mahine running Fedora 7. However, I found that when I try to load the shared library in a RedHat ( version 4) machine it gives the following error.
dlopen error: /globalhome/jaliya/tmp_root_test/rootsvn/samples/./libnbROOT.so: cannot open shared object file: No such file or directory
Load Error: Failed to load Dynamic link library /globalhome/jaliya/tmp_root_test/rootsvn/samples/./libnbROOT.so
I am using the same ROOT version in both machines.
I also noticed that if I try to load “libQtRoot.so” in the lib directory of the root installation it does not work in the RedHat machine but it works fine in the Fedora version.
Could you please help me to figure out this problem?
Your 2 versions of Redhat are certainly incompatible, different glibcs, etc. You cannot use the same binaries/executables on the two systems.
Thank you for the reply.
I acutally build the binaries in these two systems separately. Compilation (including dictionary generation) works fine, but when I try to load the binaries on RedHat 4 it gives me the above error.
I was using ROOT 5.12.00e earlier and now I tested it with ROOT 5.21.02 and still it is the same.
The library /globalhome/jaliya/tmp_root_test/rootsvn/samples/./libnbROOT.so is not a ROOT library. can you do
to see the libs it depends on and add the one you are missing?
I am sorry, I am not sure what is missing.
These are the dependancies I get when I run “ldd libnbROOT.so” in the RedHat 4.
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000002a956fd000)
libm.so.6 => /lib64/tls/libm.so.6 (0x0000002a958ed000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000002a95a73000)
libc.so.6 => /lib64/tls/libc.so.6 (0x0000002a95b81000)
Then I ran the same in my Fedora machine and this is the output.
linux-gate.so.1 => (0x00110000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x0018b000)
libm.so.6 => /lib/libm.so.6 (0x00276000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0029f000)
libc.so.6 => /lib/libc.so.6 (0x00387000)
ls -lart /globalhome/jaliya/tmp_root_test/rootsvn/samples/./libnbROOT.so return?
-rwxrwxr-x 1 jaliya jaliya 2733168 Aug 29 15:21 libnbROOT.so
in RedHat v 4. machine.
-rwxrwxr-x 1 jaliya jaliya 2593439 2008-08-29 15:25 libnbROOT.so
in Fedora machine.
Are you in a position to give remote access to your [broken] machine to one of us?
I can indeed reproduce this problem. The most likely cause is:
$ file ../../root/lib/libCore.so ../../root/lib/libCore.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
$ file ../samples/libnbROOT.so
../samples/libnbROOT.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
I.e. your library is build in 64 bit mode while your ROOT is build in 32 bit mode … which are incompatible.
Thank you very much for helping me to figure this out.
I treid adding compiler options and build my library for 32 bit platforms. Still it gives lot of compiler errors. Seems like I have to build ROOT for this machine. I will give it a try and let you know the results.