On Sat, 28 Dec 2002, [ISO-8859-1] Mikko Työläjärvi wrote:

> On Sat, 28 Dec 2002, Adam K Kirchhoff wrote:
>
> > Hey folks,
> >
> >     I'm noticing some odd behaviour with the linux compatability
> > recently.  I have this small gnome app called gnome-run.  It links against
> > a number of gnome libraries that I've copied from my linux partition over
> > to /compat/linux and put in the appropriate directories.
> >
> >     The problem is, when executing this app, the linker seems to try
> > and load the libaudiofile.so.0 file from my FreeBSD installation instead
> > of my /compat/linux installation.  When running gnome-run it only does
> > this for that one library (though other apps have shown this to be a
> > problem with other libraries such as libgmodule-2.0.so.0,
> > libglib-2.0.so.0, and libgobject-2.0.so.0)
> >
> >     This is what happens when I try to launch "gnome-run" from an
> > xterm:
> >
> > [ adamk@sorrow ~ ]$ gnome-run
> > gnome-run: error while loading shared libraries:
> > /usr/local/lib/libaudiofile.so.0: ELF file OS ABI invalid
> >
> >     Well, of course the OS ABI is invalid.  The libaudiofile library
> > it's trying to load is for FreeBSD, not Linux.  But, if I move the
> > libaudiofile.so.0 file from /usr/local/lib to /usr/local/lib/old, and
> > try to launch gnome-run, everything works fine.  So, if the FreeBSD
> > version of the library isn't present, it then looks for the Linux version.
> >
> >     Any ideas what's going on or how to fix this?
>
> Run "/compat/linux/sbin/ldconfig".  That should update the path cache
> of the (linux) dynamic linker.

Didn't help :-(

> I assume the permissions on the libs already are reasonable.

[ adamk@sorrow ~ ]$ ls -l /compat/linux/usr/lib/libaudiofile.so.0*
lrwxr-xr-x  1 root  wheel      21 Dec 28 14:33
/compat/linux/usr/lib/libaudiofile.so.0 -> libaudiofile.so.0.0.2
-rwxr-xr-x  1 root  wheel  158396 Dec 28 14:33
/compat/linux/usr/lib/libaudiofile.so.0.0.2

Solved it!

It's LD_LIBRARY_PATH.  If you have the same FreeBSD library in your
LD_LIBRARY_PATH, it tries to use that library instead of the linux one :-)

Mikko, thanks for your help.  It was your tip on permissions that got me
to try the app as root.  When I saw that they worked as root, I realized
it had to be something in my environment.

Adam


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to