Subject: LD_PRELOAD and firefox-bin-linux
To: None <>
From: =?UTF-8?Q?C=C3=A9sar_Catri=C3=A1n?= C. <>
List: tech-pkg
Date: 07/06/2005 17:43:24

I am trying to get audiooss to work for use with NAS for firefox and flash plugin,
by installing libnas and audiooss in RPMS into the linux emulation tree, using
firefox and libs from pkgsrc.

The audiooss lib is used as a client for a NAS server, for all applications that
make use of OSS.

I am not sure about the right way to preload the library. In linux is just

$ LD_PRELOAD=/location/ exec firefox

but I can't get it to work using our linux emulation layer.

$ LD_PRELOAD=/emul/linux/usr/lib/audiooss/ /emul/linux/bin/sh /usr/pkg/bin/firefox-gtk2-linux 
Shared object "" not found

$ ls -l /emul/linux/usr/X11R6/lib/
lrwxr-xr-x  1 root  wheel  15 Jul  5 14:36 /emul/linux/usr/X11R6/lib/ ->
cetrox@core $ ls -l /emul/linux/usr/X11R6/lib/
-rwxr-xr-x  1 root  wheel  90376 Jul  5 14:36 /emul/linux/usr/X11R6/lib/

If I add the paths /emul/linux/usr/X11R6/lib and /emul/linux/lib to the LD_LIBRARY_PATH 
variable the operation ends with a segmentation fault.

$ LD_PRELOAD=/emul/linux/usr/lib/audiooss/ /emul/linux/bin/sh /usr/pkg/bin/firefox-gtk2-linux
zsh: segmentation fault  LD_PRELOAD=/emul/linux/usr/lib/audiooss/ /emul/linux/bin/sh

Which is the right way to go?

Thanks in advance.

César Catrián C.