At r162841, four new libjava testsuite failures appear on x86_64-apple-darwin10 at both -m32 and -m64... FAIL: linking events FAIL: linking getallthreads FAIL: linking geterrorname FAIL: linking getmethodname These are of the form... Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.4.0/libjava/testsuite/../libtool --silent --tag=GCJ --mode=link /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/gcj -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/ --encoding=UTF-8 -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.4.0/libjava/testsuite/../ /sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100802/libjava/testsuite/libjava.jvmti/events.jar natevents.o -w -bind_at_load -multiply_defined suppress -Wl,-allow_stack_execute --main=events -g -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.4.0/i386/libjava/.libs -lm -m32 -o events (timeout = 300) error: Invalid DWARF in /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.4.0/libjava/testsuite/natevents.o: DIE 0x00006a1d has multiple AT_byte_size attributes. compiler exited with status 1 output is: error: Invalid DWARF in /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.4.0/libjava/testsuite/natevents.o: DIE 0x00006a1d has multiple AT_byte_size attributes. FAIL: linking events XFAIL: running events and were not present at r162730.
Created attachment 21376 [details] assembly file for libjava jvmti.exp's linking events on x86_64-apple-darwin10
Created attachment 21378 [details] preprocessed source for libjava/testsuite/libjava.jvmti/natgetallthreads.cc from x86_64-apple-darwin10 at -m64
Created attachment 21379 [details] assembly for libjava/testsuite/libjava.jvmti/natgetallthreads.cc from x86_64-apple-darwin10 at -m64
This failure is likely due to using Xcode 3.2.3 and is described in the thread at... http://lists.apple.com/archives/xcode-users/2010/Jun/msg00189.html New checks have been added to the linker to catch bad debug information... http://lists.apple.com/archives/xcode-users/2010/Jun/msg00291.html
The linkage of events succeeds if done manually (without using libtool which invokes dsymutil)... [MacPro:~/bad_dwarf] howarth% /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/as -arch x86_64 -force_cpusubtype_ALL -o eventsmain.o eventsmain.s [MacPro:~/bad_dwarf] howarth% /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/collect2 -dynamic -arch x86_64 -bind_at_load -macosx_version_min 10.6.4 -multiply_defined suppress -weak_reference_mismatches non-weak -w -o events -lcrt1.10.5.o -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.4.0/./libjava/.libs -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.4.0/libjava/testsuite/.. eventsmain.o events.o natevents.o -allow_stack_execute -lm -lgcc_s.10.5 -lgcc_ext.10.5 -lgcc -lgcj -lm -L/sw/lib -liconv -lpthread -lz -allow_stack_execute -ldl -lgcc_s.10.5 -lgcc_ext.10.5 -lgcc -no_compact_unwind -lSystem however the resulting executable triggers the warning with dsymutil... dsymutil events error: Invalid DWARF in /Users/howarth/bad_dwarf/natevents.o: DIE 0x00006c58 has multiple AT_byte_size attributes. dwarfdump natevents.o > natevents.o.dwarfdump shows... 0x00006c58: TAG_structure_type [39] * AT_byte_size( 0x18 ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 213 ) AT_byte_size( 0x18 ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 213 ) AT_sibling( {0x00006c90} )
Created attachment 21383 [details] natevents.o with duplicate AT_byte_size attributes from x86_64-apple-darwin10
Created attachment 21385 [details] bz2 compressed dwarfdump of natevents.o
Apparently this structure is generating the duplicate AT_byte_size attributes... /* This structure is used when registering native methods. */ typedef struct { char *name; char *signature; void *fnPtr; /* Sigh. */ } JNINativeMethod; since it is at line 213 of libjava/classpath/include/jni.h and dwarfdump shows... 0x00006c58: TAG_structure_type [39] * AT_byte_size( 0x18 ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 213 ) AT_byte_size( 0x18 ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 213 ) AT_sibling( {0x00006c90} ) 0x00006c63: TAG_member [12] AT_name( "name" ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 214 ) AT_type( {0x000005eb} ( char* ) ) AT_data_member_location( +0 ) 0x00006c71: TAG_member [12] AT_name( "signature" ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 215 ) AT_type( {0x000005eb} ( char* ) ) AT_data_member_location( +8 ) 0x00006c7f: TAG_member [13] AT_name( "fnPtr" ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 216 ) AT_type( {0x000005f9} ( * ) ) AT_data_member_location( +16 ) 0x00006c8f: NULL 0x00006c90: TAG_typedef [2] AT_name( "JNINativeMethod" ) AT_decl_file( "/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20100803/libjava/classpath/include/jni.h" ) AT_decl_line( 217 ) AT_type( {0x00006c58} ( struct ) )
This same structure for JNINativeMethod appears to be the source of the duplicate AT_byte_size in all four failing libjava testcases.
Verified with typedef struct { int a, b; } x; ./cc1plus -g -fno-eliminate-unused-debug-types -dA z.c .uleb128 0x2 # (DIE (0x2d) DW_TAG_structure_type) .byte 0x8 # DW_AT_byte_size .byte 0x1 # DW_AT_decl_file (z.c) .byte 0x3 # DW_AT_decl_line .byte 0x8 # DW_AT_byte_size .byte 0x1 # DW_AT_decl_file (z.c) .byte 0x3 # DW_AT_decl_line Note that both byte_size and and the decl location are replicated. This happens with the C++ compiler, but not the C compiler.
This is fallout from c++/44188.
Subject: Bug 45171 Author: rth Date: Wed Aug 4 23:32:08 2010 New Revision: 162882 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162882 Log: PR debug/45171 * dwarf2out.c (gen_typedef_die): Don't re-generate the die of an is_naming_typedef_decl. Added: trunk/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C Modified: trunk/gcc/ChangeLog trunk/gcc/dwarf2out.c
Should be fixed, but I'll leave the bug open until you get a chance to test the whole build against that darwin linker.
Fixed with r162882.