libtool
[Top][All Lists]
Advanced

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

Re: deploying libraries and executables from a staging area


From: Noel Yap
Subject: Re: deploying libraries and executables from a staging area
Date: Wed, 20 Sep 2006 09:01:01 -0700

This makes things /much/ clearer.

Thanks,
Noel

On 9/19/06, Ralf Wildenhues <address@hidden> wrote:
Hello Noel, Albert,

* Albert Chin wrote on Wed, Sep 20, 2006 at 05:36:45AM CEST:
> On Tue, Sep 19, 2006 at 05:18:08PM -0700, Noel Yap wrote:
> > On 9/19/06, Albert Chin <address@hidden> wrote:
> > >On Tue, Sep 19, 2006 at 03:32:58PM -0700, Noel Yap wrote:
> > >>
> > >>            ./libtool --mode=install install ${la} ${destination}/lib/${l}
> > >>            ./libtool --mode=finish ${destination}/lib/${l}
> > >>
> > >>            ./libtool --mode=install install ${exe} 
${destination}/bin/${x}
> > >>            ./libtool --mode=finish ${destination}/bin/${x}

There are several bugs in the above commands, and there are also
undocumented limitations in libtool about DESTDIR installations
(some of which I've been working on a bit lately).

First, the target you specify should be a file name (the same as the
source), i.e., ${l} should be the basename of ${la}, and ${x} should be
the basename of ${exe}.  (You may have this, but it's not clear.)

Then, --mode=finish operates on library directories only, so it doesn't
need to be done for ${x} at all, and for the library directory, you
should not specify the library name.  But here's another catch: finish
mode can only be done once the libraries appear at their final location
(i.e., when they appear below $libdir, not $DESTDIR$libdir).

The next limitation is the one Albert mentioned: it only works if
the destination (let's call it $DESTDIR) is a prefix to the configured
library directory ($libdir); and since $libdir must be an absolute path
anyway, it's common and good style to not separate the two by a slash:

  ./libtool --mode=install install ${la} ${DESTDIR}${libdir}/${l}
  ./libtool --mode=install install ${exe} ${DESTDIR}${bindir}/${x}

  [ move things to the right location... ]

  ./libtool --mode=finish ${libdir}


But wait, there's more: currently, things only work out well if the
programs and libraries you install do _not_ depend upon any previously
installed libraries that currently live below ${DESTDIR}.  In some
special cases this may work or may be made to work, but in general it
will cause interesting failures.

I'm currently working on lifting the last restriction; this may not be
possible portably (e.g., some settings definitely require the GNU
binutils linker for its -rpath-link support), but at least it should be
possible to get more cases working than we have now.  And we should
document exactly when it will work and when it won't.  More details
about this on the libtool-patches list as soon as I have them worked
out (but don't hold your breath).

The CVS Libtool file tests/destdir.at more or less demonstrates what is
working at the moment.

Cheers,
Ralf





reply via email to

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