On Saturday 21 June 2008, Peter Samuelson wrote: > Debian's default Java build environment, at least on most platforms, > takes 'javac' from ecj (the Eclipse Java compiler from Sun)
I hate to be pedantic, but ecj is from the Eclipse project, which not affiliated with Sun. > and 'javah' from gcj (from gcc). The libsvn-java build process calls > javah to generate some C++ header files to be used in the JNI. But gcj > javah does not produce all the same filenames that Sun's javah produces. > For example, given the source file: > > org/tigris/subversion/javahl/ConflictDescriptor.java > > Sun javac produces: > > org/tigris/subversion/javahl/ConflictDescriptor.class > > and from that, Sun javah produces: > > org_tigris_subversion_javahl_ConflictDescriptor.h > org_tigris_subversion_javahl_ConflictDescriptor_Action.h > org_tigris_subversion_javahl_ConflictDescriptor_Kind.h > org_tigris_subversion_javahl_ConflictDescriptor_Reason.h > > However, the ecj version of javac produces four separate files, because > there are some nested classes: > > org/tigris/subversion/javahl/ConflictDescriptor.class > org/tigris/subversion/javahl/ConflictDescriptor$Action.class > org/tigris/subversion/javahl/ConflictDescriptor$Kind.class > org/tigris/subversion/javahl/ConflictDescriptor$Reason.class Huh? Sun javac somehow doesn't produce additional class files for nested classes?? Are you sure about that? That sounds very incorrect. > and if you run javah from gcj on those: > > org_tigris_subversion_javahl_ConflictDescriptor.h > org_tigris_subversion_javahl_ConflictDescriptor$Action.h > org_tigris_subversion_javahl_ConflictDescriptor$Kind.h > org_tigris_subversion_javahl_ConflictDescriptor$Reason.h Oh great. Perhaps you could write a script that renames generated header files containing $ in their name, replacing $ with _? Said script would probably have to search through the contents of those generated files, looking for instances of those filenames and rewriting them as well. I think some JNI headers #include each other, but I honestly don't remember. > So, I have to work through the build scripts and source code to figure > out how to reconcile this mess. And once I've done that, I still don't > know if that is the only problem with the Java bindings. I certainly hope so. Please do let us know if you run into any more perplexing problems.
signature.asc
Description: This is a digitally signed message part.