2008/7/2 Andrew Haley <aph(a)redhat.com>:
Mary Ellen Foster wrote:
> - the "configure" script followed symlinks from javac to find the JNI
> include dir. Since the symlinks for gcj ground out at /usr/bin/ecj, it
> ended up looking for /usr/include/jni.h.
Hmm. This package assumes that the chain of symlinks ends at the installed
binary, which must be in the jdk dir.
/usr/bin/javac -->
/etc/alternatives/javac -->
/usr/lib/jvm/java-1.4.2-gcj/bin/javac -->
/usr/bin/ecj
?
Yes. The comment in the configure script says "find the include
directory relative to the javac executable", and it loops through
links until it finds an actual binary. I hacked it for the moment by
adding
if [ `basename $_slink` = "ecj" ]; then break; fi
(where $_slink is the target of the current link) and it seems to work fine.
> But I'm not sure if I want to make these modifications to the
package.
> If I build a JNI program against gcj, can the resulting .so be used
> with Sun-like JVMs? How does this work? Is it documented anywhere?
I think so.
Hmm. Maybe I'll give that a try this afternoon then.
Thanks,
MEF
--
Mary Ellen Foster --
http://homepages.inf.ed.ac.uk/mef/
Informatik 6: Robotics and Embedded Systems, Technische Universität München
and ICCS, School of Informatics, University of Edinburgh