[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ltdl.m4 requires /usr/lib*/libltdl.la

From: Nathan Phillip Brink
Subject: Re: ltdl.m4 requires /usr/lib*/libltdl.la
Date: Sat, 27 Feb 2010 22:55:24 -0500
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Jan 06, 2010 at 08:33:20PM +0100, Ralf Wildenhues wrote:
> Hello Nathan,
Hi :-)

> * Nathan Phillip Brink wrote on Tue, Jan 05, 2010 at 08:10:28AM CET:
> > Is anyone willing to confirm/acknowledge/reject this bug report?
> It is a Libtool bug (or limitation, I don't care) that indirect shared
> library dependencies are not supported well.  It is a Libtool design
> decision from long ago, and in hindsight probably a bug more often than
> a feature, that *.la files refer to other *.la files, and linking
> against the former fails when the latter are (re)moved.
On a modern GNU/Linux system which uses dynamic linking, no *.la files need to 
be installed except for those marked ``dlopenable''. This eliminates many 
problems related to what you describe. For these systems, the information 
stored in the *.la files is duplicated in the ELF headers. Now, I recognize 
that these *.la files do serve a purpose. They do make portability possible for 
machines whose library interdependency interfaces are not as easy to deal with 
or for the case of static linking. But I hope that you are willing to accept 
that, for some people and systems, libtool archive files do end up causing more 
harm than good (unless, of course, we're talking about plugins).

ltdl.m4 has a mechanism to allow one who is compiling a package to choose 
between a system-installed and bundled ltdl library. It accepts a user's path 
to the library directory and attempts to verify it by checking that a libtool 
archive file exists. Now, this file does not have to exist for a program to 
successfully link against ltdl when ltdl is a shared library on a modern unix 
system. It would be very nice if ltdl.m4, which many projects use, would 
recognize this ;-).

> It is a user error to remove *.la files; in general, these are for above
> reason, or for static linking or for libltdl usage (not only linking
> against ltdl, but things like lt_dlopen("foo.la") as well).

In my current understanding, one is only allowed to lt_dlopen() libraries 
compiled with LDFLAGS=-dlopen. And *.la files are only _needed_ for static 
linking. For the particular systems and packages where neither of these two 
features of libtool are needed, libtool doesn't have to be fed libtool archive 
files. For these situations, libtool archive files fulfill their roles when 
they allow make check to compile test programs against uninstalled libraries, 
when the libraries are installed during make install, and when there are 
interdependencies between multiple libraries in a single package.

> I
> understand why you do it, and doing it in directories searched by the
> system linker is fairly benign on GNU/Linux systems, but that doesn't
> mean it should be encouraged, nor can we guarantee that you can do it
> for all libraries.
> Hope that helps,
Me too :-)

I hope that you are willing to consider the patch I am attaching. I am quite 
sure that the shell syntax is correct and I have tested the two basic cases of 
having a system libltdl library or not having one.


Look out for missing apostrophes!

Attachment: libtool-2.2.6b-ltdl.m4-no-la.patch
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]