libtool
[Top][All Lists]
Advanced

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

Re: dlopen, DESTDIR, library dependencies and "cannot install" error


From: Diab Jerius
Subject: Re: dlopen, DESTDIR, library dependencies and "cannot install" error
Date: Mon, 09 Jan 2012 10:31:39 -0500

On Mon, 2012-01-09 at 08:55 -0600, Peter O'Gorman wrote:
> On 01/09/2012 08:50 AM, Diab Jerius wrote:
> > On Sat, 2012-01-07 at 13:31 -0600, Bob Friesenhahn wrote:
> >> On Fri, 6 Jan 2012, Diab Jerius wrote:
> >>>
> >>> and the installation is performed via
> >>>
> >>> make AM_MAKEFLAGS="DESTDIR=/proj/axaf/simul/pkgs 
> >>> prefix=/lua_udunits2-0.1.2_01 
> >>> exec_prefix=/lua_udunits2-0.1.2_01/x86_64-linux_debian-5.0" install
> >>
> 
> Why do you need to change prefix and exec_prefix at make install time? 
> Just use DESTDIR alone and it should work.

AS DESTDIR prepends the path to the existing prefix and exec-prefix, it
creates unnecessarily deep directory hierarchies.  For example.  If I
configure like this:

./configure --prefix=/home/dj/iroot --exec-prefix=/home/dj/iroot/x86

and then install as this:

make DESTDIR=/home/dj/stage/rbtree-1.0.9 install

I get a file hierarchy which looks like this:

/home/dj/stage
/home/dj/stage/rbtree-1.0.9
/home/dj/stage/rbtree-1.0.9/home
/home/dj/stage/rbtree-1.0.9/home/dj
/home/dj/stage/rbtree-1.0.9/home/dj/
/home/dj/stage/rbtree-1.0.9/home/dj/iroot
/home/dj/stage/rbtree-1.0.9/home/dj/iroot/x86
/home/dj/stage/rbtree-1.0.9/home/dj/iroot/x86/lib
/home/dj/stage/rbtree-1.0.9/home/dj/iroot/x86/lib/pkgconfig
/home/dj/stage/rbtree-1.0.9/home/dj/iroot/include
/home/dj/stage/rbtree-1.0.9/home/dj/iroot/include/rbtree

This does not work well with the software I use (graft) to map things
onto the public directory.  I believe it might also cause problems with
GNU stow.

If instead I override prefix and exec_prefix:

make DESTDIR=/home/dj/stage prefix=/rbtree-1.0.9 exec_prefix=/rbtree-1.0.9/x86 
install

The resultant file hierarchy is shallower:

/home/dj/stage
/home/dj/stage/rbtree-1.0.9
/home/dj/stage/rbtree-1.0.9/x86
/home/dj/stage/rbtree-1.0.9/x86/lib
/home/dj/stage/rbtree-1.0.9/x86/lib/pkgconfig
/home/dj/stage/rbtree-1.0.9/include
/home/dj/stage/rbtree-1.0.9/include/rbtree

and works well with the graft program.

In the context of my original question vis-a-vis libtool, I've been
using this approach for many years with a large number of distributions
which use libtool and have never had libtool refuse to install a library
into the staging area.




reply via email to

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