Re: -rpath with libtool and Debian Linux
Ian Lance Taylor <email@example.com> writes:
> Date: Sat, 30 Jan 1999 23:30:43 +0100
> From: Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
> Why should the application choose to hard code the PATH in the binary?
> AFAICS, there is no apparent reason for it. What has the path to do with the
> library? I think the only thing that should be hard coded is the exact
> soname and library name. Maybe I am missing something?
> Suppose you have your own set of shared libraries, in your own
> directory. Suppose you want to let other people use your programs
> linked against your own shared libraries. You can tell everyone who
> uses your programs to set LD_LIBRARY_PATH, or you can simply use
> -rpath so that your programs can always find your shared libraries.
Yes, I completely agree.
For example, I want to use -rpath for the Debian snapshots stuff,
which is going to get installed under /opt/snapshots. Using -rpath is
very nice, because the libraries can then use the snapshot version of
gtk, glib, or gnome-libs (also installed under /opt/snapshots) instead
of the standard Debian libs. This way, the snapshot packages can be
kept completely independent from the regular Debian packages.
So -rpath is still very useful in some circumstances - where you don't
want the users to have to set LD_LIBRARY_PATH.