From owner-cvs-all Thu Apr 29 9:24:18 1999 Delivered-To: cvs-all@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id 62E981589E for ; Thu, 29 Apr 1999 09:24:13 -0700 (PDT) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.1) with ESMTP id JAA08052; Thu, 29 Apr 1999 09:24:13 -0700 (PDT) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id JAA52371; Thu, 29 Apr 1999 09:24:12 -0700 (PDT) (envelope-from jdp@polstra.com) Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <19990429162225.A267@broccoli.no-support.loc> Date: Thu, 29 Apr 1999 09:24:10 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: Bjoern Fischer Subject: Re: cvs commit: src/libexec/rtld-elf rtld.c [RELENG_3] Cc: cvs-all@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk 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