This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [0.98 merge] FYI: More build fixes


2008/9/8 Andrew John Hughes <gnu_andrew@member.fsf.org>:
> This patch fixes a number of further issues found
> when trying to build the GCJ 0.98 merge tree.
>
> ChangeLog:
>
> 2008-09-04  Andrew John Hughes  <gnu_andrew@member.fsf.org>
>
>        * Makefile.in,
>        * classpath/configure: Regenerated.
>        * gnu/gcj/util/natDebug.cc,
>        * gnu/gcj/xlib/natColormap.cc,
>        * gnu/gcj/xlib/natDisplay.cc,
>        * gnu/gcj/xlib/natDrawable.cc,
>        * gnu/gcj/xlib/natFont.cc,
>        * gnu/gcj/xlib/natWMSizeHints.cc,
>        * gnu/gcj/xlib/natWindow.cc,
>        * gnu/gcj/xlib/natXImage.cc:
>        Add :: prefix to namespaces.
>        * java/io/CharArrayWriter.h,
>        * java/lang/StringBuffer.h:
>        Regenerated using patched gjavah.
>        * java/lang/natStringBuffer.cc:
>        Fix naming of append(jint).
>        * java/sql/Timestamp.h: Regenerated
>        using patched gjavah.
>        * jni.cc: Rename p to functions
>        to match change in GNU Classpath.
>        * scripts/makemake.tcl: Switch
>        gnu.java.math to BC compilation.
>        * sources.am: Regenerated.
>

Just realised how sparse on detail this mail was.  The actual changes are:

* Fixes to a number of CNI files to add the prefix '::' before the namespace
e.g. java::lang becomes ::java::lang.

This avoids failures such as:

/home/andrew/projects/classpath/gcj/sources/gcc/libjava/gnu/gcj/util/natDebug.cc:
In static member function 'static java::lang::Object*
gnu::gcj::util::Debug::getField(java::lang::Object*,
java::lang::reflect::Field*)':
/home/andrew/projects/classpath/gcj/sources/gcc/libjava/gnu/gcj/util/natDebug.cc:73:
error: expected type-specifier
/home/andrew/projects/classpath/gcj/sources/gcc/libjava/gnu/gcj/util/natDebug.cc:73:
error: cannot convert 'int*' to 'java::lang::Object*' in return
/home/andrew/projects/classpath/gcj/sources/gcc/libjava/gnu/gcj/util/natDebug.cc:73:
error: expected ';'
/home/andrew/projects/classpath/gcj/sources/gcc/libjava/gnu/gcj/util/natDebug.cc:73:
error: 'Double' is not a member of 'gnu::java::lang'

which was mentioned in http://gcc.gnu.org/ml/java/2008-09/msg00002.html

* gjavah was fixed in GNU Classpath to use the originating class
rather than the current
class when naming bridge methods.  The header files listed in this
patch are a result of
regenerating the headers with the patched gjavah.  The actual gjavah
will be merged into
the tree with other recent Classpath changes by Matthias Klose (doko).

See http://gcc.gnu.org/ml/java/2008-08/msg00060.html

* jni.cc was altered due to a change in jni.h made by
Christian Thalinger (twisti):

2008-06-23  Christian Thalinger  <twisti@complang.tuwien.ac.at>

        * include/jni.h [__cplusplus] (_Jv_JNIEnv): Renamed member p to
        functions to be compatible with OpenJDK.

* gnu.java.math: The build failed when this was compiled normally, as there
is no CNI code implementation of the GMP bindings.  As David Daney has
mentioned,
we perhaps need a target that just does JNI as opposed to CNI linking,
without also
using the BC ABI.

Hope that makes things clearer, and apologies for putting so many
issues in one patch.
-- 
Andrew :-)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net

PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]