From owner-freebsd-current@FreeBSD.ORG Wed Jan 10 10:51:56 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 20A6516A501 for ; Wed, 10 Jan 2007 10:51:56 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from nibbel.kulnet.kuleuven.ac.be (nibbel.kulnet.kuleuven.ac.be [134.58.240.41]) by mx1.freebsd.org (Postfix) with ESMTP id CB54413C46A for ; Wed, 10 Jan 2007 10:51:55 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from localhost (localhost [127.0.0.1]) by nibbel.kulnet.kuleuven.ac.be (Postfix) with ESMTP id D104F4CF19; Wed, 10 Jan 2007 11:51:54 +0100 (CET) Received: from smtps01 (octavianus.kulnet.kuleuven.ac.be [134.58.240.71]) by nibbel.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 3FA484D7AF; Wed, 10 Jan 2007 11:51:54 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [10.4.16.222]) by smtps01 (Postfix) with ESMTP id E80B12E68CA; Wed, 10 Jan 2007 11:51:53 +0100 (CET) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.13.8/8.13.8) with ESMTP id l0AApqgQ001455; Wed, 10 Jan 2007 11:51:52 +0100 (CET) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-current@freebsd.org Date: Wed, 10 Jan 2007 11:51:48 +0100 User-Agent: KMail/1.9.5 References: <20070108165157.GA94941@stud.fit.vutbr.cz> <89559334@srv.sem.ipt.ru> <20070110075310.4vdsp3q68wgs4k4g@webmail.leidinger.net> In-Reply-To: <20070110075310.4vdsp3q68wgs4k4g@webmail.leidinger.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701101151.51662.tijl@ulyssis.org> X-Virus-Scanned: by KULeuven Antivirus Cluster Cc: Boris Samorodov , Alexander Leidinger , Divacky Roman Subject: Re: broken linuxulator in -current as of Jan 8 17:51:45 CET X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jan 2007 10:51:56 -0000 On Wednesday 10 January 2007 07:53, Alexander Leidinger wrote: > That's not possible. The way the linuxulator works is: > - the linker in userland calls open("/foo/bar") > - kernel looks for "/compat/linux/foo/bar" > * it is there -> return it > * it is not there -> look for "/foo/bar" > + if it is there -> return it > + if it is not there -> return error > - the userland get's something which may be linux or FreeBSD stuff > - the linker read()s this > - the linker sees a wrong ELF ABI and bails out That means the linker tries to open /usr/lib/librt.so.1 instead of /lib/librt.so.1 which doesn't exist under /compat/linux. So I added a symlink there. ln -s ../../lib/librt-2.3.6.so /compat/linux/usr/lib/librt.so.1 And now everything works. - the linker in userland calls open("/usr/lib/librt.so.1") - kernel looks for "/compat/linux/usr/lib/librt.so.1" * it is there -> return it - the linker read()s this - the linker sees a wrong linux kernel ABI (in case of 2.4.2) and calls open("/lib/obsolete/linuxthreads/librt.so.1") % ldd /compat/linux/bin/ls /compat/linux/bin/ls: librt.so.1 => /lib/obsolete/linuxthreads/librt.so.1 (0x4807c000) I think this is an easier solution than changing the runtime linker.