[geeks] libtool AGAIN, grrrr

David Passmore geeks at sunhelp.org
Thu Dec 13 18:16:50 CST 2001


On Thu, Dec 13, 2001 at 07:06:22PM -0500, Dave McGuire wrote:
>   Ok.  Fucked by libtool AGAIN.  NetBSD/alpha 1.5.2, MySQL 3.23.46,
> clean default build.
> 
> $ /local/mysql/bin/mysqladmin
> Cannot open "../libmysql/.libs/libmysqlclient.so"
> $ 
> 
>   Not denying that it's a good idea, but I respectfully submit that it
> probably shouldn't be put into widespread use until it...well, WORKS.

Any program that loads a shared object has to know where to find it.

Any package I write which uses libtool explicitly copies the contents of
.libs (which is where the static and shared versions of the object live,
including the stub file <foo>.la) to a known location via make install.

The environment variable LTDL_LIBRARY_PATH controls where the binary looks
for these objects upon dlopen(). All of my packages have this variable
explicitly set in the startup scripts. 

This is very simple to do. If a package uses libtool and does not explicitly
set this variable in a startup script, hardcode it in the binary, or
recommend that you set it yourself in a README, is broken.

I wouldn't feel so strongly about this, but libtool is an amazing tool, and
it works very well. The requirements for specifying where to locate shared
objects are spelled out explicitly in the documentation. It is very simple.
Complain to the package maintainer.

David



More information about the geeks mailing list