Bug 38892 - gcc 4.4.0 20090104 - natVMVirtualMachine.cc:903: error: request for member 'frame_type' in ...
Summary: gcc 4.4.0 20090104 - natVMVirtualMachine.cc:903: error: request for member 'f...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.4.0
: P3 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 30570 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-17 04:43 UTC by Rob
Modified: 2009-08-21 02:23 UTC (History)
2 users (show)

See Also:
Host: i386-pc-solaris2.11
Target: i386-pc-solaris2.11
Build: i386-pc-solaris2.11
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Fix debug asserts. (479 bytes, patch)
2009-04-22 11:22 UTC, Dave Korn
Details | Diff
Part two of fix (3.67 KB, patch)
2009-04-22 22:38 UTC, Dave Korn
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob 2009-01-17 04:43:09 UTC
When making gcc 4.4.0 20090104 I saved a log of the build. I hacked
this Bug to allow the build to continue but did not file until today
when I noticed that this still occurs in gcc  version 4.4.0 20090117 .

# prev-gcc/xgcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc_trunk/configure --enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --enable-shared --disable-static --enable-decimal-float --with-long-double-128 --enable-nls --with-included-gettext --enable-gather-detailed-mem-stats --with-stabs --enable-debug --enable-largefile --enable-symvers --without-system-zlib --enable-gtk-cairo --enable-gconf-peer --enable-xmlj --enable-gtk-peer --enable-qt-peer --enable-plugin --enable-tool-wrappers --enable-local-sockets --enable-gjdoc --enable-java-awt=gtk,xlib,qt,x --enable-gc-debug --enable-libgcj-debug --enable-objc-gc --enable-libstdcxx-debug --disable-stage1-checking --enable-checking=release --without-system-libunwind --with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 4.4.0 20090117 (experimental) [trunk revision 143454] (GCC) 


# gmake
(hours later)
...
libtool: compile:  /usr/share/src/gcc_build/./gcc/xgcc -shared-libgcc -B/usr/share/src/gcc_build/./gcc -nostdinc++ -L/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libstdc++-v3/src -L/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libstdc++-v3/src/.libs -B/usr/local/i386-pc-solaris2.11/bin/ -B/usr/local/i386-pc-solaris2.11/lib/ -isystem /usr/local/i386-pc-solaris2.11/include -isystem /usr/local/i386-pc-solaris2.11/sys-include -m64 -DHAVE_CONFIG_H -I. -I../../../../gcc_trunk/libjava -I./include -I./gcj -I../../../../gcc_trunk/libjava -Iinclude -I../../../../gcc_trunk/libjava/include -I../../../../gcc_trunk/libjava/classpath/include -Iclasspath/include -I../../../../gcc_trunk/libjava/classpath/native/fdlibm -I../../../../gcc_trunk/libjava/../boehm-gc/include -I../boehm-gc/include -I../../../../gcc_trunk/libjava/libltdl -I../../../../gcc_trunk/libjava/libltdl -I../../../../gcc_trunk/libjava/.././libjava/../gcc -I../../../../gcc_trunk/libjava/../zlib -I../../../../gcc_trunk/libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -Wswitch-enum -D_FILE_OFFSET_BITS=64 -ffloat-store -fomit-frame-pointer -Usun -Wextra -Wall -D_GNU_SOURCE "-DPREFIX=\"/usr/local\"" "-DTOOLEXECLIBDIR=\"/usr/local/lib/amd64\"" "-DJAVA_HOME=\"/usr/local\"" "-DBOOT_CLASS_PATH=\"/usr/local/share/java/libgcj-4.4.0.jar\"" "-DJAVA_EXT_DIRS=\"/usr/local/share/java/ext\"" "-DGCJ_ENDORSED_DIRS=\"/usr/local/share/java/gcj-endorsed\"" "-DGCJ_VERSIONED_LIBDIR=\"/usr/local/lib/amd64/gcj-4.4.0-10\"" "-DPATH_SEPARATOR=\":\"" "-DECJ_JAR_FILE=\"\"" "-DLIBGCJ_DEFAULT_DATABASE=\"/usr/local/lib/amd64/gcj-4.4.0-10/classmap.db\"" "-DLIBGCJ_DEFAULT_DATABASE_PATH_TAIL=\"gcj-4.4.0-10/classmap.db\"" -g -O2 -m64 -MT gnu/classpath/jdwp/natVMVirtualMachine.lo -MD -MP -MF gnu/classpath/jdwp/.deps/natVMVirtualMachine.Tpo -c ../../../../gcc_trunk/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc  -fPIC -DPIC -o gnu/classpath/jdwp/.libs/natVMVirtualMachine.o
../../../../gcc_trunk/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc: In function 'void handle_single_step(jvmtiEnv*, step_info*, java::lang::Thread*, _Jv_Method*, jlocation)':
../../../../gcc_trunk/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc:903: error: request for member 'frame_type' in 'thread->java::lang::Thread::frame', which is of non-class type 'gnu::gcj::RawData*'
../../../../gcc_trunk/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc: In function 'void jdwpBreakpointCB(jvmtiEnv*, JNIEnv*, java::lang::Thread*, _Jv_Method*, jlocation)':
../../../../gcc_trunk/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc:960: error: request for member 'frame_type' in 'thread->java::lang::Thread::frame', which is of non-class type 'gnu::gcj::RawData*'
gmake[5]: *** [gnu/classpath/jdwp/natVMVirtualMachine.lo] Error 1
gmake[5]: Leaving directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/amd64/libjava'
gmake[3]: *** [multi-do] Error 1
gmake[3]: Leaving directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/libjava'
gmake[2]: *** [all-multi] Error 2
gmake[2]: Leaving directory `/usr/share/src/gcc_build/i386-pc-solaris2.11/libjava'
gmake[1]: *** [all-target-libjava] Error 2
gmake[1]: Leaving directory `/usr/share/src/gcc_build'
gmake: *** [all] Error 2


My hack was to simply comment out the offending lines:

// 903  JvAssert (thread->frame.frame_type == frame_interpreter);

// 960  JvAssert (thread->frame.frame_type == frame_interpreter);



Thanks,
Rob
Comment 1 Rob 2009-01-23 22:31:52 UTC
The adding of these assertions to replace an error message might have been
first discussed here: http://gcc.gnu.org/ml/java-patches/2007-q1/msg00478.html

Rob
Comment 2 Rob 2009-01-27 15:13:44 UTC
Same issue on Fedora 10

# ../gcc_build/gcc/xgcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../gcc_trunk/configure --enable-languages=c,c++,fortran,java,objc,obj-c++ --enable-shared --disable-static --enable-decimal-float --with-long-double-128 --enable-nls --with-included-gettext --disable-gather-detailed-mem-stats --with-stabs --enable-debug --enable-symvers --enable-version-specific-runtime-libs --without-system-zlib --enable-gtk-cairo --enable-gconf-peer --enable-xmlj --enable-gtk-peer --enable-plugin --enable-tool-wrappers --enable-portable-native-sync --enable-hash-synchronization --enable-interpreter --enable-local-sockets --enable-gjdoc --enable-java-awt=gtk,xlib,x --enable-gc-debug --enable-libgcj-debug --enable-objc-gc --disable-concept-checks --enable-libstdcxx-debug --disable-stage1-checking --enable-checking=release --with-tune=k8 --with-cpu=k8 --with-arch=k8 --enable-__cxa_atexit --disable-libunwind-exceptions --disable-dssi --enable-libgcj-multifile --build=i386-redhat-linux --prefix=/mnt/drive2/gcc_test --with-cloog=/usr/local
Thread model: posix
gcc version 4.4.0 20090126 (experimental) [trunk revision 143680] (GCC) 


After applying the same fix as used for OpenSolaris the build continued.

Rob
Comment 3 Rob 2009-01-30 04:31:55 UTC
The building of Language Java is broken on (at least) two platforms.

Checking http://gcc.gnu.org/ml/gcc-testresults/2009-01/ it seems to
work on some other platforms. I'll investigate if it is my ./configure .

Rob
Comment 4 Rob 2009-01-31 14:34:09 UTC
Building trunk revision 143817 on i386-pc-solaris2.11 works, with fewer options:

# gcc/xgcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc_trunk/configure --enable-languages=ada,c,c++,fortran,java,objc,obj-c++ --enable-shared --disable-static --enable-decimal-float --with-long-double-128 --with-included-gettext --enable-stage1-checking --enable-checking=release --with-tune=k8 --with-cpu=k8 --with-arch=k8 --with-gnu-as --with-as=/usr/local/bin/as --with-gnu-ld --with-ld=/usr/local/bin/ld
Thread model: posix
gcc version 4.4.0 20090131 (experimental) [trunk revision 143817] (GCC) 


When I updated from 143454 / 143680 (broken?) to 143817 (builds OK) I
did not notice any updates to Java that would fix this so I am assuming
that the additional ./configure options caused the breakage.

I will add back in more options on the next build and see it I can
find which one is causing the fault. Suspect the created namespaces
file is missing a few lines, investigating ...

Rob

Comment 5 Dave Korn 2009-04-22 11:20:45 UTC
  Hi Rob,

  I just ran into this on i686-pc-cygwin.  I think the reason you see it on some builds and not others is because of the "--enable-libgcj-debug" option; presumably that makes the asserts disappear when disabled, equivalent to your commenting them out.

  However, it would be nice to keep the debug verification in there if possible.  I'm testing a fix.
Comment 6 Dave Korn 2009-04-22 11:22:18 UTC
Created attachment 17671 [details]
Fix debug asserts.

Adjust the assert to test the casted pointer.
Comment 7 Dave Korn 2009-04-22 11:24:45 UTC
That gets me about three files further through the build, then there's another failure:

In file included from /gnu/gcc/gcc/libjava/gnu/classpath/natConfiguration.cc:17:
/gnu/gcc/gcc/libjava/gnu/classpath/Configuration.h:32: error: expected unqualified-id before numeric constant
make[3]: *** [gnu/classpath/natConfiguration.lo] Error 1

That line says:

  static jboolean DEBUG;

so I guess DEBUG is probably a #define somewhere and it's turning into 

  static jboolean 1;

or something like that, I'll do some digging.

  Meantime, there's always the --disable workaround.
Comment 8 Dave Korn 2009-04-22 11:34:36 UTC
  Yep.  From the .ii file:


class gnu::classpath::Configuration : public ::java::lang::Object
{

  Configuration();
  static ::java::lang::String * classpath_home();
  static jboolean debug();
  static ::java::lang::String * toolkit();
  static ::java::lang::String * ecj();
public:
  static ::java::lang::String * CLASSPATH_HOME;
  static ::java::lang::String * CLASSPATH_VERSION;
  static jboolean 1;
  static const jboolean INIT_LOAD_LIBRARY = 0;
  static ::java::lang::String * default_awt_peer_toolkit;
  static const jboolean JAVA_LANG_SYSTEM_EXPLICIT_INITIALIZATION = 0;
  static ::java::lang::String * ECJ_JAR;
  static const jboolean WANT_NATIVE_BIG_INTEGER = 1;
  static ::java::lang::Class class$;
};
# 18 "/gnu/gcc/gcc/libjava/gnu/classpath/natConfiguration.cc" 2


Will look at whether we should not #define DEBUG in the first place, or more likely it would be best to rename Configuration.DEBUG to something else throughout (Configuration.JDEBUG sprints to mind).

Comment 9 Dave Korn 2009-04-22 22:38:09 UTC
Created attachment 17679 [details]
Part two of fix

This renames the DEBUG macro to __GCJ_DEBUG throughout.  It fixed the build in my tree where I had a whole bunch of local patches, now testing it in a clean tree with the extraneous changes removed.
Comment 10 Dave Korn 2009-08-21 02:20:24 UTC
*** Bug 30570 has been marked as a duplicate of this bug. ***
Comment 11 Dave Korn 2009-08-21 02:23:51 UTC
This has been fixed now since these two revisions were applied:

    http://gcc.gnu.org/viewcvs?view=revision&revision=146627
    http://gcc.gnu.org/viewcvs?view=revision&revision=146869

These days libjava builds fine with --enable-libgcj-debug.