libtool-patches
[Top][All Lists]
Advanced

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

Re: Fix for prefixed installs requiring relink


From: Alexandre Oliva
Subject: Re: Fix for prefixed installs requiring relink
Date: 22 Oct 2000 17:53:36 -0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

On Oct 22, 2000, "Wesley W. Terpstra" <address@hidden> wrote:

> The relink of libbar.la uses -L/usr/lib and -lfoo. Assuming that you
> are compiling the package in your home directory and there is no
> /usr/lib/libfoo.*, the relink will fail.

And, if there is, you'll get your library linked with the wrong
version of libfoo, which may also be troublesome.

> Further, libtool does not return an error value, thus an automatic
> build can continue far beyond this problem.

This is very, very bad.  Thanks for catching this one.

> This is unacceptable b/c when building packages for a distribution (rpm,
> deb, ..) one needs to install to a location other than the root directory,
> yet have these libraries linked as though they were installed into the root
> directory.

The problem is that, on many operating systems, there's no such thing
as -rpath or -R, that can be used by libtool to encode the a library
search path.  On such systems, that search path is given in
environment variables (no problem here), -L switches or library
pathnames.  In the latter two cases, libtool must either refuse to
install a library with a different installation prefix, because
there's no way to do it right, or emit a warning and proceed doing
possibly the wrong thing.

> My included patch solves this problem with one stipulation: You can
> install dependent libraries anywhere as long as the complete libdir
> path is on the end. Hence the above example would work, while
> `pwd`/tmp/lib/libfoo.la would not as there is no usr/lib on the end.

Thanks for your patch.  Unfortunately, I don't expect to have time to
look into it in the near future; maybe some other maintainer does.
This is a problem that has bothered me in libtool for a long time, but
I still hadn't had a chance to tackle it.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  address@hidden, redhat.com}
CS PhD student at IC-Unicamp        address@hidden, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



reply via email to

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