From owner-freebsd-hackers@FreeBSD.ORG Sat Oct 25 18:55:53 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 870401065699 for ; Sat, 25 Oct 2008 18:55:53 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.31]) by mx1.freebsd.org (Postfix) with ESMTP id 2D9D68FC08 for ; Sat, 25 Oct 2008 18:55:52 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so421988ywe.13 for ; Sat, 25 Oct 2008 11:55:52 -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=9J3c9cogwvTOSTNbfckBcSeaQZ4NAjPn5wlC3LNLikg=; b=rUz/7jnd32jtMx7/8Vlm1K3f3JCRa+xZtPwlpUoT+N0D4h/EUO8kJyBI4u6K2AJmts eEszIPOtIB7sbS85fKEGO5AMedS51OxT/wWM+mxB+n2m/cpvqMwkJ3FguAi61Tpok5QB 106uxv7C8zadRPzEF4N5TFh6DtwPvMx1w6zO4= 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=LxMsnTgrn1b4K8flUx0kXrDBmmINlhNp6m+Ns5Q+DoKyLgEOPrB2tph/zqUIFoclYA ptMrWyIPplNsoWvFDd6BENPTV+KQQjF9Tx9x1BdNGu+QUt53B/RtvurCe0EUjVOolXdC KopJ7XQIQtMAyfRNlnCrTLihn+n2zEAefwJPI= Received: by 10.100.138.10 with SMTP id l10mr4560317and.25.1224960952021; Sat, 25 Oct 2008 11:55:52 -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 c27sm7766946ana.37.2008.10.25.11.55.50 (version=SSLv3 cipher=RC4-MD5); Sat, 25 Oct 2008 11:55:51 -0700 (PDT) Date: Sat, 25 Oct 2008 14:55:45 -0400 From: Alexander Kabaev To: "Alexander Sack" Message-ID: <20081025145545.52db2d8a@kan.dnsalias.net> In-Reply-To: <3c0b01820810251010n17ba274dsf0a543b8287e8e65@mail.gmail.com> References: <3c0b01820810231731s1b4d4659j7d1df8bf4abb229c@mail.gmail.com> <20081024104232.X21603@wojtek.tensor.gdynia.pl> <20081024125059.GE1137@server.vk2pj.dyndns.org> <200810250958.15130.doconnor@gsoft.com.au> <3c0b01820810250549r6c1f5614i27709c09d73a2018@mail.gmail.com> <20081025095707.5226d663@kan.dnsalias.net> <3c0b01820810251010n17ba274dsf0a543b8287e8e65@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_/Z+.yhe2Ce2Xi21EF9z+UlZD"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: Wojciech Puchar , freebsd-questions@freebsd.org, freebsd-hackers@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: Sat, 25 Oct 2008 18:55:53 -0000 --Sig_/Z+.yhe2Ce2Xi21EF9z+UlZD Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 25 Oct 2008 13:10:53 -0400 "Alexander Sack" wrote: > On Sat, Oct 25, 2008 at 9:57 AM, Alexander Kabaev > wrote: > > On Sat, 25 Oct 2008 08:49:19 -0400 > > "Alexander Sack" wrote: > > > >> > >> Is this a bug or not in FreeBSD's rtld? > >> > >> -aps > > > > It is not. In case it was not clear before, I maintain that you > > _ask_ rtld for wrong behaviour and you get back what you asked for, > > down to the letter. 'Tasting' libraries just because someone > > somewhere want to screw up their configuration does not seem right > > to me at all. >=20 > I maintain that rtld should not load 32-bit libraries for a 64-bit > binary. That is WRONG anyway you look at it. And again, if it checked > the arch type and skipped libutil.so.5 in /usr/lib32 it would fall > back to checking /lib and things would work. Moreover, if /usr/lib > had major number links just like /usr/lib32 has, this would again have > worked without issue. >=20 > I believe this will be fixed on the other side of the fence (not > setting LD_LIBRARY_PATH to include /usr/lib32 to begin wtih) but > still, my point still stands. >=20 > -aps It doesn't. Stop feeding 32 bit libraries and it won't try to load them. It is as simple as that. For complex scenarious we do provide LD_32_ family of environment variables and if you refuse using them and insist on sticking with clearly broken configuration, it your problem, not rtld's. --=20 Alexander Kabaev --Sig_/Z+.yhe2Ce2Xi21EF9z+UlZD Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJA2uyQ6z1jMm+XZYRAik6AJ9w8pbI1Y4uSXD8ujbzRlEQWvRhhwCg1qmk xwQnSb9dFlrSBiroH4pgF0Q= =OZK3 -----END PGP SIGNATURE----- --Sig_/Z+.yhe2Ce2Xi21EF9z+UlZD--