Re: libtool and it's use of -rpath
>>>>> On Tue, 28 Oct 1997 22:34:44 +0100, Yann Dirson <dwitch@monge.univ-mlv.fr> said:
Yann> Christian Schwarz writes:
>> On Thu, 23 Oct 1997, David Engel wrote:
>>
>> [snip]
>> > I suggest we modify libtool for Debian to not use -rpath.
>> > Comments?
>>
>> Yes, I think this would be good.
>>
>> I don't know the `-rpath' option of ld much, so please correct me
>> if I'm wrong. Is it true that we don't need this option at all? If
>> so, we should probably make it policy that _no_ package uses this
>> option.
Yann> I don't know if it has any advantages, but using -rpath breaks
Yann> libtool's own system of wrapper scripts allowing to run
Yann> binaries linked against uninstalled libs. I had problems with
Yann> that and plan to send a bug report for this.
There are occasional good uses for -rpath. Once fer-instance: Multiple
package sets use the same, but different and incompatible versions of
a library. Package set one can put it's library in
/usr/lib/package_set_1 and compile all the binaries with `-rpath
/usr/lib/package_set_1'. Package set does the sane using
/usr/lib/package_set_2. Now we can have two conflicting versions of a
library installed at once. In most cases this situation doesn't arise
because conflicting version of the same library have different .so
names, but fer-instance gtk is in the above state. No upstream .so
names, and a need for two conflicting versions to be installed.
So outlawing the use of rpath goes just a little bit far. Dissuading
it's use would probably be a good thing, but IMO it isn't worth the
electrons to store it in the policy manual. It isn't used very often,
and I'm pretty sure that when it is used the person(s) using it know
what they are doing. (Though X11 used it in imake files for a while.
This was changed wasn't it?)
Jim (talkative today)
PS: If the above description makes sense to me it sounds like rpath
lib directories are looked at before LD_LIBRARY_PATH. If this is true
it sounds like a bug in the dynamic linker to me and not libtools. I
don't know that this is the case because I haven't looked at libtool
and how it sets up wrapper scripts.
--
@James LewisMoss <dres@dimensional.com> | Blessed Be!
@ http://www.dimensional.com/~dres | Linux is cool!
@"Argue for your limitations and sure enough, they're yours." Bach
Reply to: