From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Don't augment LD_LIBRARY_PATH (was Re: [PATCH] do not augment environment) Date: Sun, 07 Oct 2012 23:16:50 +0200 Message-ID: <87ipamx9rx.fsf@gnu.org> References: <505CF9FC.9060007@gmail.com> <5069022C.9040600@netris.org> <87y5jnn8y4.fsf_-_@tines.lan> <877gr6j7ml.fsf@gnu.org> <87mx00mixi.fsf@tines.lan> <87r4pblqv7.fsf@tines.lan> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1349644617 2709 80.91.229.3 (7 Oct 2012 21:16:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Oct 2012 21:16:57 +0000 (UTC) Cc: Bruce Korb , guile-devel@gnu.org To: Mark H Weaver Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Oct 07 23:17:03 2012 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TKyDf-0006kF-7Z for guile-devel@m.gmane.org; Sun, 07 Oct 2012 23:17:03 +0200 Original-Received: from localhost ([::1]:54516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKyDZ-0001SO-6m for guile-devel@m.gmane.org; Sun, 07 Oct 2012 17:16:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59768) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKyDV-0001SJ-P1 for guile-devel@gnu.org; Sun, 07 Oct 2012 17:16:54 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TKyDU-0005To-PR for guile-devel@gnu.org; Sun, 07 Oct 2012 17:16:53 -0400 Original-Received: from xanadu.aquilenet.fr ([88.191.123.111]:36124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TKyDU-0005Td-Jf for guile-devel@gnu.org; Sun, 07 Oct 2012 17:16:52 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by xanadu.aquilenet.fr (Postfix) with ESMTP id E512D9FC0; Sun, 7 Oct 2012 23:16:51 +0200 (CEST) Original-Received: from xanadu.aquilenet.fr ([127.0.0.1]) by localhost (xanadu.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BeVC+3NzdL-G; Sun, 7 Oct 2012 23:16:51 +0200 (CEST) Original-Received: from pluto (reverse-83.fdn.fr [80.67.176.83]) by xanadu.aquilenet.fr (Postfix) with ESMTPSA id 3C2DA1918; Sun, 7 Oct 2012 23:16:51 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 =?iso-8859-1?Q?Vend=E9miaire?= an 221 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87r4pblqv7.fsf@tines.lan> (Mark H. Weaver's message of "Sat, 06 Oct 2012 08:36:12 -0400") User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 88.191.123.111 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:14937 Archived-At: Hi, Mark H Weaver skribis: > I wrote: >> I've read the message referenced above several times, but I've failed to >> understand why we cannot use 'lt_dladdsearchdir' to augment the path, as >> shown in the first code excerpt of that message: >> >> env =3D getenv ("GUILE_SYSTEM_EXTENSIONS_PATH"); >> >> [...] >> >> if (env) >> lt_dladdsearchdir (env); >> else >> { >> lt_dladdsearchdir (SCM_LIB_DIR); >> lt_dladdsearchdir (SCM_EXTENSIONS_DIR); >> } > > Actually, I can already see a problem with this. SCM_LIB_DIR is usually > (always?) already present in the library search paths before Guile is > initialized. It is set to $(libdir) by libguile/Makefile. Isn't > $(libdir) where libguile is installed? In 1.8 and earlier, extensions were installed under $libdir, and it=E2=80= =99s just an obvious convenience to ensure that $libdir is in the search path. Note that lt_dladdsearchdir /appends/ its arguments to the search path. [...] > With this in mind, I now propose the following: > > env =3D getenv ("GUILE_SYSTEM_EXTENSIONS_PATH"); > if (env) > lt_dladdsearchdir (env); > else > lt_dladdsearchdir (SCM_EXTENSIONS_DIR); > > and then to run the uninstalled guile, we'd need to set (or augment) one > of the *_LIBRARY_PATH environment variables to point within the build > directory, and also set GUILE_SYSTEM_EXTENSIONS_PATH. > > What do you think? First, I think we don=E2=80=99t want to change the behavior at all in 2.0, because that=E2=80=99s a sure way to surely get reports of angry users. Other than that, in 2.1 we could consider dropping $libdir like this, and making sure all extensions get installed in the right place. That would probably make sense. > On a related topic, why is libguilereadline-v-18.* installed in > SCM_LIB_DIR and not SCM_EXTENSIONS_DIR? Historical reasons. We should probably change it in 2.1, and also remove the =E2=80=9Clib=E2=80=9D prefix. WDYT? Ludo=E2=80=99.