From owner-freebsd-questions@FreeBSD.ORG Tue May 13 15:52:39 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 9A33F1065676 for ; Tue, 13 May 2008 15:52:39 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from cavuit02.kulnet.kuleuven.be (cavuit02.kulnet.kuleuven.be [134.58.240.44]) by mx1.freebsd.org (Postfix) with ESMTP id 200D08FC20 for ; Tue, 13 May 2008 15:52:39 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from smtps01.kuleuven.be (smtpshost01.kulnet.kuleuven.be [134.58.240.74]) by cavuit02.kulnet.kuleuven.be (Postfix) with ESMTP id 245F151C003; Tue, 13 May 2008 17:52:15 +0200 (CEST) Received: from kalimero.kotnet.org (kalimero.kotnet.org [10.4.16.222]) by smtps01.kuleuven.be (Postfix) with ESMTP id 2448731E703; Tue, 13 May 2008 17:52:14 +0200 (CEST) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.14.2/8.14.2) with ESMTP id m4DFqD0S036724; Tue, 13 May 2008 17:52:13 +0200 (CEST) (envelope-from tijl@ulyssis.org) X-Kuleuven: This mail passed the K.U.Leuven mailcluster From: Tijl Coosemans To: glyn@millingtons.org Date: Tue, 13 May 2008 17:52:11 +0200 User-Agent: KMail/1.9.7 References: <86tzh2oc1t.fsf@nowhere.org> <200805131605.37330.tijl@ulyssis.org> <86fxsmgtng.fsf@nowhere.org> In-Reply-To: <86fxsmgtng.fsf@nowhere.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200805131752.12767.tijl@ulyssis.org> X-KULeuven-Information: Katholieke Universiteit Leuven X-KULeuven-Scanned: Found to be clean X-Spam-Status: not spam, SpamAssassin (not cached, score=-50, required 5, autolearn=disabled, KUL_SMTPS -50.00) X-KULeuven-Envelope-From: tijl@ulyssis.org Cc: freebsd-questions@freebsd.org Subject: Re: Linux compat library error: ELF file OS ABI invalid 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: Tue, 13 May 2008 15:52:39 -0000 On Tuesday 13 May 2008 16:34:11 Glyn Millington wrote: > Tijl Coosemans writes: >> On Tuesday 13 May 2008 10:14:54 Glyn Millington wrote: >>> FreeBSD 7.0 release, ports currently up-to-date >>> >>> >>> Trying to launch Linux Open Office 2.4 I get the following error >>> message >>> >>> >>> ,---- >>> | /usr/compat/linux/opt/openoffice.org2.4/program/soffice.bin: error while >>> | loading shared libraries: /usr/local/lib/libXext.so.6: ELF file OS ABI >>> | invalid >>> `---- >>> >>> Now I *think* that what it ought to load is >>> >>> /usr/compat/linux/usr/X11R6/lib/libXext.so.6 >>> >>> but it goes for the FreeBSD X extension lib instead. >>> >>> Can anyone help me to fix this? >> >> If /compat/linux/usr/local doesn't exist, perhaps making it a >> symlink to X11R6 does the trick. > > Spot on!! Many thanks :-) > > What I don't understand is why that works, when > /compat/linux/etc/ld.so.conf points at the right place in the very > first line! I suspect some OO executable or lib has some search paths hardcoded which the linker checks before using the ldconfig cache. If you want you could check this with: objdump -p | grep RPATH RPATH could be /usr/lib:/usr/local/lib:/usr/X11R6/lib for instance. Also, when a Linux program opens a file (i.e. libXext.so.6), FreeBSD first tries to find it under /compat/linux, then under /. So linker tries to open /usr/local/lib/libXext.so, but it didn't exist under /compat/linux so it got the FreeBSD libXext.so.