2

On my 64-bit RHEL machine, I'm compiling and running a C & Fortran program that is 32-bit only. It invokes the non-static version of a lot of standard Linux libs (X11, OpenGL/Mesa, Motif, etc...), which of course invoke other libs (libjpeg, libc, etc). Do I have to install the 32-bit versions of that entire devl lib tree in order to build this program validly? And do I have to install the 32-bit versions of that entire run-time lib tree in order to run it without it segfaulting or whatever?

  • A missing library isn't going to cause a segfault. The program will just refuse to run if a library is missing and tell you what is missing. If the programs and libraries are properly packaged the package manager should be able to install everything you need. – kasperd May 28 '17 at 17:16
  • This program is not package-managed. Also, I'm worried about: 1) name-colliding 64-bit libs, and 2) late run-time-loaded libs – Keith Russell May 28 '17 at 17:46
  • The libraries are supposed to be installed by the package manager. The 32 and 64 bit versions of the libraries will be installed in different directories. I have only tested that on Ubuntu though, never RHEL. – kasperd May 28 '17 at 17:50
  • Yes, but the 64- and 32-bit libs have the same filenames (not including dir), and I don't know any way to tell the linker or the program not to fall back on e.g. /lib64/ if it fails to find a lib in /lib/ . – Keith Russell May 28 '17 at 20:01

1 Answers1

3

Yes, you need 32-bit versions of the libraries, since the binaries are compiled as 32-bit versions, which assume 32-bit memory model on the libraries too.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58