googleearth & skype trouble
Tijl Coosemans
tijl at ulyssis.org
Sat Apr 19 19:07:52 UTC 2008
On Saturday 19 April 2008 18:50:28 Boris Samorodov wrote:
> On Sat, 19 Apr 2008 17:46:11 +0200 Tijl Coosemans wrote:
>> 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?
I don't know, but they'll at least get past this problem.
>> 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:
Under linux sh you do get linux programs when they exist. Running ls or
any shell script (like Maple/Matlab/... install and startup scripts)
under linux /bin/sh currently does not work with fc4 and
osrelease=2.4.2.
This is not really a bug of linux compat, but is because of the
following:
1. opening /path/to/somefile under linux compat first tries
/compat/linux/path/to/somefile then /path/to/somefile.
2. linux binaries have two search paths for librt.so.1:
/lib and /usr/lib.
3. fc4 has a librt.so.1 in /lib but it is rejected under 2.4.2
emulation.
4. fc4 does not have a librt.so.1 under /usr/lib so when the runtime
linker tries this search path it ends up opening FreeBSD
/usr/lib/librt.so.1 (because of point 1) and fails.
By adding a softlink in /compat/linux/usr/lib to the librt.so.1 in
/compat/linux/lib, the linker doesn't open the FreeBSD librt.so.1
anymore. Instead, under 2.4.2, it rejects this lib and then tries an
internal search path /lib/obsolete/linuxthreads where it finds the
correct version. Under 2.6.16 the softlink doesn't change anything,
so imho this is something the fc4 port/package should deal with.
> -----
> % /compat/linux/bin/sh
>
> bsam at .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 at .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
> -----
Both file and which here are FreeBSD binaries so you're not under
linux compat. FreeBSD file ends up opening FreeBSD /bin/ls. If there
were a linux "file" binary, "file /bin/ls" would open
/compat/linux/bin/ls.
More information about the freebsd-emulation
mailing list