libgo r185183 fails to build on arm-linux-gnueabi, libcalls.go:1662:22: error: use of undefined type 'Timex' make[6]: *** [syscall/syscall.lo] Error 1 build/arm-linux-gnueabi/libgo/gen-sysinfo.go has: // type _timex struct { modes uint32; offset int32; freq int32; maxerror int32; esterror int32; status int32; constant int32; precision int32; tolerance int32; time _timeval; tick int32; ppsfreq int32; jitter int32; shift int32; stabil int32; jitcnt int32; calcnt int32; errcnt int32; stbcnt int32; tai int32; Godump_0 INVALID-bit-field; Godump_1 INVALID-bit-field; Godump_2 INVALID-bit-field; Godump_3 INVALID-bit-field; Godump_4 INVALID-bit-field; Godump_5 INVALID-bit-field; Godump_6 INVALID-bit-field; Godump_7 INVALID-bit-field; Godump_8 INVALID-bit-field; Godump_9 INVALID-bit-field; Godump_10 INVALID-bit-field; } the invalid fields correspond to bits/timex.h in the timex struct: int tai; /* TAI offset (ro) */ /* ??? */ int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32; int :32;
with the following hack, I'm able to build on arm, and run the tests. --- libgo/mksysinfo.sh~ 2012-03-11 00:36:59.000000000 +0000 +++ libgo/mksysinfo.sh 2012-03-11 19:17:15.000000000 +0000 @@ -137,6 +137,9 @@ ${CC} -fdump-go-spec=gen-sysinfo.go -std=gnu99 -S -o sysinfo.s sysinfo.c +# ARM +sed -i '/type _timex/s/INVALID-bit-field/int32/g;/type _timex/s,^// ,,' gen-sysinfo.go + echo 'package syscall' > ${OUT} echo 'import "unsafe"' >> ${OUT} echo 'type _ unsafe.Pointer' >> ${OUT} $ grep -v ^PASS libgo.sum Test Run By doko on Sun Mar 11 19:35:35 UTC 2012 Native configuration is arm-unknown-linux-gnueabi === libgo tests === Schedule of variations: unix Running target unix Running ../../../src/libgo/libgo.exp ... FAIL: fmt FAIL: log FAIL: reflect FAIL: sync FAIL: time FAIL: archive/zip FAIL: debug/dwarf FAIL: encoding/gob FAIL: encoding/json FAIL: html/template FAIL: go/printer FAIL: math/big FAIL: net/http FAIL: net/rpc FAIL: old/regexp FAIL: old/template FAIL: text/template FAIL: text/template/parse === libgo Summary === # of expected passes 105 # of unexpected failures 18
Author: ian Date: Tue Mar 13 20:56:23 2012 New Revision: 185354 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185354 Log: PR go/52557 mksysinfo: Fix handling of timex for ARM GNU/Linux. Modified: trunk/libgo/mksysinfo.sh
Fixed on mainline, waiting for approval for 4.7 branch. Thanks for reporting it. Can you attach the complete libgo.sum file, either here or in a different PR? It may have some clues as to why those tests are failing.
Created attachment 26887 [details] libgo.log
Created attachment 26888 [details] libgo.sum
Author: ian Date: Tue Mar 13 22:03:30 2012 New Revision: 185359 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185359 Log: PR go/52557 mksysinfo: Fix handling of timex for ARM GNU/Linux. Modified: branches/gcc-4_7-branch/libgo/mksysinfo.sh
Original problem should be fixed now.
From the log files, looks like there is some problem with unwinding the stack. My first guess would be that there is something wrong with the ARM-specific code in libgo/runtime/go-unwind.c.