[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 :-)
> When a program is linked with a shared library, a contract is
> established between them stating that the library (or any newer but
> compatible version thereof, on systems that support library
> versioning) will supply the symbols that the program resolved from it,
> and the program will be able to find the library at that point.  If
> you move the library and replace it with an incompatible one, you're
> breaking the contract and the versioning mechanism, so you can't blame
> the program for crashing, nor the tool that created the program.

The contract does not state that the library will be found in a particular
location on the filesystem hierarchy.  The contract simply states that the
library will be found.  Which library is used can be determined by the

Where is the need for rpath here?

The combination of library versions uniquely identifies, to a suitably
well configured linker, which library to find.

> > 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?

It did work.  On all binaries without -rpath.  It worked.  What do you
mean, 'How could we expect it to work?'

> >> > However, Alexandre Oliva <oliva@dcc.unicamp.br> brings up an important
> >> > point: -rpath is necessary if one is installing libraries and binaries
> >> > linked to those libraries in one's home directory,
> > That is a special case. The default should be sane for regular cases.
> You see the regular case as the one you use the most.  I see it as the 
> one I use the most.  I don't install any packages in /usr or
> /usr/local because I find it *horrible* to have a huge /usr/local/bin
> without any clear separation between packages.  It's a pity that the
> GNU/Linux distributions don't care about clearly separating packages
> from one another...


I'm sorry, but I'm flabbergasted.

To think that the person in charge of libtool actively disagrees with 

a) The whole point of packaging systems
b) The FHS

Our distribution cares greatly about separating packages from each other.
And it does it very well.  There is no need to acheive this by enforcing
such package structure on the file-system - which package a file belongs
to is a concept orthogonal to where the file lives in a sensible



|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd	       |
|  Jules aka     | jules@debian.org              |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |

Reply to: