-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

Am 18.01.2005 um 03:27 schrieb Ales Hvezda:

[snip]
where is it discouraged?  Does linux typically put /usr/X11R6/lib
into gcc's default runtime path?

I got flamed on usenet recently when I brought up the use of LD_LIBRARY_PATH vs rpath. However, Debian seems to be the most vocal opponent of rpath:

Random links (some against, one for):
...
http://people.debian.org/~che/personal/rpath-considered-harmful

Let's look at this one:

> Reason One:  It makes creating software packages extremely difficult.

This is just a matter for people making packages like the debina people. I do not wother, these people do suggest to not use rpath.

> Reason Two (the biggy): It makes upgrading a major library impossible.

The opposite is true. Without rpath, upgrading a library replaces an existing one. with rpath I can safely install a new version at a different location and I do not risk to break anything.

But once again, I can understand why distribution makers argue different.

> [EOR]

End Of Reasons.

I really do see no reason to not use rpath (unless you are a distribution builder). If distribution makers do not like rpath, why don't they just strip the rpath of their executables prior to delivering them? Stripping rpath is much more easy thand adding it. Stripping rpath requires just changing a single byte to 0, while appending to rpath requires to rearrange the entire executable, a task that requires changing several pointers in the executable. It is practical only achievable by relinking the executable.

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

Hey, this one tells us to use rpath.

Either way, I'm willing to entertain reasons for or against.


What would be the appropriate way to turn on/off the rpath stuff? There could be an --enable-rpath/--disable-rpath or it could be a switch based on OS, although I'm not a fan of the latter.

I like the KDE approach, where you can do "./configure - --disable-rpath". Havong this option should satisfy package builder.


configure should first check, wether the compiler accepts any rpath flags (-R, -Wl,--rpath, LD_RUN_PATH, ...). If the compiler does, configure should supply the approriate rpath arguments to the compiler for each -L-argument used. This is letting ./configure plaing safe, since it does no harm to the probe program.

When the tests show, that the libs are available and working, configure should check for each -L, wether it can be omitted from rpath.

73, Mario
- -- Mario Klebsch [EMAIL PROTECTED]
PGP-Key available at http://www.klebsch.de/public.key
Fingerprint DSS: EE7C DBCC D9C8 5DC1 D4DB 1483 30CE 9FB2 A047 9CE0
Diffie-Hellman: D447 4ED6 8A10 2C65 C5E5 8B98 9464 53FF 9382 F518
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)


iD8DBQFB7YFFMM6fsqBHnOARAiskAJ440WO9aijpLGN90V56NwOqr4PxfQCg2AdR
hM55it3myPoW/4a+Mp3OtYo=
=qfCq
-----END PGP SIGNATURE-----



Reply via email to