Library loading problem for Linux applications
Sean C. Farley
sean-freebsd at farley.org
Fri Jun 15 14:35:07 UTC 2007
On Fri, 15 Jun 2007, Alexander Leidinger wrote:
> Quoting "Sean C. Farley" <sean-freebsd at 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 at farley.org
More information about the freebsd-emulation
mailing list