Search code examples
makefilerubygemslibtool

How to make libtool point to user installed library?


I am trying to install a rubygem which keeps on trying to read a library which is not available.

grep: /usr/lib64/libgdbm.la: No such file or directory /bin/sed: can't read /usr/lib64/libgdbm.la: No such file or directory libtool: link: /usr/lib64/libgdbm.la' is not a valid libtool archive

In order to work around this, I installed my own libgdbm and provided the path to the libgdbm in the makefile LDFLAGs but to no avail.

Any help is much appreciated.


Solution

  • This rubygem seems to do dirty stuff, since any clean library search (-L or pkg-config) would have resulted in a message like "library/package gdbm not found". And especially the grep-and-sed procedure on the la file seems really dirty. Make sure Santa knows that the author of this gem gets no presents this year.

    The gem probably has the path to the libtool archive hardcoded. First of all, try to grep for /usr/lib64/libgdbm.la in the Makefile of the gem. Change the hardcoded path, and make sure the installation script has no write permissions on any system directories, because it seems to run wild with seds.