From owner-freebsd-questions@FreeBSD.ORG Fri Oct 24 02:31:41 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 DA926106569A for ; Fri, 24 Oct 2008 02:31:41 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.233]) by mx1.freebsd.org (Postfix) with ESMTP id A6D078FC1E for ; Fri, 24 Oct 2008 02:31:41 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so597957rvf.43 for ; Thu, 23 Oct 2008 19:31:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=5Z1PDB75nctmP/Wk6mjmQ56TY4BzeuAJ8fxl/My/hJw=; b=ayl2eley3aLGgrYQ5Fo6kPZd7P7qwJ6uONUz1+zXHLuPX6Gy7z2Ee/RDnT8M7iTIAv PKLadv33RRb8unhL0acfYbr8v56pWtQC1z637iIbuPiO7HnzloU8iXmU8yoYxjKglBsW di0/xaP63arjq0vziKOItQKZ8eN52hGHCtWTg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=ZEqOz+fIycrX9rt/jVPmd4H/gyys5ZC/AtezlMvTDSJ/6mqeKzbESrSCS36XX1eBlS XeZl8PUGm+P4iBKzQPIit4nr6Dxi8z2/IdfMdwCHBKWfqFYJPSDs4k8/TM+1HeJfY1Ab D0wN0cy6p/EC7nUPgksQueBBKcSjx2pdDVDqM= Received: by 10.141.28.4 with SMTP id f4mr834288rvj.66.1224815500641; Thu, 23 Oct 2008 19:31:40 -0700 (PDT) Received: by 10.141.43.14 with HTTP; Thu, 23 Oct 2008 19:31:40 -0700 (PDT) Message-ID: <3c0b01820810231931p2acbf426m7f1b94b73b466e5d@mail.gmail.com> Date: Thu, 23 Oct 2008 22:31:40 -0400 From: "Alexander Sack" To: "Alexander Kabaev" In-Reply-To: <20081023220949.7f304bbb@kan.dnsalias.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <86hc72x0nx.fsf@ds4.des.no> <86d4hqwzur.fsf@ds4.des.no> <3c0b01820810231848r3e3e297cl3dc9bf1d0edcd588@mail.gmail.com> <20081023220949.7f304bbb@kan.dnsalias.net> 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-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:31:42 -0000 On Thu, Oct 23, 2008 at 10:09 PM, Alexander Kabaev wrote: > 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? >> >> Feel free to use that last statement on my epitaph! :D >> > 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? Actually now that I re-read your paragraph I suppose this isn't such a bad idea but for some reason I believe that if you have /usr/lib before /usr/lib32 it should *just* work. -aps