Question

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.

Was it helpful?

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.

OTHER TIPS

Libtool requires intimate knowledge of your compiler suite and operating system in order to be able to create shared libraries and link against them properly. When you install the libtool distribution, a system-specific libtool script is installed into your binary directory. However, when you distribute libtool with your own packages, you do not always know the compiler suite and operating system that are used to compile your package.

For this reason, libtool must be configured before it can be used. This idea should be familiar to anybody who has used a GNU configure script. configure runs a number of tests for system features, then generates the Makefiles (and possibly a config.h header file), after which you can run make and build the package.

Libtool adds its own tests to your configure script in order to generate a libtool script for the installer's host machine. For this you can play with LT_INIT macro in configure.ac.

So in short, if your package has configure file, run it before running Make

make distclean //clean up all the previous generated files
autoconf //or autoreconf to generate configure script from configure.ac and configure.in
automake //to generate new Makefile.in from Makefile.ac
./configure //to generate new Makefile and libtool
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top