Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Apr 2008 20:50:28 +0400
From:      Boris Samorodov <bsam@ipt.ru>
To:        Tijl Coosemans <tijl@ulyssis.org>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: googleearth & skype trouble
Message-ID:  <15571435@bb.ipt.ru>
In-Reply-To: <200804191746.12611.tijl@ulyssis.org> (Tijl Coosemans's message of "Sat\, 19 Apr 2008 17\:46\:11 %2B0200")
References:  <480921B2.6030004@inode.at> <40533363@bb.ipt.ru> <200804191746.12611.tijl@ulyssis.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 19 Apr 2008 17:46:11 +0200 Tijl Coosemans wrote:
> On Saturday 19 April 2008 17:03:56 Boris Samorodov wrote:
> > On Sat, 19 Apr 2008 00:33:22 +0200 Armin Pirkovitsch wrote:
> >> When I try to start them I get:
> >> <program>: error while loading shared libraries:
> >> /usr/lib/librt.so.1: ELF file OS ABI invalid
> > 
> > From your kdump:
> > -----
> >  98302 googleearth-bin NAMI  "/compat/linux/lib/librt.so.1"
> >  98302 googleearth-bin NAMI  "/compat/linux"
> >  98302 googleearth-bin NAMI  "/compat/linux/lib/librt.so.1"
> >  98302 googleearth-bin RET   linux_open 3
> >  98302 googleearth-bin CALL  read(0x3,0xbfbfd92c,0x200)
> >  98302 googleearth-bin GIO   fd 3 read 512 bytes
> > [...]
> >  98302 googleearth-bin RET   read 512/0x200
> >  98302 googleearth-bin CALL  close(0x3)
> >  98302 googleearth-bin RET   close 0
> >  98302 googleearth-bin CALL  linux_open(0xbfbfd800,0,0x4805d5ab)
> >  98302 googleearth-bin NAMI  "/compat/linux/usr/lib/tls/librt.so.1"
> >  98302 googleearth-bin NAMI  "/usr/lib/tls/librt.so.1"
> >  98302 googleearth-bin RET   linux_open JUSTRETURN
> >  98302 googleearth-bin CALL  linux_open(0xbfbfd800,0,0x4805d5ab)
> >  98302 googleearth-bin NAMI  "/compat/linux/usr/lib/librt.so.1"
> >  98302 googleearth-bin NAMI  "/usr/lib/librt.so.1"
> >  98302 googleearth-bin RET   linux_open 3
> >  98302 googleearth-bin CALL  read(0x3,0xbfbfd92c,0x200)
> >  98302 googleearth-bin GIO   fd 3 read 512 bytes
> > [...]
> > -----
> > 
> > The linux library is found but not used. And then the native FreeBSD
> > one is got tried, hence the error occures. Sorry, but that seems to
> > be a symptom of linux.osrelease=2.6.16 requirement for those
> > applications to run.

> Actually, this is a known problem with linux_base-fc4 and 2.4.2
> emulation. It pops up on the mailinglists now and then so it's starting
> to become a faq.

> One of the solutions is to create a softlink:

> ln -f ../../lib/librt.so.1 /compat/linux/usr/lib/librt.so.1

> That way, the linux compat open(2) syscall never returns the FreeBSD
> librt.so.1 and the linker eventually finds the 2.4.2 compatible version
> /compat/linux/lib/obsolete/linuxthreads/librt.so.1.

But does it really helps to skype or googleearth?

> Somebody should at this to a post-install target in the port/package,
> because /compat/linux/bin/ls and some others are affected as well.

The case with linux bin/ls imho is an other one.  When you run
/compat/linux/bin/sh and run any command you don't get linux programs
running at the first place:
-----
% /compat/linux/bin/sh

bsam@.ipt.ru$ uname -a
Linux host.ipt.ru 2.6.16 FreeBSD 7.0-STABLE #2: Fri Apr 18 01:36:58 MSD 2008 i686 i686 i386 GNU/Linux

bsam@.ipt.ru$ file `which ls`
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 7.0 (700103), dynamically linked (uses shared libs), FreeBSD-style, stripped
-----

Compare to:
-----
% sudo chroot /compat/linux /bin/sh

sh-3.2# uname -a
Linux host.ipt.ru 2.6.16 FreeBSD 7.0-STABLE #2: Fri Apr 18 01:36:58 MSD 2008 i686 i686 i386 GNU/Linux

sh-3.2# file `which ls`
sh: which: command not found
sh: file: command not found
-----


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15571435>