[Top][All Lists]

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

Re: DESTDIR installs

From: Guido Draheim
Subject: Re: DESTDIR installs
Date: Mon, 25 Nov 2002 20:24:11 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826

address@hidden wrote:
==> "pw" == Philip Willoughby <address@hidden> writes:

    pw> I have the following in a
    pw> libapttlog_la_SOURCES=aptt/log/log.c address@hidden@
    pw> -I$(top_srcdir)/src -I$(top_builddir)/src
    pw> address@hidden@

    pw> libaptttest_la_SOURCES=aptt/test/test.c
    pw> @LTLIBINTL@

    pw> If I run:

    pw> ./configure [Configure args] make make install

    pw> everything installs OK, however, if I run:

    pw> ./configure [Configure args] make make
    pw> DESTDIR=/var/tmp/aptt-0.0.1-1-root/ install

    pw> which I need to work to build an rpm cleanly, I get:

I've always felt that this is a deficiency in the way libtool does
its installs.  Then again, I use a very old version of libtool,
and this may have been fixed by now...

The problem is, the target install directory in
(${pkglibdir}, I suppose) is used to link, but at
install time, libtool looks in


only, and not in


also, like it should.

I see two solutions here.  One is to fix libtool so that it
adds -L$DESTDIR${dir} for each -L${dir} found in a dependent
LTLIBRARY.  I'm a little wary of patching libtool, so I usually
use a shell script that pretends to be 'gcc', but adds the
desired $DESTDIR link path support.

The other solution, that I use in RPM spec files, is to seed
the environment from within the spec file:


  # add other directories as appropriate

  make DESTDIR=$RPM_BUILD_ROOT install


I had the same problem - libtool does not like destdir-install
with two libraries being interdependent. I had a look through
the sources how to pass it down to libtool - but the automake
generated install-line for the .la will now pass an extra
argument. Without help from automake, I assume it would be
too hard to do.

Anyway, here's my solution - about the same trick but not
touching a global variable that might have defects on
subportions of the compilation:

--- snip ---
# fixing relink problems during install
LDFLAGS="-L%buildroot%_libdir" \
sh configure --prefix=%{_prefix} --enable-shared


make install DESTDIR=%buildroot
--- snip ----

There goes another question, however: the libtool-install
for the .la will know the target directory. In most cases,
the two interdependent libraries get installed in the same
target place (atleast for my problem it was/is the case).
May be auto-add an -L for the target directory implicitly?

reply via email to

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