Gcc bugs break java/jdk15 build? [Workaround]

From: Tobias Grosser <lists_freebsd_org_at_07.antispam.web-wahnsinn.de>
Date: Sun, 05 Aug 2007 10:47:46 +0200
Hi,

since the last gcc import (Update to 4.2)  I had problems to compile
java/jdk15 (using linux-sun-jdk14/15 and diablo-jdk15), because often
the linux-sun-jdk crashed or I got the following errors:  

../../../../../src/share/classes/sun/security/util/SignatureFileVerifier.java:22: cannot find symbol
symbol  : class timestamp
location: package sun.security
import sun.security.timestamp.TimestampToken;
                    ^
../../../../../src/share/classes/sun/security/provider/X509Factory.java:17: cannot find symbol
symbol  : class certpath
location: package sun.security.provider
import sun.security.provider.certpath.X509CertPath;
                             ^
../../../../../src/share/classes/sun/security/provider/X509Factory.java:18: cannot find symbol
symbol  : class certpath
location: package sun.security.provider
import sun.security.provider.certpath.X509CertificatePair;
                             ^
../../../../../src/share/classes/java/security/Signature.java:21: cannot find symbol
symbol  : class crypto
location: package javax
import javax.crypto.Cipher;
             ^
../../../../../src/share/classes/java/security/Signature.java:22: cannot find symbol
symbol  : class crypto
location: package javax
import javax.crypto.CipherSpi;
             ^
../../../../../src/share/classes/java/security/Signature.java:23: cannot find symbol
symbol  : class crypto
location: package javax
import javax.crypto.IllegalBlockSizeException;
             ^
../../../../../src/share/classes/java/security/Signature.java:24: cannot find symbol
symbol  : class crypto
location: package javax
import javax.crypto.BadPaddingException;
             ^
../../../../../src/share/classes/java/security/Signature.java:25: cannot find symbol
symbol  : class crypto
location: package javax
import javax.crypto.NoSuchPaddingException;
             ^
../../../../../src/share/classes/java/security/Signature.java:1179: cannot find symbol
symbol  : class Cipher
location: class java.security.Signature.CipherAdapter
        private final Cipher cipher;
                      ^
../../../../../src/share/classes/java/security/Signature.java:1183: cannot find symbol
symbol  : class Cipher
location: class java.security.Signature.CipherAdapter
        CipherAdapter(Cipher cipher) {
                      ^
../../../../../src/share/classes/java/lang/reflect/AccessibleObject.java:131: missing return value
        return override;
        ^
I tried the update to gcc 4.2.1 (http://people.freebsd.org/~kan/contrib-gcc421.tar.gz),
but the build also breaks. (I am not sure, if it was the same error)
The solution I found was to decrease optimization by replacing every occurence of "-O2" or "-O3"
in the files:
- ports/java/jdk15/work/j2se/make/common/Defs-bsd.gmk
- ports/java/jdk15/work/hotspot/build/bsd/makefiles/gcc.make
with "-O1" and bootstrap using linux-sun-jdk15.

With decreased optimization the jdk15 port compiles fine.

I tried to compile the jdk15 with optimization using the new compiled java/jdk15 to bootstrap, but again
the compile errors from above broke the build. With decreased opimization it works again.

Bye Tobias
Received on Sun Aug 05 2007 - 07:14:31 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC