Problem loading shared library in RedHat

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/./ 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/./

I am using the same ROOT version in both machines.

I also noticed that if I try to load “” 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?

Thank you,

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/./ is not a ROOT library. can you do

ldd /globalhome/jaliya/tmp_root_test/rootsvn/samples/./ 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” in the RedHat 4.

ldd => /usr/lib64/ (0x0000002a956fd000) => /lib64/tls/ (0x0000002a958ed000) => /lib64/ (0x0000002a95a73000) => /lib64/tls/ (0x0000002a95b81000)
        /lib64/ (0x000000552aaaa000)

Then I ran the same in my Fedora machine and this is the output.

ldd =>  (0x00110000) => /usr/lib/ (0x0018b000) => /lib/ (0x00276000) => /lib/ (0x0029f000) => /lib/ (0x00387000)
        /lib/ (0x0036a000)

What does ls -lart /globalhome/jaliya/tmp_root_test/rootsvn/samples/./ return?


I get

-rwxrwxr-x  1 jaliya jaliya 2733168 Aug 29 15:21

in RedHat v 4. machine.

I get

-rwxrwxr-x 1 jaliya jaliya 2593439 2008-08-29 15:25

in Fedora machine.


Weird :slight_smile:

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/ ../../root/lib/ ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not stripped
$ file ../samples/
../samples/ 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.


Hi Philippe,

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.

Thanks again,