From owner-freebsd-current@FreeBSD.ORG Wed Jan 10 12:21:14 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 3D5A416A40F for ; Wed, 10 Jan 2007 12:21:14 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id E985D13C461 for ; Wed, 10 Jan 2007 12:21:13 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5E36F.dip.t-dialin.net [84.165.227.111]) by redbull.bpaserver.net (Postfix) with ESMTP id 574F82E1AB; Wed, 10 Jan 2007 13:26:59 +0100 (CET) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id A12715B497E; Wed, 10 Jan 2007 13:21:01 +0100 (CET) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l0ACL1MA020755; Wed, 10 Jan 2007 13:21:01 +0100 (CET) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Wed, 10 Jan 2007 13:21:01 +0100 Message-ID: <20070110132101.k8zzn281ic8w04ks@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Wed, 10 Jan 2007 13:21:01 +0100 From: Alexander Leidinger To: Tijl Coosemans References: <20070108165157.GA94941@stud.fit.vutbr.cz> <89559334@srv.sem.ipt.ru> <20070110075310.4vdsp3q68wgs4k4g@webmail.leidinger.net> <200701101151.51662.tijl@ulyssis.org> In-Reply-To: <200701101151.51662.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.3) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.864, required 6, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: Boris Samorodov , Divacky, freebsd-current@freebsd.org, 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 12:21:14 -0000 Quoting Tijl Coosemans (from Wed, 10 Jan 2007 =20 11:51:48 +0100): > 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 =3D> /lib/obsolete/linuxthreads/librt.so.1 (0x4807c000) > > I think this is an easier solution than changing the runtime linker. Does it still work with 2.6.16 (can't test ATM)? If yes: I agree, it =20 is more easy and we can change this in the linux base port very fast =20 (I have some other changes =20 (http://www.leidinger.net/FreeBSD/port-patches/emulators:linux_base-fc4.diff= ) =20 for which I wait for an important reason to commit them to the linux =20 base port). Bye, Alexander. --=20 And you can't get any Watney's Red Barrel, because the bars close every time you're thirsty... http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137