Russ Allbery wrote:
Roumen Petrov <[EMAIL PROTECTED]> 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
harmful.

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.

Roumen





_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool

Reply via email to