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: Why is Guile now setting LD_LIBRARY_PATH? Date: Tue, 11 Sep 2012 15:12:52 +0200 Message-ID: <87392obt4b.fsf@gnu.org> References: <504E7C3E.4040407@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1347369212 19756 80.91.229.3 (11 Sep 2012 13:13:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2012 13:13:32 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 11 15:13:34 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 1TBQHS-0005X4-M9 for guile-devel@m.gmane.org; Tue, 11 Sep 2012 15:13:30 +0200 Original-Received: from localhost ([::1]:41500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQHP-0002xS-1x for guile-devel@m.gmane.org; Tue, 11 Sep 2012 09:13:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:57079) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQHH-0002u2-0N for guile-devel@gnu.org; Tue, 11 Sep 2012 09:13:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBQHA-00024f-17 for guile-devel@gnu.org; Tue, 11 Sep 2012 09:13:18 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:58627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBQH9-00024C-R0 for guile-devel@gnu.org; Tue, 11 Sep 2012 09:13:11 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TBQH6-0005Bl-IC for guile-devel@gnu.org; Tue, 11 Sep 2012 15:13:08 +0200 Original-Received: from 193.50.110.192 ([193.50.110.192]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Sep 2012 15:13:08 +0200 Original-Received: from ludo by 193.50.110.192 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 11 Sep 2012 15:13:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 193.50.110.192 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 Fructidor an 220 de la =?iso-8859-1?Q?R=E9volutio?= =?iso-8859-1?Q?n?= 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 User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:d26YI4d210t+2wM0ubtiOUlbfDE= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:14879 Archived-At: Hi Bruce, Bruce Korb skribis: >> in main() LD_LIBRARY_PATH='EMPTY' >> in inner_main() LD_LIBRARY_PATH='/usr/lib64:/usr/lib64/guile/2.0/extensions' The reason provided in ‘sysdep_dynl_init’ is: /* Add SCM_LIB_DIR and SCM_EXTENSIONS_DIR to the loader's search path. `lt_dladdsearchdir' and $LTDL_LIBRARY_PATH can't be used for that because they are searched before the system-dependent search path, which is the one `libtool --mode=execute -dlopen' fiddles with (info "(libtool) Libltdl Interface"). See for details. */ augment_env (SHARED_LIBRARY_PATH_VARIABLE, SCM_LIB_DIR); augment_env (SHARED_LIBRARY_PATH_VARIABLE, SCM_EXTENSIONS_DIR); > libguile needs to be linked with -Wl,-rpath -Wl,/usr/lib64/guile/2.0/extensions > instead of messing up your client's link/load. ("/usr/lib64" should not be needed.) Problem is that (1) -rpath is not always available, and (2) when using GNU ld with --enable-new-dtags, it produces a RUNPATH (not an RPATH), which can be overridden by $LD_LIBRARY_PATH. I agree that using setenv is ugly, but finding an option that’s portable and doesn’t break existing programs seems tricky too. Do you have any solutions meeting this criteria in mind? Thanks, Ludo’.