Error while loading shared libraries: libCore.so: wrong ELF

Hi Rooters,

I got following error while running a compiled root code in 64 bit linux machine:

error while loading shared libraries: libCore.so: wrong ELF class: ELFCLASS64

Looks like it is miss-match/conflict with 32 bit library. I am running 64-bit root version 30.
Any suggestions wiil be helpful?

Thanks.

I followed the post
[url][Solved] libCore.so: cannot open shared object file: No such

After that I got this error:

/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

It looks like linux+root combined problem, it is looking in 32 bit library. It should be /lib64/ld-linux-x86-64.so.2 instead of /lib/ld-linux.so.2. Any idea to fix this?

Thanks.

Are you compiling for 32bit or 64bit architecture?

I am using pre-compiled root ftp://root.cern.ch/root/root_v5.30.00.Linux-slc5_amd64-gcc4.3.tar.gz for 64 arch.

Thanks.

Any body home?

Maybe you have 32 bit installation? Try 32bit root version.

I tried 32bit pre-compiled root on 64 bit. It says root command not found even if I give full path of the root executable.

Hi,

[quote]I tried 32bit pre-compiled root on 64 bit. It says root command not found even if I give full path of the root executable.[/quote]Did you run ‘. where_root_is/bin/thisroot.sh’ ? What does `ldd where_root_is/bin/root.exe’ returns?

Philippe.

I tried on my 64 bit machine, with 64 bit root 30.

[quote=“pcanal”]
Did you run ‘. where_root_is/bin/thisroot.sh’ ?
Philippe.[/quote]
bin/thisroot.sh gives

if: Expression Syntax.

and bin/thisroot.csh gives

ARGS: Subscript out of range.

I executed these in tcsh shell. On sh or bash shell it does not print anything.

[quote=“pcanal”]
What does `ldd where_root_is/bin/root.exe’ returns?
Philippe.[/quote]
it gives

linux-vdso.so.1 =>  (0x00007fffaa15e000)
libCore.so => /group/app/root64/root/lib/libCore.so (0x00007f0258ed1000)
libCint.so => /group/app/root64/root/lib/libCint.so (0x00007f0258536000)
libMathCore.so => /group/app/root64/root/lib/libMathCore.so (0x00007f0258114000)
libRint.so => /group/app/root64/root/lib/libRint.so (0x00007f0257ee0000)
libdl.so.2 => /lib64/libdl.so.2 (0x000000319a000000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00000031a6800000)
libm.so.6 => /lib64/libm.so.6 (0x000000319a800000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x000000319b400000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003199c00000)
libc.so.6 => /lib64/libc.so.6 (0x0000003199800000)
libz.so.1 => /lib64/libz.so.1 (0x000000319ac00000)
libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00000031a3400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003199400000)
libfreebl3.so => /lib64/libfreebl3.so (0x00000031a3000000)

Hi,

In tcsh, you need to do:source /group/app/root64/root/bin/thisroot.csh.
What doesfile /group/app/root64/root/bin/root.exe file /group/app/root64/root/lib/libCore.so root.exe -b -qprints?

Philippe.

[quote=“pcanal”]Hi,
What doesfile /group/app/root64/root/bin/root.exe file /group/app/root64/root/lib/libCore.so root.exe -b -qprints?
Philippe.[/quote]

After source /group/app/root64/root/bin/thisroot.csh:
file /group/app/root64/root/bin/root.exe gives

/group/app/root64/root/bin/root.exe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped

file /group/app/root64/root/lib/libCore.so gives

/group/app/root64/root/lib/libCore.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped

root.exe -b -q runs the root and exit.

Hi,

Then you are now all set to use ROOT properly :slight_smile:

Cheers,
Philippe.

[quote=“pcanal”]Hi,

Then you are now all set to use ROOT properly :slight_smile:

Cheers,
Philippe.[/quote]

Yes, in many cases it compiles and run fine. But some how one of students is getting this error when she try to compile (using make file) and run, although root runs fine, she can run root macro.

[quote]But some how one of students is getting this error when she try to compile (using make file) and run[/quote]I am guessing there is a problem (missing -m64) in her makefile …

Philippe.

Ok, I will check her makefile. But, shouldn’t 64bit OS take -m64 flag by default?

Thanks.

Hi,

It depends on the platform and some configuration options. Anyway, at this point, one would need to reproduce the problem and investigate the exact concrete issue (for example using the same tools (ldd, file, etc.).

Cheers,
Philippe.