From owner-freebsd-hackers@FreeBSD.ORG Fri Oct 24 03:07:41 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 D721E1065672 for ; Fri, 24 Oct 2008 03:07:41 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id 9866F8FC12 for ; Fri, 24 Oct 2008 03:07:41 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1]) by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id m9O37e6k057623 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Oct 2008 22:07:41 -0500 (CDT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.3/8.14.3/Submit) id m9O33tdm046833; Thu, 23 Oct 2008 22:03:55 -0500 (CDT) (envelope-from dan) Date: Thu, 23 Oct 2008 22:03:54 -0500 From: Dan Nelson To: Alexander Sack Message-ID: <20081024030354.GA41283@dan.emsphone.com> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> <20081023220949.7f304bbb@kan.dnsalias.net> <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com> X-OS: FreeBSD 7.1-PRERELEASE User-Agent: Mutt/1.5.18 (2008-05-17) 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 03:07:41 -0000 In the last episode (Oct 23), Alexander Sack said: > On Thu, Oct 23, 2008 at 10:09 PM, Alexander Kabaev wrote: > > 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=/lib:/usr/lib:/usr/lib32:/usr/lib64 for better > > results. > > Yes I figured that out on my own but my question still exists, why > isn't /usr/lib similar in format to /usr/lib32 though with respect to > major numbers? Ever since the switch from static to dynamic-linked /bin and /sbin, some shared libraries are needed during the boot process. Those libraries live in /lib, and since there are no 32-bit binaries required to boot a 64-bit system, there is no need for a /lib32. -- Dan Nelson dnelson@allantgroup.com