Debian Developers - Why -rpath is so evil [Re: -rpath and policy?]

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > June 2004 > Why -rpath is so evil [Re: -rpath and policy?]





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Why -rpath is so evil [Re: -rpath and policy?]
Goswin von Brederlow

2004-06-15, 5:55 pm

martin f krafft <madduck@debian.org> writes:

> It doesn't seem to be Debian policy not to use -rpath. I can't find
> a single reference to it in the document.
>
> Is this intentional?
>
> --
> Please do not CC me when replying to lists; I read them!
>
> .''`. martin f. krafft <madduck@debian.org>
> : :' : proud Debian developer, admin, and user
> `. `'`
> `- Debian - when you have better things to do than fixing a system
>
> Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!


FYI: I just run across another completly broken build package caused
by rpath:

kaffe on amd64 uses: -Wl,--rpath -Wl,/usr/lib/../lib64

That results in binaries with:

% ldd debian/kaffe-jthreads/usr/lib/kaffe/jthreads/jre/bin/kaffe-bin
libgmp.so.3 => /usr/lib/../lib64/libgmp.so.3 (0x0000002a9566b000)
libjpeg.so.62 => /usr/lib/../lib64/libjpeg.so.62 (0x0000002a957a1000)

and then shlibs fails:

dpkg-shlibdeps: warning: could not find any packages for /usr/lib/../lib64/libgmp.so.3 (libgmp.so.3)
dpkg-shlibdeps: warning: unable to find dependency information for shared library libgmp (soname 3, path /usr/lib/../lib64/libgmp.so.3, dependency field Depends)

and the Package does not Depend on libgmp. Installing kaffe does not
pull in libgmp and kaffe won't run.

Now I have to figure out where libtool screws up (thats what I think
it is).

MfG
Goswin

PS: rpath is evil, all avoid rpath


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
martin f krafft

2004-06-15, 5:55 pm

also sprach Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> [2004.06.15.2058 +0200]:
> PS: rpath is evil, all avoid rpath


So can we please add that to the policy?

--
Please do not CC me when replying to lists; I read them!

.''`. martin f. krafft <madduck@debian.org>
: :' : proud Debian developer, admin, and user
`. `'`
`- Debian - when you have better things to do than fixing a system

Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

Scott James Remnant

2004-06-15, 5:55 pm

On Tue, 2004-06-15 at 21:25 +0200, martin f krafft wrote:

> also sprach Goswin von Brederlow <brederlo@informatik.uni-tuebingen.de> [2004.06.15.2058 +0200]:
>
> So can we please add that to the policy?
>

RPATH is necessary where the shared libraries are outside of /usr/lib
(for example).

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?

Josselin Mouette

2004-06-16, 5:55 pm

Le mar 15/06/2004 à 23:32, Scott James Remnant a écrit :
> On Tue, 2004-06-15 at 21:25 +0200, martin f krafft wrote:
>
> RPATH is necessary where the shared libraries are outside of /usr/lib
> (for example).


In this case we can use wrappers setting LD_LIBRARY_PATH (that's what
e.g. galeon does).
--
.''`. Josselin Mouette /\./\
: :' : josselin.mouette@ens-lyon.org
`. `' joss@debian.org
`- Debian GNU/Linux -- The power of freedom

Philippe Troin

2004-06-16, 5:55 pm

Josselin Mouette <joss@debian.org> writes:

> Le mar 15/06/2004 =E0 23:32, Scott James Remnant a =E9crit :
e> [2004.06.15.2058 +0200]:[vbcol=seagreen]
>=20
> In this case we can use wrappers setting LD_LIBRARY_PATH (that's what
> e.g. galeon does).


That sounds even uglier. Programs spawned by galeon will inherit the
munger LD_LIBRARY_PATH. Why doesn't galeon put its libraries in the
right place (/usr/lib)?

Phil.
Scott James Remnant

2004-06-16, 5:55 pm

On Wed, 2004-06-16 at 01:14 +0200, Josselin Mouette wrote:

> Le mar 15/06/2004 Ã_ 23:32, Scott James Remnant a écrit :
>
> In this case we can use wrappers setting LD_LIBRARY_PATH (that's what
> e.g. galeon does).
>

That sounds like fixing a problem with a worse solution.

Scott
--
Have you ever, ever felt like this?
Had strange things happen? Are you going round the twist?

Josselin Mouette

2004-06-16, 5:55 pm

Le mer 16/06/2004 à 01:21, Philippe Troin a écrit :
>
> That sounds even uglier. Programs spawned by galeon will inherit the
> munger LD_LIBRARY_PATH. Why doesn't galeon put its libraries in the
> right place (/usr/lib)?


These are the mozilla libraries. As they are not properly versioned,
they are put in /usr/lib/mozilla.
--
.''`. Josselin Mouette /\./\
: :' : josselin.mouette@ens-lyon.org
`. `' joss@debian.org
`- Debian GNU/Linux -- The power of freedom

martin f krafft

2004-06-16, 5:56 pm

also sprach Scott James Remnant <scott@netsplit.com> [2004.06.16.0132 +0200]:
> That sounds like fixing a problem with a worse solution.


Yes, I agree.

For reference:

http://www.visi.com/~barr/ldpath.html

--
Please do not CC me when replying to lists; I read them!

.''`. martin f. krafft <madduck@debian.org>
: :' : proud Debian developer, admin, and user
`. `'`
`- Debian - when you have better things to do than fixing a system

Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

martin f krafft

2004-06-16, 5:56 pm

also sprach Scott James Remnant <scott@netsplit.com> [2004.06.15.2332 +0200]:
> RPATH is necessary where the shared libraries are outside of
> /usr/lib (for example).


That can be included in the policy. But anything directly under
*/lib should be prohibited to use rpath.

--
Please do not CC me when replying to lists; I read them!

.''`. martin f. krafft <madduck@debian.org>
: :' : proud Debian developer, admin, and user
`. `'`
`- Debian - when you have better things to do than fixing a system

Invalid/expired PGP subkeys? Use subkeys.pgp.net as keyserver!

Philippe Troin

2004-06-16, 5:56 pm

Josselin Mouette <joss@debian.org> writes:

> Le mer 16/06/2004 =E0 01:21, Philippe Troin a =E9crit :
>=20
> These are the mozilla libraries. As they are not properly versioned,
> they are put in /usr/lib/mozilla.


That might be a case where -rpath is probably bette and the
LD_LIBRARY_PATH munging.

Phil.
Manoj Srivastava

2004-06-20, 10:24 pm

Matt Zimmerman

2004-06-20, 10:24 pm

On Fri, Jun 18, 2004 at 06:20:42PM -0500, Manoj Srivastava wrote:

> On Tue, 15 Jun 2004 21:25:16 +0200, martin f krafft <madduck@debian.org> said:
>
>
>
> Policy generally does not say things like "Do not do things
> that are buggy", since then we would have a huge document. Sounds
> like there are clear cut technical reasons _not_ to use rpath; that
> using rpath breaks things; surely we do not need policy to tell us
> not to break stuff?


In this case, it is something which upstreams often do, and where the Debian
maintainer takes action to avoid breaking stuff, so perhaps it is worth
documenting as a recommended practice.

--
- mdz


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com