public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/48515] New: [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target
@ 2011-04-08  9:18 blakawk at gentooist dot com
  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
  0 siblings, 2 replies; 3+ messages in thread
From: blakawk at gentooist dot com @ 2011-04-08  9:18 UTC (permalink / raw)
  To: java-prs

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug java/48515] [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target
  2011-04-08  9:18 [Bug java/48515] New: [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target blakawk at gentooist dot com
@ 2011-04-12 10:52 ` ktietz at gcc dot gnu.org
  2012-01-10 15:09 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-04-12 10:52 UTC (permalink / raw)
  To: java-prs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48515

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2011.04.12 10:52:07
                 CC|                            |ktietz at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #2 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-04-12 10:52:07 UTC ---
Bug is fixed on trunk. Not sure if java-maintainer want a back-merge of it to
4.6


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug java/48515] [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target
  2011-04-08  9:18 [Bug java/48515] New: [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target blakawk at gentooist dot com
  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
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-10 15:09 UTC (permalink / raw)
  To: java-prs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48515

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-01-10 15:08:40 UTC ---
No (java is mostly unmaintained).


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-01-10 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08  9:18 [Bug java/48515] New: [4.6] GCJ fails to compile jni.cc because of reflection errors on i686-w64-mingw32 target blakawk at gentooist dot com
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

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).