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

Re: -rpath with libtool and Debian Linux

On 27 Jan 1999, Alexandre Oliva wrote:

> > Having libtool default to -rpath is what's causing problems.
> This is IMHO completely backwards :-)

You know, I seem to remember that there is another rather unpleasent
side-effect of rpath - it basically completely disables library searching
and thus disables LD_LIBRARY_PATH, once you have used rpath it is not easy
for a user replace that library (for whatever reason) and I find that
highly annoying. 

> > I've seen one too many instances of "<foo> crashes on Debian" that turned
> > out to be "<foo> is a libc5 binary with an RPATH of /usr/X11R6/lib" which on
> > any reasonably up to date Debian system contains libc6 X libraries.
> See?  You replaced one library with an incompatible one without
> modifying its version number to mark it as incompatible.  Isn't this
> breaking the contract?  How could you expect it to work?

Not exactly, the x libraries are fully compatible and were built with the
same source - the trouble is that one is linked with libc5 and the other
with libc6. In normal cases the dymanic linker would figure this out one
way or another with rpath this functionality is disabled as it overrides
the library versioning scheme.

The linux dynamic linker will resolve things in some magical way based on
the library dependencies and the program dependencies to locate the proper
library in many cases - rpath does cripples, not enhances, this function.

On another note, you have suggested that we use /usr/lib/libc6 and other
things to isolate libraries that have been recompiled with updated
dependencies - the trouble with this is that all the distributions and all
the distributers would have to agree on a scheme for this - otherwise a
'debian' binary would not function on a RH system because they used a
different scheme and their rpaths would be incompatibly different.

Furthermore this idea of a /usr/lib/libc6 becomes entirely unmanageable
when we start having soname changes for things like libgtk - we will have
the -same- problem with all the millions of libs that link with libgtk as
we did with libc6! The linux dynamic linker has the ability to resolve
these issues on it's own by carefully relocating the old
libraries, rpath simply does not.

We must be able to turn it off for libraries used on our system!


Reply to: