From owner-freebsd-questions Sat Dec 28 13: 5:38 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1336537B401 for ; Sat, 28 Dec 2002 13:05:36 -0800 (PST) Received: from sorrow.ashke.com (pcp103010pcs.glstrt01.nj.comcast.net [68.45.106.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id E969C43EB2 for ; Sat, 28 Dec 2002 13:05:34 -0800 (PST) (envelope-from adamk@voicenet.com) Received: from localhost (localhost.localdomain [127.0.0.1]) by sorrow.ashke.com (8.12.6/8.12.6) with ESMTP id gBSL5XTI019486; Sat, 28 Dec 2002 16:05:33 -0500 (EST) (envelope-from adamk@voicenet.com) Date: Sat, 28 Dec 2002 16:05:33 -0500 (EST) From: Adam K Kirchhoff X-X-Sender: adamk@sorrow.ashke.com To: =?ISO-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= Cc: freebsd-questions@freebsd.org Subject: Re: linux compatability In-Reply-To: <20021228121434.B18514-100000@atlas.home> Message-ID: <20021228155931.K12857@sorrow.ashke.com> References: <20021228121434.B18514-100000@atlas.home> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN Content-Transfer-Encoding: QUOTED-PRINTABLE Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, 28 Dec 2002, [ISO-8859-1] Mikko Ty=F6l=E4j=E4rvi wrote: > On Sat, 28 Dec 2002, Adam K Kirchhoff wrote: > > > Hey folks, > > > > =09I'm noticing some odd behaviour with the linux compatability > > recently. I have this small gnome app called gnome-run. It links agai= nst > > a number of gnome libraries that I've copied from my linux partition ov= er > > to /compat/linux and put in the appropriate directories. > > > > =09The problem is, when executing this app, the linker seems to try > > and load the libaudiofile.so.0 file from my FreeBSD installation instea= d > > of my /compat/linux installation. When running gnome-run it only does > > this for that one library (though other apps have shown this to be a > > problem with other libraries such as libgmodule-2.0.so.0, > > libglib-2.0.so.0, and libgobject-2.0.so.0) > > > > =09This is what happens when I try to launch "gnome-run" from an > > xterm: > > > > [ adamk@sorrow ~ ]$ gnome-run > > gnome-run: error while loading shared libraries: > > /usr/local/lib/libaudiofile.so.0: ELF file OS ABI invalid > > > > =09Well, of course the OS ABI is invalid. The libaudiofile library > > it's trying to load is for FreeBSD, not Linux. But, if I move the > > libaudiofile.so.0 file from /usr/local/lib to /usr/local/lib/old, and > > try to launch gnome-run, everything works fine. So, if the FreeBSD > > version of the library isn't present, it then looks for the Linux versi= on. > > > > =09Any ideas what's going on or how to fix this? > > Run "/compat/linux/sbin/ldconfig". That should update the path cache > of the (linux) dynamic linker. Didn't help :-( > I assume the permissions on the libs already are reasonable. [ adamk@sorrow ~ ]$ ls -l /compat/linux/usr/lib/libaudiofile.so.0* lrwxr-xr-x 1 root wheel 21 Dec 28 14:33 /compat/linux/usr/lib/libaudiofile.so.0 -> libaudiofile.so.0.0.2 -rwxr-xr-x 1 root wheel 158396 Dec 28 14:33 /compat/linux/usr/lib/libaudiofile.so.0.0.2 Solved it! It's LD_LIBRARY_PATH. If you have the same FreeBSD library in your LD_LIBRARY_PATH, it tries to use that library instead of the linux one :-) Mikko, thanks for your help. It was your tip on permissions that got me to try the app as root. When I saw that they worked as root, I realized it had to be something in my environment. Adam To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message