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

Re: -rpath with libtool and Debian Linux



   Date: Tue, 2 Feb 1999 16:27:36 -0600
   From: John Goerzen <jgoerzen@complete.org>

   On Wed, Jan 27, 1999 at 05:53:12PM -0200, Alexandre Oliva wrote:

   > > I'm sorry, but this is IMHO completely backwards. On Linux systems, there is
   > > nothing wrong with moving libraries around as the need arises.
   > 
   > Except that you risk replacing a library with an incompatible one.
   > That's what has caused you so much trouble.  If, instead of moving the 
   > X11 libraries to another dir and creating new, incompatible versions
   > under the same pathname, you had created new versions in other
   > directories, no unexpected crashes would have occurred.

   OK, let's assume for a moment that we cripple Debian by ignoring the FHS in
   this instance.  Not all Linux distributions will make this choice.  So
   somebody on some other distribution compiles things with the pathname
   hard-coded in.  On his system, it is /usr/X11R6/lib for libraries.  But his
   program will not work on Debian, because we would have listened to you and
   moved our current libraries to a nonstandard location.

But if that person happened to be building on a libc5 system with the
hardcoded path, then Debian already broke his program.  I agree that
moving libraries around is not a good idea--I think it's better to
change the soname as necessary.  If Debian (and other distributions)
had not moved any libraries, nobody would ever have noticed this
problem.

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

   You're missing the point (I think; to which versioning mechanism are you
   referring?).  It's the same version of the library, designed to be linked
   with different versions of other libraries.

   We can have libncurses3.4 designed to be linked with libc5 or one for libc6.

Those are different versions of the library.  They have different
requirements.  From the perspective of the dynamic linker, they can
not be considered to be the same version.

   > Because you break a contract every time you remove a library from the
   > place in which it used to live.

   The 'contract' never should have cared about its location in the first
   place.  The OS, through mechanisms like /etc/ld.so.conf, HAS THE RIGHT to
   move it.  By assuming that it does not, YOU are breaking that contract.

I disagree.  If the OS is gong to move the library, it is responsible
for making sure that old programs linked using -rpath continue to
work, one way or another.  You are effectively saying that -rpath is
prohibited, which I do not think is reasonable.

Ian


Reply to: