64-bit versus 32-bit libraries

Hello,

We are trying to compile MVAPICH2 version 2.0a. We are having library mis-match problems during make, regardless of the installed PGI versions we have on our system. Configure works fine; we did not not run into mis-match problems for any of our GNU or Intel builds.

The PGI compilers seem to look for /usr/lib/libcr.so, which results in the error “could not read symbols: File in wrong format”. This is despite the existence of /usr/lib64/libcr.so
[xxx@yyy]$ ls -la /usr/lib64/libcr.so
lrwxrwxrwx 1 root root 14 Aug 7 15:10 /usr/lib64/libcr.so -> libcr.so.0.5.5

The versions of PGI we have on our system include:
pgcc 11.10-0 64-bit target on x86-64 Linux -tp core2
pgcc 12.3-0 64-bit target on x86-64 Linux -tp core2
pgcc 12.4-0 64-bit target on x86-64 Linux -tp core2
pgcc 13.4-0 64-bit target on x86-64 Linux -tp core2

Any suggestions would be most welcome. Thanks

~ Ben Ong

Hi Ben,

This message is coming from the linker and typically means that file is the wrong ELF file format (32 or 64-bits) than what you’re compiling in.

Could your libcr.so really be a 32-bit library? What is the output from “file /usr/lib64/libcr.so.0.5.5”?

What compiler flags are you using? Could your compliation be targeting 32-bits? (i.e. do you have the -m32 flag on or a 32-bit target flag “-ta=…-32”?)

  • Mat

Hi,

[xxx@yyy ~]$ file /usr/lib64/libcr.so.0.5.5
/usr/lib64/libcr.so.0.5.5: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped

I don’t see any compilation flags that target 32 bit architectures either in the environment for our PGI compilers, or within the mvapich build system. I will try explicitly specifying 64-bit architectures with the -m64 flag and see if that helps. I’ll report back shortly.

Thanks

~ Ben

explicitly specifying 64-bit architectures with the -m64 flag still returns the same error,

/usr/lib/libcr.so: could not read symbols: File in wrong format

Are there any “-L/usr/lib” flags? This would cause the linker to look in the wrong directory.

What happens if you add “-L/usr/lib64”?

  • Mat