From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 445B83858C27; Mon, 28 Jun 2021 20:36:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 445B83858C27 From: "lancethepants at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng Date: Mon, 28 Jun 2021 20:36:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: go X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: lancethepants at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: ian at airs dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 20:36:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101246 --- Comment #2 from Lance Fredrickson --- echo timestamp > unicode.s-gox f=3D"runtime.o"; if test ! -f $f; then f=3D"./.libs/runtime.o"; fi; /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/bin/objcopy= -j .go_export $f runtime.s-gox.tmp; /bin/bash ../../../libgo/mvifdiff.sh runtime.s-gox.tmp `echo runtime.s-gox | sed -e 's/s-gox/gox/'` /bin/bash ../../../libgo/mkruntimeinc.sh /bin/bash ../../../libgo/mvifdiff.sh tmp-runtime.inc runtime.inc echo timestamp > s-runtime-inc /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/./gcc/ -B/opt/tomatoware/arm-soft-mmc/arm-tomato ware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-li nux-uclibcgnueabi/sys-include -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/include -I../libffi/inclu= de -pthread -L../libatomic/.libs -fexceptions -fnon-call-exceptions -Wall -Wextra -Wwr ite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include -fPIC -D_LARGEFILE_SOUR= CE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_ BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/libgobegin_a-go-main.o -MD -MP -MF runtime/.deps/libgobegin_a-go-main.Tpo -c -o runtime/libgobegin_a-go-main.o `test -f 'runtime/go-main.c' || echo '../../../libgo/'`runtime/go-main.c /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/./gcc/ -B/opt/tomatoware/arm-soft-mmc/arm-tomato ware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-li nux-uclibcgnueabi/sys-include -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/include -I../libffi/inclu= de -pthread -L../libatomic/.libs -fexceptions -fnon-call-exceptions -Wall -Wextra -Wwr ite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include -fPIC -D_LARGEFILE_SOUR= CE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_ BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/libgolibbegin_a-go-libmain.o -MD -= MP -MF runtime/.deps/libgolibbegin_a-go-libmain.Tpo -c -o runtime/libgolibbegin_a-go-libmain.o `test -f 'runtime/go-libmain.c' || echo '../../../libgo/'`runtime/go- libmain.c depbase=3D`echo runtime/aeshash.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/bash ./libtool --tag=3DCC --mode=3Dcompile /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/. /gcc/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/sys-includ= e=20=20=20 -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/include -I../libffi/include -pthread -L../libatomic/.libs -fexcep tions -fnon-call-exceptions -Wall -Wextra -Wwrite-strings -Wcast-qual -Wer= ror=20 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/inc= lude -D_LARGEFILE_SOU RCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/aeshash.lo -MD -MP -MF $depbase.Tpo -c -o runtime/aeshash.lo ../../../libgo/runtime/aeshash.c &&\ mv -f $depbase.Tpo $depbase.Plo depbase=3D`echo runtime/go-assert.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/bash ./libtool --tag=3DCC --mode=3Dcompile /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/. /gcc/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/sys-includ= e=20=20=20 -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/include -I../libffi/include -pthread -L../libatomic/.libs -fexcep tions -fnon-call-exceptions -Wall -Wextra -Wwrite-strings -Wcast-qual -Wer= ror=20 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/inc= lude -D_LARGEFILE_SOU RCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/go-assert.lo -MD -MP -MF $depbase.Tpo -c -o runtime/go-assert.lo ../../../libgo/runtime/go-assert.c &&\ mv -f $depbase.Tpo $depbase.Plo echo timestamp > runtime.s-gox depbase=3D`echo runtime/go-caller.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\ /bin/bash ./libtool --tag=3DCC --mode=3Dcompile /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/. /gcc/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/sys-includ= e=20=20=20 -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/include -I../libffi/include -pthread -L../libatomic/.libs -fexcep tions -fnon-call-exceptions -Wall -Wextra -Wwrite-strings -Wcast-qual -Wer= ror=20 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/inc= lude -D_LARGEFILE_SOU RCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/go-caller.lo -MD -MP -MF $depbase.Tpo -c -o runtime/go-caller.lo ../../../libgo/runtime/go-caller.c &&\ mv -f $depbase.Tpo $depbase.Plo In file included from ../../../libgo/runtime/runtime.h:105, from ../../../libgo/runtime/go-libmain.c:18: ./runtime.inc:1357:29: error: field =E2=80=98__state=E2=80=99 has incomplet= e type 1357 | struct ___mbstate_t __state; | ^~~~~~~ ./runtime.inc:1360:33: error: field =E2=80=98__lock=E2=80=99 has incomplete= type 1360 | struct _pthread_mutex_t __lock; | ^~~~~~ In file included from ../../../libgo/runtime/runtime.h:105, from ../../../libgo/runtime/go-main.c:17: ./runtime.inc:1357:29: error: field =E2=80=98__state=E2=80=99 has incomplet= e type 1357 | struct ___mbstate_t __state; | ^~~~~~~ ./runtime.inc:1360:33: error: field =E2=80=98__lock=E2=80=99 has incomplete= type 1360 | struct _pthread_mutex_t __lock; | ^~~~~~ libtool: compile:=20 /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/./gcc/ -B/opt/tomatoware/arm$ soft-mmc/arm-tomatoware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-m$ c/arm-tomatoware-linux-uclibcgnueabi/sys-include -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/inclu= de -I../libffi/include -pthread -L../libatomic/.libs -fexceptions -fnon-call-exceptions -Wal$ -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOU= RCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_O$ FSET_BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/go-assert.lo -MD -MP -MF runtime/.deps/go-assert.Tpo -c ../../../libgo/runtime/go-assert.c -fPIC -D= PIC -o runtime/.libs/go-assert.o make[6]: *** [Makefile:1541: runtime/libgolibbegin_a-go-libmain.o] Error 1 make[6]: *** Waiting for unfinished jobs.... make[6]: *** [Makefile:1527: runtime/libgobegin_a-go-main.o] Error 1 libtool: compile:=20 /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/./gcc/ -B/opt/tomatoware/arm$ soft-mmc/arm-tomatoware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-m$ c/arm-tomatoware-linux-uclibcgnueabi/sys-include -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/inclu= de -I../libffi/include -pthread -L../libatomic/.libs -fexceptions -fnon-call-exceptions -Wal$ -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOU= RCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_O$ FSET_BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/aeshash.lo -MD -MP -MF runtime/.deps/aeshash.Tpo -c ../../../libgo/runtime/aeshash.c -fPIC -DPIC = -o runtime/.libs/aeshash.o libtool: compile:=20 /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/build/./gcc/xgcc -B/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-fina= l-11.1.0/build/./gcc/ -B/opt/tomatoware/arm$ soft-mmc/arm-tomatoware-linux-uclibcgnueabi/bin/ -B/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/lib/ -isy= stem /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include -isystem /opt/tomatoware/arm-soft-m$ c/arm-tomatoware-linux-uclibcgnueabi/sys-include -DHAVE_CONFIG_H -I. -I../../../libgo -I ../../../libgo/runtime -I../../../libgo/../libffi/inclu= de -I../libffi/include -pthread -L../libatomic/.libs -fexceptions -fnon-call-exceptions -Wal$ -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOU= RCE -D_FILE_OFFSET_BITS=3D64 -I ../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_O$ FSET_BITS=3D64 -O2 -g0 -DNDEBUG -MT runtime/go-caller.lo -MD -MP -MF runtime/.deps/go-caller.Tpo -c ../../../libgo/runtime/go-caller.c -fPIC -D= PIC -o runtime/.libs/go-caller.o In file included from ../../../libgo/runtime/runtime.h:105, from ../../../libgo/runtime/go-assert.c:10: ./runtime.inc:1357:29: error: field =E2=80=98__state=E2=80=99 has incomplet= e type 1357 | struct ___mbstate_t __state; | ^~~~~~~ ./runtime.inc:1360:33: error: field =E2=80=98__lock=E2=80=99 has incomplete= type 1360 | struct _pthread_mutex_t __lock; | ^~~~~~ In file included from ../../../libgo/runtime/runtime.h:105, from ../../../libgo/runtime/aeshash.c:7: ./runtime.inc:1357:29: error: field =E2=80=98__state=E2=80=99 has incomplet= e type 1357 | struct ___mbstate_t __state; | ^~~~~~~ ./runtime.inc:1360:33: error: field =E2=80=98__lock=E2=80=99 has incomplete= type 1360 | struct _pthread_mutex_t __lock; | ^~~~~~ make[6]: *** [Makefile:1505: runtime/go-assert.lo] Error 1 make[6]: *** [Makefile:1505: runtime/aeshash.lo] Error 1 In file included from ../../../libgo/runtime/runtime.h:105, from ../../../libgo/runtime/go-caller.c:16: ./runtime.inc:1357:29: error: field =E2=80=98__state=E2=80=99 has incomplet= e type 1357 | struct ___mbstate_t __state; | ^~~~~~~ ./runtime.inc:1360:33: error: field =E2=80=98__lock=E2=80=99 has incomplete= type 1360 | struct _pthread_mutex_t __lock; | ^~~~~~ make[6]: *** [Makefile:1505: runtime/go-caller.lo] Error 1 make[6]: Leaving directory '/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final= -11.1.0/build/arm-tomatoware-linux-uclibcgnueabi/libgo' make[5]: *** [Makefile:2327: all-recursive] Error 1 make[5]: Leaving directory '/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final= -11.1.0/build/arm-tomatoware-linux-uclibcgnueabi/libgo' make[4]: *** [Makefile:1198: all] Error 2 make[4]: Leaving directory '/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final= -11.1.0/build/arm-tomatoware-linux-uclibcgnueabi/libgo' make[3]: *** [Makefile:14925: all-target-libgo] Error 2 make[3]: Leaving directory '/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final= -11.1.0/build' make[2]: *** [Makefile:960: all] Error 2 make[2]: Leaving directory '/home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final= -11.1.0/build' make[1]: *** [package/pkg-generic.mk:250: /home/lance/tomatoware/toolchain/buildroot-git/output/build/host-gcc-final-= 11.1.0/.stamp_built] Error 2 make[1]: Leaving directory '/home/lance/tomatoware/toolchain/buildroot-git' make: *** [Makefile:11: toolchain] Error 2=