From owner-freebsd-java@FreeBSD.ORG Sun Aug 5 09:14:34 2007 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2AA9216A420 for ; Sun, 5 Aug 2007 09:14:34 +0000 (UTC) (envelope-from lists_freebsd_org@07.antispam.web-wahnsinn.de) Received: from smtprelay04.ispgateway.de (smtprelay04.ispgateway.de [80.67.18.16]) by mx1.freebsd.org (Postfix) with ESMTP id A03AE13C459 for ; Sun, 5 Aug 2007 09:14:33 +0000 (UTC) (envelope-from lists_freebsd_org@07.antispam.web-wahnsinn.de) Received: (qmail 12587 invoked from network); 5 Aug 2007 08:47:47 -0000 Received: from unknown (HELO [192.168.3.5]) (023415@[217.95.65.29]) (envelope-sender ) by smtprelay04.ispgateway.de (qmail-ldap-1.03) with SMTP; 5 Aug 2007 08:47:47 -0000 From: Tobias Grosser To: freebsd-java@freebsd.org, freebsd-current@freebsd.org Content-Type: text/plain Date: Sun, 05 Aug 2007 10:47:46 +0200 Message-Id: <1186303666.36623.23.camel@tobias.wg.> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Subject: Gcc bugs break java/jdk15 build? [Workaround] X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lists_freebsd_org@07.antispam.web-wahnsinn.de List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Aug 2007 09:14:34 -0000 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