Subject: Libs for blackdown java not found - linux emu problem
To: None <netbsd-users@NetBSD.org>
From: Alex Sorg <AlexSorg@gmx.de>
List: netbsd-users
Date: 06/13/2004 22:25:03
Hi!

On my NetBSD-2.0_Beta I have problems setting up the
blackdown-jre13-1nb1 packet for java in mozilla 1.6 (also from pkgsrc). 
Mozilla finds the plugin (symlink in mozilla/plugins/) but can't 
initialise it with the following error:

   LoadPlugin: failed to initialize shared library
   /usr/pkg/java/blackdown-1.3.1/plugin/i386/mozilla/javaplugin_oji.so
   [Shared object "libxpcom.so" not found]

It took me some time to set up the libs for the linux emu, and finally
I get this from the linux ldd:

dana:/usr/pkg/lib/mozilla/plugins% /emul/linux/usr/bin/ldd 
javaplugin.oji.so
ldd: warning: you do not have execution permission for `./javaplugin.oji.so'
         libxpcom.so => /usr/pkg/OpenOffice.org1.1.0/program/libxpcom.so 
(0x4006f000)
         libnspr4.so => /usr/pkg/OpenOffice.org1.1.0/program/libnspr4.so 
(0x40161000)
         libgtk-1.2.so.0 => not found
         libgdk-1.2.so.0 => not found
         libgmodule-1.2.so.0 => not found
         libglib-1.2.so.0 => not found
         libdl.so.2 => /lib/libdl.so.2 (0x40191000)
         libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40195000)
         libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x4019d000)
         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x401ab000)
         libm.so.6 => /lib/libm.so.6 (0x4028e000)
         libc.so.6 => /lib/libc.so.6 (0x402b0000)
         libplds4.so => /usr/pkg/OpenOffice.org1.1.0/program/libplds4.so 
(0x403d7000)
         libplc4.so => /usr/pkg/OpenOffice.org1.1.0/program/libplc4.so 
(0x403da000)
         libpthread.so.0 => /lib/libpthread.so.0 (0x403df000)
         libstdc++.so.5 => 
/usr/pkg/OpenOffice.org1.1.0/program/libstdc++.so.5 (0x403f5000)
         libgcc_s.so.1 => 
/usr/pkg/OpenOffice.org1.1.0/program/libgcc_s.so.1 (0x40460000)
         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x00000000)
dana:/usr/pkg/lib/mozilla/plugins% cd ..
dana:/usr/pkg/lib/mozilla% mozilla

As far as I understand, the xpcom lib can be found from the linux 
dynamic linker. So here are my two questions:

1. Why is the xpcom lib not found at mozilla startup?
2. How (if!) can a NetBSD binary use a Linux library?
2b. Do I have to use a linux mozilla to use java?

Kind regards,

Alex.