From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Greg Troxel Newsgroups: gmane.lisp.guile.devel Subject: Re: Why is Guile now setting LD_LIBRARY_PATH? Date: Mon, 10 Sep 2012 21:59:04 -0400 Message-ID: References: <504E7C3E.4040407@gnu.org> <504E80EE.5070408@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1347328767 31193 80.91.229.3 (11 Sep 2012 01:59:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Sep 2012 01:59:27 +0000 (UTC) Cc: guile-devel Development To: Bruce Korb Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Sep 11 03:59:30 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 1TBFlB-000622-0v for guile-devel@m.gmane.org; Tue, 11 Sep 2012 03:59:29 +0200 Original-Received: from localhost ([::1]:35620 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBFl7-00073f-Lr for guile-devel@m.gmane.org; Mon, 10 Sep 2012 21:59:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBFl4-00073a-VV for guile-devel@gnu.org; Mon, 10 Sep 2012 21:59:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TBFl4-00015W-69 for guile-devel@gnu.org; Mon, 10 Sep 2012 21:59:22 -0400 Original-Received: from fnord.ir.bbn.com ([192.1.100.210]:60884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TBFl2-00015E-IC; Mon, 10 Sep 2012 21:59:20 -0400 Original-Received: by fnord.ir.bbn.com (Postfix, from userid 10853) id 90E9DA7DD; Mon, 10 Sep 2012 21:59:18 -0400 (EDT) OpenPGP: id=32611E25 X-Hashcash: 1:20:120911:guile-devel@gnu.org::jNjQy2Fnr6ZKwD+b:0000000000000000000000000000000000000000000Rk7 X-Hashcash: 1:20:120911:bkorb@gnu.org::jNjQy2Fnr6ZKwD+b:000033Mh In-Reply-To: <504E80EE.5070408@gnu.org> (Bruce Korb's message of "Mon, 10 Sep 2012 17:08:14 -0700") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/23.4 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 192.1.100.210 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:14875 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Bruce Korb writes: > On 09/10/12 16:48, Bruce Korb wrote: >>> $ guile --version >>> guile (GNU Guile) 2.0.5 >>> Copyright (C) 2011 Free Software Foundation, Inc. >>=20 >> I added a couple of debug printf's after several hours chasing down >> why my program was crashing: >>=20 >>> in main() LD_LIBRARY_PATH=3D'EMPTY' >>> in inner_main() LD_LIBRARY_PATH=3D'/usr/lib64:/usr/lib64/guile/2.0/exte= nsions' >>=20 >> It was crashing because it was linking against a library in /usr/lib64 >> instead of /usr/local/lib64. Now I know why. >>=20 >> 1. Why was this done? >> 2. Why no notice? This is *BROKEN*. >>=20 >> 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.) >>=20 >> Distribution: openSuSE 12.2 (Just in case they are not following your >> build procedures and I need to harass them.) > > > P.S. the fix seems to be this, though, naturally, I hate it. > > static void > inner_main(void * closure, int argc, char ** argv) > { > atexit(done_check); > initialize(argc, argv); > > { > char const * p =3D getenv("LD_LIBRARY_PATH"); > if (p !=3D NULL) > putenv("LD_LIBRARY_PATH=3D"); > } I don't follow why you think this is the right fix. It seems that guile (main) and libguile (library) should both not set LD_LIBRARY_PATH at all. Also, lib64 is a linuxism; BSDs have the architecture's libs in /usr/lib and alternate ones in e.g /emul/netbsd32 (such as i386 libs on amd64 machines). So setting LD_LIBRARY_PATH has to be done in an os and arch-dependent way, which is complicated. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (NetBSD) iEYEARECAAYFAlBOmugACgkQ+vesoDJhHiXc7gCfTvApPRI9vvBLRmJEWJzK4Y+d KbEAniDfXswu6Bmb1QDcKBbEMGWbhabX =YIHr -----END PGP SIGNATURE----- --=-=-=--