https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81946
Bug ID: 81946 Summary: runtime.inc:782:28: error: field ‘__sem_lock’ has incomplete type Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go Assignee: ian at airs dot com Reporter: mfe at live dot de CC: cmang at google dot com Target Milestone: --- Hi, I was able to build gcc 7.1.0 with the enabled languages c and c++. Unfortunately building the last gcc 7.2. with enabling the language go results in "runtime.inc:782:28: error: field ‘__sem_lock’ has incomplete type" the exact version of GCC: gcc-7.1.0 the system type: NetgearReadyNAS Duo (http://wiki.dietpc.org/index.php/DIET-PC_on_SPARC_ReadyNAS) the options given when GCC was configured/built: nas-02-90-38:/media/gcc-7.2.0-go# ../gcc-7.2.0/configure CC=/opt/gcc-7.1/bin/gcc CXX=/opt/gcc-7.1/bin/g++ --enable-languages=c,c++,go --prefix=/opt/gcc-7.2.0 --with-cpu=v7 --disable-libstdcxx-pch --disable-linux-futex --disable-libsanitizer --enable-__cxa_atexit --with-system-zlib --enable-nls --enable-clocale=gnu --enable-debug --disable-doc --disable-libcilkrts --disable-libitm ## --------- ## ## Platform. ## ## --------- ## hostname = nas-02-90-38 uname -m = padre uname -r = 2.6.17.14ReadyNAS uname -s = Linux uname -v = #1 Wed Jun 20 20:08:20 PDT 2012 the complete command line that triggers the bug; /usr/local/bin/make the compiler output (error messages, warnings, etc.); [...] libtool: compile: /media/gcc-7.2.0-go/./gcc/gccgo -B/media/gcc-7.2.0-go/./gcc/ -B/opt/gcc-7.2.0/sparc-unknown-linux-gnu/bin/ -B/opt/gcc-7.2.0/sparc-unknown-linux-gnu/lib/ -isystem /opt/gcc-7.2.0/sparc-unknown-linux-gnu/include -isystem /opt/gcc-7.2.0/sparc-unknown-linux-gnu/sys-include -O2 -g -I . -c -fgo-pkgpath=runtime -fgo-c-header=runtime.inc.tmp -fgo-compiling-runtime ../../../gcc-7.2.0/libgo/go/runtime/alg.go ../../../gcc-7.2.0/libgo/go/runtime/cgo_gccgo.go ../../../gcc-7.2.0/libgo/go/runtime/chan.go ../../../gcc-7.2.0/libgo/go/runtime/compiler.go ../../../gcc-7.2.0/libgo/go/runtime/cpuprof.go ../../../gcc-7.2.0/libgo/go/runtime/cputicks.go ../../../gcc-7.2.0/libgo/go/runtime/debug.go ../../../gcc-7.2.0/libgo/go/runtime/env_posix.go ../../../gcc-7.2.0/libgo/go/runtime/error.go ../../../gcc-7.2.0/libgo/go/runtime/extern.go ../../../gcc-7.2.0/libgo/go/runtime/ffi.go ../../../gcc-7.2.0/libgo/go/runtime/hash32.go ../../../gcc-7.2.0/libgo/go/runtime/hashmap.go ../../../gcc-7.2.0/libgo/go/runtime/hashmap_fast.go ../../../gcc-7.2.0/libgo/go/runtime/iface.go ../../../gcc-7.2.0/libgo/go/runtime/lfstack.go ../../../gcc-7.2.0/libgo/go/runtime/lfstack_32bit.go ../../../gcc-7.2.0/libgo/go/runtime/lock_futex.go ../../../gcc-7.2.0/libgo/go/runtime/mcache.go ../../../gcc-7.2.0/libgo/go/runtime/mprof.go ../../../gcc-7.2.0/libgo/go/runtime/msan0.go ../../../gcc-7.2.0/libgo/go/runtime/mstats.go ../../../gcc-7.2.0/libgo/go/runtime/netpoll.go ../../../gcc-7.2.0/libgo/go/runtime/netpoll_epoll.go ../../../gcc-7.2.0/libgo/go/runtime/os_gccgo.go ../../../gcc-7.2.0/libgo/go/runtime/os_linux.go ../../../gcc-7.2.0/libgo/go/runtime/panic.go ../../../gcc-7.2.0/libgo/go/runtime/print.go ../../../gcc-7.2.0/libgo/go/runtime/proc.go ../../../gcc-7.2.0/libgo/go/runtime/race0.go ../../../gcc-7.2.0/libgo/go/runtime/rdebug.go ../../../gcc-7.2.0/libgo/go/runtime/runtime.go ../../../gcc-7.2.0/libgo/go/runtime/runtime1.go ../../../gcc-7.2.0/libgo/go/runtime/runtime2.go ../../../gcc-7.2.0/libgo/go/runtime/select.go ../../../gcc-7.2.0/libgo/go/runtime/sema.go ../../../gcc-7.2.0/libgo/go/runtime/signal_gccgo.go ../../../gcc-7.2.0/libgo/go/runtime/signal_sighandler.go ../../../gcc-7.2.0/libgo/go/runtime/signal_unix.go ../../../gcc-7.2.0/libgo/go/runtime/sigqueue.go ../../../gcc-7.2.0/libgo/go/runtime/sizeclasses.go ../../../gcc-7.2.0/libgo/go/runtime/slice.go ../../../gcc-7.2.0/libgo/go/runtime/string.go ../../../gcc-7.2.0/libgo/go/runtime/stubs.go ../../../gcc-7.2.0/libgo/go/runtime/stubs2.go ../../../gcc-7.2.0/libgo/go/runtime/symtab.go ../../../gcc-7.2.0/libgo/go/runtime/time.go ../../../gcc-7.2.0/libgo/go/runtime/trace.go ../../../gcc-7.2.0/libgo/go/runtime/traceback_gccgo.go ../../../gcc-7.2.0/libgo/go/runtime/type.go ../../../gcc-7.2.0/libgo/go/runtime/typekind.go ../../../gcc-7.2.0/libgo/go/runtime/unaligned2.go ../../../gcc-7.2.0/libgo/go/runtime/utf8.go ../../../gcc-7.2.0/libgo/go/runtime/write_err.go runtime_sysinfo.go sigtab.go -o runtime.o >/dev/null 2>&1 rm -f runtime.inc.tmp2 grep -v "#define _" runtime.inc.tmp | grep -v "#define [cm][01234] " > runtime.inc.tmp2 for pattern in '_[GP][a-z]' _Max _Lock _Sig _Trace _MHeap _Num; do \ grep "#define $pattern" runtime.inc.tmp >> runtime.inc.tmp2; \ done /bin/sh ../../../gcc-7.2.0/libgo/mvifdiff.sh runtime.inc.tmp2 runtime.inc echo timestamp > s-runtime-inc /media/gcc-7.2.0-go/./gcc/xgcc -B/media/gcc-7.2.0-go/./gcc/ -B/opt/gcc-7.2.0/sparc-unknown-linux-gnu/bin/ -B/opt/gcc-7.2.0/sparc-unknown-linux-gnu/lib/ -isystem /opt/gcc-7.2.0/sparc-unknown-linux-gnu/include -isystem /opt/gcc-7.2.0/sparc-unknown-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../gcc-7.2.0/libgo -I ../../../gcc-7.2.0/libgo/runtime -I../../../gcc-7.2.0/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fnon-call-exceptions -fplan9-extensions -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I ../../../gcc-7.2.0/libgo/../libgcc -I ../../../gcc-7.2.0/libgo/../libbacktrace -I ../../gcc/include -fPIC -g -O2 -MT libgobegin_a-go-main.o -MD -MP -MF .deps/libgobegin_a-go-main.Tpo -c -o libgobegin_a-go-main.o `test -f 'runtime/go-main.c' || echo '../../../gcc-7.2.0/libgo/'`runtime/go-main.c In file included from ../../../gcc-7.2.0/libgo/runtime/runtime.h:113:0, from ../../../gcc-7.2.0/libgo/runtime/go-main.c:17: ./runtime.inc:782:28: error: field ‘__sem_lock’ has incomplete type struct __pthread_fastlock __sem_lock; ^~~~~~~~~~ make[4]: *** [Makefile:1580: libgobegin_a-go-main.o] Error 1 make[4]: Leaving directory '/c/media/gcc-7.2.0-go/sparc-unknown-linux-gnu/libgo' make[3]: *** [Makefile:2746: all-recursive] Error 1 make[3]: Leaving directory '/c/media/gcc-7.2.0-go/sparc-unknown-linux-gnu/libgo' make[2]: *** [Makefile:1344: all] Error 2 make[2]: Leaving directory '/c/media/gcc-7.2.0-go/sparc-unknown-linux-gnu/libgo' make[1]: *** [Makefile:18527: all-target-libgo] Error 2 make[1]: Leaving directory '/c/media/gcc-7.2.0-go' make: *** [Makefile:931: all] Error 2 I would love to see go on my sparc machine.