From owner-freebsd-questions@FreeBSD.ORG Fri Oct 24 02:35:37 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 730EB106566C for ; Fri, 24 Oct 2008 02:35:37 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 12F7B8FC08 for ; Fri, 24 Oct 2008 02:35:36 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so229700ywe.13 for ; Thu, 23 Oct 2008 19:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=sUrlXDL3Tg1S1uwk5aD4DSEXKbqXPHzwn/hKfylmZ2k=; b=gBBmjM4KEw+H6YZHj1YQDR8zQHtJx8Mhgx99WMJRLvLkSoill6+Z+ynnQpZBU0ij4D BqEfqUK5ytVCbD+GZDnWq7G2FcMDJQXHK2FbsHNPs1mZkAZlImsMvYEin4E/jyYGWHMk X9V5Dx6q7sTMykA4UqNAKW3AehWI8qrL3P4GE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=PXayllkePVi/Ev9+07C32jHX3BPltPvegHRQkIiLQFMutndZKyM55cJBFcyj58cqG+ jCohFLYjywmBaIN5EBCc8x6HFKIHIH162+NfHwznOzk6/raNoPiny4vyRshrBxvCbW8H Mo8Gq5lQJ3LdTOXXMd7U+DEF25+Fbk32jGugQ= Received: by 10.100.225.19 with SMTP id x19mr1696689ang.122.1224814195034; Thu, 23 Oct 2008 19:09:55 -0700 (PDT) Received: from kan.dnsalias.net (c-24-62-106-68.hsd1.ma.comcast.net [24.62.106.68]) by mx.google.com with ESMTPS id 3sm16109651wrh.28.2008.10.23.19.09.53 (version=SSLv3 cipher=RC4-MD5); Thu, 23 Oct 2008 19:09:54 -0700 (PDT) Date: Thu, 23 Oct 2008 22:09:49 -0400 From: Alexander Kabaev To: "Alexander Sack" Message-ID: <20081023220949.7f304bbb@kan.dnsalias.net> In-Reply-To: <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/EFRs6CU3QFz3aSwJJ.mTct7"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= , freebsd-questions@freebsd.org, FreeBSD Hackers Subject: Re: Why does adding /usr/lib32 to LD_LIBRARY_PATH break 64-bit binaries? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Oct 2008 02:35:37 -0000 --Sig_/EFRs6CU3QFz3aSwJJ.mTct7 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 23 Oct 2008 21:48:47 -0400 "Alexander Sack" wrote: > Thanks, comments most appreciated. Damn, I was looking for someone to > go "a ha, you can't do this because...." Alright, let me see why rtld > on 6.1-amd64 is picking up /usr/lib32 stuff for a native 64-bit binary > via debugging techniques. This seems very very wrong to me. I mean if > /usr/lib is in my LD_LIBRARY_PATH and it comes before /usr/lib the > /usr/lib32 *should* be innocuous, right? >=20 > Feel free to use that last statement on my epitaph! :D >=20 LD_LIBRARY_PATH is for native 64bit rtld. If you want a specific path added for use by 32-bit ld-elf.so.1 only, use LD_32_LIBRARY_PATH. Said that, your problem is likely caused by the fact that there is no /lib32, only /usr/lib32. So if 64-bit library lives in /lib, your LD_LIBRARY_PATH will cause loader to find its 32-bit equivalent in /usr/lib32 first. Try LD_LIBRARY_PATH=3D/lib:/usr/lib:/usr/lib32:/usr/lib64 for better results. --=20 Alexander Kabaev --Sig_/EFRs6CU3QFz3aSwJJ.mTct7 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJAS5tQ6z1jMm+XZYRArJFAKCLkEhe+8rvhDJNde+5gEWQ9C69HACgrAb5 H58IX88GLZ5wBNRljWD/XEQ= =zTke -----END PGP SIGNATURE----- --Sig_/EFRs6CU3QFz3aSwJJ.mTct7--