public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "blakawk at gentooist dot com" <gcc-bugzilla@gcc.gnu.org>
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
Date: Fri, 08 Apr 2011 09:18:00 -0000	[thread overview]
Message-ID: <bug-48515-8172@http.gcc.gnu.org/bugzilla/> (raw)

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::<anonymous union>::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::<anonymous union>::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


             reply	other threads:[~2011-04-08  9:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-08  9:18 blakawk at gentooist dot com [this message]
2011-04-12 10:52 ` [Bug java/48515] " ktietz at gcc dot gnu.org
2012-01-10 15:09 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-48515-8172@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).