Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2007 09:34:50 -0500 (CDT)
From:      "Sean C. Farley" <sean-freebsd@farley.org>
To:        Alexander Leidinger <Alexander@leidinger.net>
Cc:        freebsd-emulation@freebsd.org
Subject:   Re: Library loading problem for Linux applications
Message-ID:  <20070615091939.R3789@thor.farley.org>
In-Reply-To: <20070615074959.e18is1dass88wwso@webmail.leidinger.net>
References:  <20070614152441.C1140@baba.farley.org> <20070615074959.e18is1dass88wwso@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Jun 2007, Alexander Leidinger wrote:

> Quoting "Sean C. Farley" <sean-freebsd@farley.org> (from Thu, 14 Jun 2007 
> 15:40:40 -0500 (CDT)):
>
>> Since the xorg 7.2 upgrade, I have been unable to run games/linux-ut
>> (maintainer is yours truly).  I believe it to be the way the
>> libraries are being loaded that is causing the problem.
>> 
>> If I try to run the ut (shell script that runs ut-bin), I believe
>> SDLDrv.so is having trouble finding the Linux libXext.so.6.

*snip*

>> What is the correct solution to have the Linux application search all
>> relevant directories in /compat first?  LD_LIBRARY_PATH is ignored by
>
> That's the default.
>
>> these open() calls.  The nVidia libGL.so.1 is installed in
>> /compat/linux/usr/lib.
>
> Do you have the right ld.so.conf (LINUXBASE/etc/) and
> ld.so.conf.d/xorg-x11-i386.conf? The linux ldconfig has to be run
> (chrooted).  To be on the safe side remove all linux ports, clean
> /compat/linux, and resinstall the linux ports. Currently it sounds
> like a ldconfig problem...

I found no luck with a reinstall.  It is still loading the wrong
libXext.so.6:

34123 ut-bin   CALL  linux_open(0xbfbfc5c0,0,0x287068ab)
34123 ut-bin   NAMI  "./tls/libXext.so.6"
34123 ut-bin   RET   linux_open JUSTRETURN
34123 ut-bin   CALL  linux_open(0xbfbfc5c0,0,0x287068ab)
34123 ut-bin   NAMI  "./libXext.so.6"
34123 ut-bin   RET   linux_open JUSTRETURN
34123 ut-bin   CALL  linux_open(0xbfbfc5c0,0,0x287068ab)
34123 ut-bin   NAMI  "/compat/linux/usr/local/lib/tls/libXext.so.6"
34123 ut-bin   NAMI  "/usr/local/lib/tls/libXext.so.6"
34123 ut-bin   RET   linux_open JUSTRETURN
34123 ut-bin   CALL  linux_open(0xbfbfc5c0,0,0x287068ab)
34123 ut-bin   NAMI  "/compat/linux/usr/local/lib/libXext.so.6"
34123 ut-bin   NAMI  "/usr/local/lib/libXext.so.6"
34123 ut-bin   RET   linux_open 7

# cat /compat/linux/etc/ld.so.conf
include ld.so.conf.d/*.conf
/lib
/usr/lib
/usr/local/lib

# cat /compat/linux/etc/ld.so.conf.d/xorg-x11-i386.conf
/usr/X11R6/lib

Interestingly, if I remove /usr/local/lib from ld.so.conf and run
/etc/rc.d/abi restart, ut-bin still finds libXext.so.6 in
/usr/local/lib.  Strings on ld.so.cache shows that libXext.so.6 is only
in /usr/X11R6/lib.  It appears to be ignoring the cache.  I think ut-bin
is resetting the search path.  strings of the binary does show a
".:/usr/local/lib" in the output.  This may be why creating the link to
X11R6 from local helped it get further.  I will have to try to find a
way to convince it to stop doing this.

Sean
-- 
sean-freebsd@farley.org



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