[Top][All Lists]

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

Re: [PATCH] Don't install .la files when --no-la-files is used

From: Roumen Petrov
Subject: Re: [PATCH] Don't install .la files when --no-la-files is used
Date: Sat, 08 Nov 2008 22:45:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080925 SeaMonkey/1.1.12

Russ Allbery wrote:
Roumen Petrov <address@hidden> writes:
Russ Allbery wrote:

When you create a libtool library, libtool records every library
against which that library was linked into the *.la file.  If you then
link another shared library against that shared library using libtool,
libtool reads that list of libraries from the *.la file and links the
new library against them as well.

But problem is not in the libtool.

Yes.  It is.

This is not necessary.  For distribution packages, it's actually

This depend from platform.

Yes.  I said that.  But it's harmful for the platforms that are in most
common use (anything that uses ELF, for example).

To see why, consider some library libfoo which uses readline.  Suppose
that libreadline is linked and installed with libtool, so it has a *.la
file saying that it depends on libncurses.  When you link libfoo
against libreadline using libtool, libtool will also link it against
libncurses, so it now acquires a dependency on libncurses as well.

This is one of the good samples.  Libtool don't add dependency if is not
specified by project makefiles, i.e. LDFLAGS/LDADD.

But if readline project make rule specify that library has to linked
with a particular curses library, libtool has to use this rule, when
link an application with readline.

Only on non-ELF platforms.

It was old build bug when building readline library on some linux-es. In my memory is suse 7.1 but I'm sure that only this particular version was affected. Many other linux verdors build readline without dependent libraries and this allow application to be linked against different curses compatible libraries.


reply via email to

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