From owner-cvs-all Sat May 1 10:52: 6 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 2927A150C2 for ; Sat, 1 May 1999 10:51:40 -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 KAA22025; Sat, 1 May 1999 10:51:38 -0700 (PDT) (envelope-from jdp@polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id KAA72564; Sat, 1 May 1999 10:51:38 -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: <19990430020203.A971@broccoli.no-support.loc> Date: Sat, 01 May 1999 10:51:37 -0700 (PDT) Organization: Polstra & Co., Inc. From: John Polstra To: Bjoern Fischer Subject: Re: cvs commit: src/libexec/rtld-elf rtld.c Cc: cvs-all@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk Bjoern Fischer wrote: > On Thu, Apr 29, 1999 at 09:24:10AM -0700, John Polstra wrote: >> >> LD_LIBRARY_PATH0 >> RPATH in the shared object >> LD_LIBRARY_PATH >> ldconfig hints >> /usr/lib >> >> Would that be acceptable? > > This would help the local FreeBSD administrator to override RPATH > for testing and quick'n'dirty solutions. But it would add a FreeBSD > specific environment variable. I have to agree it is just a kludge. > LD_LIBRARY_PATH is commonly known (and abused). Introducing a new > environment variable may lead to confusion. There are many traps > giving a new environment variable the functionality that is commonly > expected from LD_LIBRARY_PATH. > What would be harmed if we violate the specification and give > LD_LIBRARY_PATH precedence over RPATH? I just don't like `Follow > the specs, no matter whether it's good or bad'. One justifiable reason to deviate from the spec is if there is some other factor which causes the rationale behind the spec to be inapplicable to our situation. And maybe that is indeed the case here. The spec says the search order should be: RPATH in the shared object LD_LIBRARY_PATH /usr/lib But the spec took no consideration of the ldconfig hints file. If I remember correctly, ldconfig didn't even exist in SVR4.0. Maybe the presence of ldconfig in FreeBSD makes our situation different enough that the spec doesn't really apply to us. How does this argument sound? In SVR4, because there was no ldconfig, LD_LIBRARY_PATH was used in a more system-wide way. It essentially served the same function that our ldconfig hints serve. Because we have ldconfig in FreeBSD, it makes sense that LD_LIBRARY_PATH should have a slightly different role in our system, as a more local or temporary override. Based on that rationale, our search order should be: LD_LIBRARY_PATH RPATH in the shared object ldconfig hints /usr/lib Sheesh, I am starting to sound like a lawyer. :-( Note, this search order is different from both of the ones I have tried thus far. Only 21 more permutations to go after this one ... :-) What do you think? In your opinion (totally unbiased, of course), does this argument hold water? 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