From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 01:05:39 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84C0C1065671 for ; Fri, 24 Oct 2008 01:05:39 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 4112F8FC26 for ; Fri, 24 Oct 2008 01:05:39 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 4B0E56D44C; Fri, 24 Oct 2008 01:05:38 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 394EF844A8; Fri, 24 Oct 2008 03:05:38 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Alexander Sack" References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> Date: Fri, 24 Oct 2008 03:05:38 +0200 In-Reply-To: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> (Alexander Sack's message of "Thu, 23 Oct 2008 20:31:05 -0400") Message-ID: <86hc72x0nx.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Hackers , freebsd-questions@freebsd.org Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 01:05:39 -0000 "Alexander Sack" writes: > I have some weird behavior I'm trying to figure out and was wondering > if someone can point me in the right direction. I'm running a FreeBSD > 6.1-RELEASE-amd64 machine. If I add /usr/lib32 to my LD_LIBRARY_PATH > it breaks all of my binaries on my 64-bit machine. > [...] > LD_LIBRARY_PATH=3D$LD_LIBRARY_PATH:/usr/bin:/usr/lib:/usr/lib32:/usr/lib64 I'm surprised you have /usr/bin in there... > I would ASSUME that rtld would look at my LD_LIBRARY_PATH and use > /usr/lib to find libraries, not /usr/lib32. Why does it insist on > picking /usr/lib32 when "/bin/ls" is CLEARLY a 64-bit binary? This > doesn't make complete sense to me just yet. If you look at the rtld(1) man page, there are a number of environment variables you can set to debug the loader. I'm not sure how helpful they are, though. > Someone I'm sure is going "don't do that" and I agree. Well, yeah, but it should (at the very least) fail in a more graceful manner. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no