Date: Thu, 29 Apr 1999 09:24:10 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE> Cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/libexec/rtld-elf rtld.c [RELENG_3] Message-ID: <XFMail.990429092410.jdp@polstra.com> In-Reply-To: <19990429162225.A267@broccoli.no-support.loc>
next in thread | previous in thread | raw e-mail | index | archive | help
Bjoern Fischer wrote: > On Tue, Apr 27, 1999 at 06:23:55PM -0700, John Polstra wrote: >> jdp 1999/04/27 18:23:55 PDT >> >> Modified files: (Branch: RELENG_3) >> libexec/rtld-elf rtld.c >> Log: >> MFC 1.20 -> 1.21: Give RPATH precedence over LD_LIBRARY_PATH, as per >> the ELF spec. > > I don't know if this was already discussed on current@... No, it wasn't. I viewed it as a simple bug fix which didn't need discussion, but I guess I was wrong about that. :-} > Do we have to follow the ELF specification by detail? At work I'm > administering Solaris, IRIX and DigitalUnix machines. IRIX and DEC > both behave as described in the ELF spec. -- and we ran into several > problems: Often when a software package with shared libraries got > a major update we used LD_LIBRARY_PATH temporarily so that old > binaries found the proper libs. This was a long way to go due to > that weird RPATH/LD_LIBRARY_PATH behavior. > > All in all, what is LD_LIBRARY_PATH for? It's for hacking and > testing, for quick'n'dirty solutions. For linking binaries that may > be installed on a system and will be used for a longer time you use > RPATH. So I think giving RPATH precedence over LD_LIBRARY_PATH is a > bad idea, although it conforms with ELF. I think it's important to follow the spec as much as we can. But I agree that you're describing a real problem. Maybe we can solve that problem in a different way that doesn't violate the ELF spec. How about if the dynamic linker also honored a second environment variable, say, LD_LIBRARY_PATH0 or LD_LIBRARY_PREPATH or LD_LIBRARY_PATH_OVERRIDE. (Somebody please think of a decent name for it!) This variable would take priority over the RPATH. So the search order would become: LD_LIBRARY_PATH0 RPATH in the shared object LD_LIBRARY_PATH ldconfig hints /usr/lib Would that be acceptable? John --- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-interest is the aphrodisiac of belief." -- James V. DeLong To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990429092410.jdp>