libtool
[Top][All Lists]
Advanced

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

Re: Splitting dependency_libs in *.la?


From: Ralf Wildenhues
Subject: Re: Splitting dependency_libs in *.la?
Date: Mon, 23 Oct 2006 14:38:00 +0200
User-agent: Mutt/1.5.13 (2006-09-08)

* Rex Dieter wrote on Mon, Oct 23, 2006 at 02:20:59PM CEST:
> Ralf Wildenhues wrote:
> >
> > If you only want to solve the problem for GNU/Linux systems (more
> > precisely: for systems with GNU binutils ld and a glibc ld.so), then
> > the issue becomes much simpler.  
> 
> This is *exactly* what I'm suggesting: drop/omit the hackage on platforms
> that don't need it (and GNU binutils/glibc is one of them).

Well, for GNU binutils/glibc systems the "only" thing that is still
remaining is to rewrite the core of the deplib loop to recursively
walk all indirect deplibs, and pick up certain information from them.

You may now ask why in the world that should be necessary, when the
whole point was to *not* have to care about indirect library
dependencies.  Well, here's a scenario:  (Debian's experience with
link_all_deplibs=no has turned up more failures, this is only one of
them.)

Inside one package you have a program p, depending directly only on
library liba1.  liba1 depends on liba2.  All three live in different
directories.  Roughly:
  src/Makefile.am:
    bin_PROGRAMS = p
    p_LDADD = ../a1/liba1.la

  a1/Makefile.am:
    lib_LTLIBRARIES = liba1.la
    liba1_la_LIBADD = ../a2/liba2.la

  a2/Makefile.am:
    lib_LTLIBRARIES = liba2.la


If you do this with the libtool from Debian currently, and you try to
execute the uninstalled program p, then it will
- either not start at all because liba2 is not found, or
- erroneously link against an older, installed version of liba2.

This is inacceptable.  (I don't remember off-head if it required 2 or 3
libs to expose this.)

Now, if somebody went through all open Debian bugs that pertain to this,
and the handful of such reports that have gone to the libtool lists at
gnu.org, and wrote test cases (against CVS HEAD Libtool) exposing the
particular failure, then that would be quite some help.

Cheers,
Ralf




reply via email to

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