libtoollibffi

How to force libtool to install 64-bit libraries for libffi in /lib instead of /lib64


I'm trying to compile libffi 64-bit in a SLES-11 docker container.

The configure & make lines are dead simple:

./configure --prefix=/opt/<prog>/ --libdir=/opt/<prog>/lib
make 
make install

Now libtool in its glory decides to install the .so's like this:

/opt/<prog>/lib/../lib64/libffi.so

Whats the magic trick to get rid of the ../lib64 part?


Solution

  • Found the issue.

    Libtool isn't the problem.

    The magic in libffi's configure is. It tries to be smart and invokes 'gcc --print-multi-os-directory' and stuffs that into toolexeclibdir.

    Seems that madness is commonly patched out of the configure script, for example with something like this: https://github.com/chef/omnibus-software/blob/master/config/patches/libffi/libffi-3.2.1-disable-multi-os-directory.patch