[Top][All Lists]

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

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

From: Bob Friesenhahn
Subject: Re: dlopen, DESTDIR, library dependencies and "cannot install" error
Date: Mon, 9 Jan 2012 11:11:53 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Mon, 9 Jan 2012, Diab Jerius wrote:

Where is such use of AM_MAKEFLAGS documented?

It may not have been obvious in my original email, but I'm using
automake.  AM_MAKEFLAGS is provided by automake.  From the automake

       When Automake invokes `make' in a subdirectory, it uses the value of
       the `MAKE' variable.  It passes the value of the variable
       `AM_MAKEFLAGS' to the `make' invocation; this can be set in
       `' if there are flags you must always pass to `make'.

In my environment this has proven to be necessary to ensure that
recursive makefiles are passed the correct information.

In any case, the key point is that DESTDIR is correctly set, regardless
of the mechanism.

DESTDIR is ultimately an environment variable. Regardless, using AM_MAKEFLAGS to pass DESTDIR causes a split-personality disorder since it would only be passed to the subordinate makes and the top Makefile invocation will not see it.

The libtool code provides some insight, but I don't understand enough
about the rationale behind the code.  libtool only refuses to install if
there is a relink command embedded in the .la file.   As far as I can
tell the relink command is in the .la file because it cannot completely
resolve the dependencies until the installation step.  Here's the

Relinking is often necessary to ensure that the shared libraries will "remember" the final install locations and correctly "remember" any dependencies as well as any run-time search paths (e.g. -rpath). The libraries in the build tree may be linked differently in order to allow them to be used in the build tree. The installed .la files record the final install locations for each installed library.

I suggest trying the 'make DESTDIR' approach instead.

Thanks for the suggestion, but as noted above, DESTDIR is correctly set.

But it wasn't really. It is pretty common for the top makefile to handle quite a lot of the installation steps. In a non-recursive build (no subordinate directories/makefile), it would ideal for make to not recurse at all and so an argument supplied via AM_MAKEFLAGS would not get used at all.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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