libtool
[Top][All Lists]
Advanced

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

Re: Relocatable .la files?


From: Benoit Sigoure
Subject: Re: Relocatable .la files?
Date: Mon, 18 Dec 2006 19:32:13 +0100
User-agent: Internet Messaging Program (IMP) H3 (4.0.2)

Quoting Ralf Wildenhues <address@hidden>:

Hello Benoit,

* Benoit Sigoure wrote on Mon, Dec 18, 2006 at 02:35:43PM CET:

what's the right why of distributing binary packages that are relocatable?

With shared libraries: in general, that is not possible portably.
Run paths encoded in libraries and programs are usually absolute,
and some systems lack the features needed for a relocation to
work well.

And so the Libtool library abstraction that was conceived many years
ago did not provide for relocatability even on systems that may allow
it otherwise.  You can use DESTDIR at 'make install' time, and then
move the package to the configured $prefix, but no general relocation.
It may work in some special cases, but e.g., certainly not with library
interdependencies.

(I'm not stating my opinion on this here, merely some data.)

Alright I knew that, in that case, let's assume I only use static libraries on
Linux if that helps. What is The Recommended Way of distributing relocatable
binaries (actually relocatable libraries in this case) ?

Can we setup an install script that would take the new prefix and relocate the
libraries / relink them using libtool (assuming that the user has required
tools/compilers/libraries)?


$ ../configure -C --prefix=`pwd`/_inst && make all install
[...configuring liburbi-cpp...]
=== configuring in jpeg-6b (/Users/tsuna/svn/liburbi-cpp/_build/jpeg-6b)
configure: running /bin/sh ../../jpeg-6b/configure
--prefix=/Users/tsuna/svn/liburbi-cpp/_build/_inst
--cache-file=../config.cache --srcdir=../../jpeg-6b
[...configuring jpeg-6b...]
[...compiling jpeg-6b...]
[...compiling liburbi-cpp...]
[...installing...]
$ cat _inst/lib/liburbi.la
# Generated by ltmain.sh - GNU libtool 1.5.22 (1.1220.2.365 2005/12/18 22:14:06)
[...]
# Libraries that this one depends upon.
dependency_libs=' /usr/local/lib/libjpeg.la'

This, however, looks like a bug somewhere, iff libjpeg was built during
the build.

You made an important point "iff libjpeg was built". No, it wasn't. Actually I
ran svn up, ran configure again to set the prefix and ran make. Several things
were recompiled, but not libjpeg. That's a bit unexpected but I can guess why
this might not be seen as a bug in itself.

[SNIP]
Thanks,
Ralf


Thanks for your commitment to the autotools and especially to its mailing lists
:)

--
SIGOURE Benoit aka Tsuna
  _____
 /EPITA\ Promo 2008, LRDE





reply via email to

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