On Jan 27, 1999, Jason Gunthorpe <[EMAIL PROTECTED]> wrote: > Actually you want to know why I remember this? I used libtool a while back > and I installed a copy of my program in /usr/bin and /usr/lib and wanted > to us a new local copy of my libtool program. Of course libtool had used > -rpath to make sure that my local binary used /usr/lib (as it was intended > to be installed there someday) and then used LD_LIBRARY_PATH in the > wrapper script to try to override this. Needless to say it did not work > and it took me a bit of figuring to determine why my changes had no > effect. Even in an all libtool environment rpath causes pain.
This is a known bug in the current libtool, and we're working on a fix. >> I have already told you one (ugly) way to do it, but I still don't >> think it is a good idea in the general case. > Didn't we decide that all of the available alternatives that you have > suggested are not a feasable solution (does this mail help make it clear > why)? You may have missed the ugly one I was referring to, that I suggested in the very beginning of this discussion, that would work even for packages that were distributed with older versions of libtool: configure the packages to use a gcc or ld wrapper that removes switches such as -rpath /usr/lib from the command line then call the appropriate program. This will have the extra benefit of fixing other packages that don't use libtool, but happen to specify -rpath on their own. > - rpath is good because it allows a binary to have a shared library > in a non-standard place without requiring the user to use > LD_LIBRARYPATH or the sysadmin to add that place to the search > path > - rpath is bad because it disables LD_LIBRARYPATH It does not disable it, it just precedes LD_LIBRARY_PATH. AFAIK, the purpose of LD_LIBRARY_PATH is to help a program find a library that was moved, and it does fulfil this purpose as long as you don't install another (in)compatible library in place of the moved library. > - rpath is bad because it disables the linkers automatic versioning > mechanism Does it? You mean, that hack in ld.so that adds /usr/lib/libc5 to the library search path in certain circumstances? The hack is incomplete, you just have to fix it. > - rpath is bad because it prevents you from moving shared libraries > around freely. It does not. It just prevents you from arbitrarily replacing a library with an (in)compatible version of it. Since you shouldn't do that, libtool is not the piece of software to be blamed for using -rpath. -- Alexandre Oliva http://www.dcc.unicamp.br/~oliva [EMAIL PROTECTED] [EMAIL PROTECTED],gnu.org,egcs.cygnus.com,samba.org} Universidade Estadual de Campinas, SP, Brasil