From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21381 invoked by alias); 8 Apr 2011 09:18:40 -0000 Received: (qmail 21357 invoked by uid 22791); 8 Apr 2011 09:18:40 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_CX,TW_GC,TW_IB,TW_JL X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 08 Apr 2011 09:18:37 +0000 From: "blakawk at gentooist dot com" To: java-prs@gcc.gnu.org Subject: [Bug java/48515] New: [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: java X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: blakawk at gentooist dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 08 Apr 2011 09:18:00 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2011-q2/txt/msg00004.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48515 Summary: [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: java AssignedTo: unassigned@gcc.gnu.org ReportedBy: blakawk@gentooist.com When building cross gcj compiler for i686-w64-mingw32 target, libjava fails to compile with following errors: ../../../../sources/gcc-4.6-20110401/libjava/jni.cc: In function 'java::lang::Object* _Jv_JNI_ToReflectedField(JNIEnv*, jclass, jfieldID, jboolean)': ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1663:14: error: new declaration 'java::lang::Object* _Jv_JNI_ToReflectedField(JNIEnv*, jclass, jfieldID, jboolean)' ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Field.h:93:19: error: ambiguates old declaration 'java::lang::Object* _Jv_JNI_ToReflectedField(_Jv_JNIEnv*, jclass, jfieldID, jboolean)' ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Field.h:83:105: error: 'java::lang::Class* java::lang::reflect::Field::declaringClass' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1669:14: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Field.h:85:8: error: 'jint java::lang::reflect::Field::offset' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1670:14: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/Class.h:675:14: error: '_Jv_Field* java::lang::Class::fields' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1670:55: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Field.h:84:26: error: 'java::lang::String* java::lang::reflect::Field::name' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1671:14: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/jni.cc: In function 'java::lang::Object* _Jv_JNI_ToReflectedMethod(JNIEnv*, jclass, jmethodID, jboolean)': ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1694:15: error: new declaration 'java::lang::Object* _Jv_JNI_ToReflectedMethod(JNIEnv*, jclass, jmethodID, jboolean)' ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Method.h:78:19: error: ambiguates old declaration 'java::lang::Object* _Jv_JNI_ToReflectedMethod(_Jv_JNIEnv*, jclass, jmethodID, jboolean)' ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Constructor.h:19:3: error: 'java::lang::reflect::Constructor::Constructor()' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1706:41: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Constructor.h:56:8: error: 'jint java::lang::reflect::Constructor::offset' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1707:10: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/Class.h:666:17: error: '_Jv_Method* java::lang::Class::::methods' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1707:50: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Constructor.h:53:105: error: 'java::lang::Class* java::lang::reflect::Constructor::declaringClass' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1708:10: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Method.h:20:3: error: 'java::lang::reflect::Method::Method()' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1713:31: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Method.h:73:8: error: 'jint java::lang::reflect::Method::offset' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1714:10: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/Class.h:666:17: error: '_Jv_Method* java::lang::Class::::methods' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1714:50: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/java/lang/reflect/Method.h:64:105: error: 'java::lang::Class* java::lang::reflect::Method::declaringClass' is private ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:1715:10: error: within this context ../../../../sources/gcc-4.6-20110401/libjava/jni.cc: At global scope: ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:2891:1: error: invalid conversion from 'java::lang::Object* (*)(_Jv_JNIEnv*, jclass, jmethodID, jboolean)' to 'java::lang::Object* (*)(JNIEnv*, jclass, jmethodID, jboolean)' [-fpermissive] ../../../../sources/gcc-4.6-20110401/libjava/jni.cc:2891:1: error: invalid conversion from 'java::lang::Object* (*)(_Jv_JNIEnv*, jclass, jfieldID, jboolean)' to 'java::lang::Object* (*)(JNIEnv*, jclass, jfieldID, jboolean)' [-fpermissive] This is because in jni.cc, _Jv_JNI_ToReflectedField and _Jv_JNI_ToReflectedMethod are defined using JNICALL macro, while they are defined in java/lang/reflect/Method.h and java/lang/reflect/Field.h without. The GCC snapshot used for this build was: 4.6-20110401 The configure command line used was: configure --prefix=/users_csee/parizet/test/root --with-sysroot=/users_csee/parizet/test/root --disable-multilib --with-mpfr=/users_csee/parizet/test/root --with-mpc=/users_csee/parizet/test/root --with-gmp=/users_csee/parizet/test/root --disable-shared --enable-threads=win32 --disable-tls --disable-__cxa_atexit --enable-languages=c,c++,java --enable-libssp --disable-win32-registry --disable-nls --disable-lto --enable-libgcj --enable-sjlj-exceptions --target=i686-w64-mingw32 --build=i386-redhat-linux