[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: Russ Allbery
Subject: Re: [PATCH] Don't install .la files when --no-la-files is used
Date: Fri, 07 Nov 2008 17:54:06 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

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

>> Debian's experience to date is that --as-needed is buggy and breaks a
>> lot of software, and overall is not a particularly stable solution.
>> Removing *.la files so that the unneeded shared libraries aren't linked
>> in the first place works considerably better at the moment.

> Could you point by example how libtool add "pile of unnecessary
> dependencies" ?  Whit this example could you confirm that libtool add
> more(extra) libraries then specified by project authors ?

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.

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

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.

Now, suppose you're a distribution like Debian and you're upgrading the
whole distribution to a new version of ncurses with an incompatible ABI.
You have to rebuild every software package in the archive that's linked
with libncurses.  You therefore always have to rebuild readline.  However,
you *shouldn't* have to rebuild libfoo, since it doesn't call ncurses
directly; it should be able to just pick up the new libreadline and be
happy.  But because of libtool's behavior, libfoo ends up depending
(uselessly) on libncurses and has to be rebuilt as well.

In a distribution as large as Debian, this has a significant impact.  It
causes a ton more work and makes library migrations much harder than they
need to be.

This situation is particularly bad for libraries that have a lot of
dependencies, such as Gtk+.

Russ Allbery (address@hidden)             <>

reply via email to

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