[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compiling with gcj
From: |
Mark Wielaard |
Subject: |
Compiling with gcj |
Date: |
09 Jan 2002 14:16:17 +0100 |
Hi,
On Tue, 2002-01-08 at 22:20, Mark Wielaard wrote:
>
> I need the following patch to compile Classpath with gcj:
>
[...]
>
> Otherwise I get the following error (with gcj 3.0.3):
> make[1]: Entering directory `/home/mark/src/classpath/lib'
> /usr/bin/gcj -C -d . @classes
> ./../java/math/BigInteger.java:29: Can't find default package
> `gnu.java.math'. Check the CLASSPATH environment variable and the access
> to the archives.
> 1 error
So I tried with a recent gcj 3.1 (from cvs) but got a compile error
since that version of gcj has another idea of what the
Class.protectionDomain field should be. I can work around this by
renaming that field:
--- vm/reference/java/lang/Class.java 26 Jul 2001 22:56:11 -0000 1.12
+++ vm/reference/java/lang/Class.java 9 Jan 2002 13:05:34 -0000
@@ -51,7 +51,7 @@
public class Class {
private Object[] signers = null;
- private ProtectionDomain protectionDomain = null;
+ private ProtectionDomain pd = null;
// The unknown protection domain.
private final static ProtectionDomain unknownProtectionDomain;
@@ -529,10 +529,10 @@
if (sm != null)
sm.checkPermission(protectionDomainPermission);
- if (protectionDomain == null)
+ if (pd == null)
return unknownProtectionDomain;
else
- return protectionDomain;
+ return pd;
}
But then I get:
Making all in lib
make[1]: Entering directory `/home/mark/src/classpath/lib'
/usr/local/gcc-3.1/bin/gcj -C -d . @classes
./../java/util/LinkedHashMap.java:0: tree check: expected class 'd',
have 'x' (identifier_node) in check_inner_circular_reference, at
java/parse.y:5247
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
make[1]: *** [compile-classes] Error 1
make[1]: Leaving directory `/home/mark/src/classpath/lib'
make: *** [all-recursive] Error 1
Which gcj 3.0.3 seems to compile just fine.
The strange thing is that LinkedHashMap and HashMap are the same version
as in libgcj.
Is anybody else compiling Classpath with gcj?
Cheers,
Mark