i386 jvm on an amd64...
    Arne H. Juul 
    arnej at pvv.ntnu.no
       
    Fri Mar 30 22:22:32 UTC 2007
    
    
  
On Fri, 30 Mar 2007, David E. Cross wrote:
> (this is with ports built jdk1.5.0-p4)
and FreeBSD 6.x, I'm guessing?
> I am trying to run an i386 jvm on an amd64 architecture (and installed as 
> such machine).  I get 2 classes of problems, the first is where it is
> unable (for an unknown reason) to find the libjvm.so file.
this I think is because when running a 32-bit binary on a 64-bit machine,
it will use /libexec/ld-elf32.so.1 as the runtime linker, and that will
use LD_32_LIBRARY_PATH instead of the normal LD_LIBRARY_PATH that the
java main program.  So when java figures out where the libraries are,
it sets LD_LIBRARY_PATH in the environment and exec(2)'s itself, but
that doesn't actually work.  I don't know of any good solution to this,
only a couple of workarounds; doing ldconfig -32 -m is probably the
easiest for now.
> I have fixed this 
> via an ldconfig -32 -m .... and the next is libverify.so which I also address 
> via a ldconfig -32 -m.. at that point however the java process simply 
> segfaults.
I actually tried this very recently and found that the system calls
that the pthread library use on FreeBSD 6 aren't properly translated
between a 64-bit kernel and 32-bit userland, so it overwrites parts
of the thread library and crashes in spectacular ways.
I don't have the know-how to fix the sys/compat/freebsd32 stuff to
include all the various kse_* and thr_* system calls properly, I'll
leave that to the FreeBSD kernel people...
   -  Arne H. J.
    
    
More information about the freebsd-java
mailing list