public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
@ 2021-06-28 19:17 lancethepants at gmail dot com
  2021-06-28 19:25 ` [Bug go/101246] " ian at airs dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: lancethepants at gmail dot com @ 2021-06-28 19:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

            Bug ID: 101246
           Summary: gccgo cross-compiler targeting arm fails to build with
                    gcc 11. Missing structs in runtime.inc. Using
                    uclibc-ng
           Product: gcc
           Version: 11.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: lancethepants at gmail dot com
                CC: cmang at google dot com
  Target Milestone: ---

I've recently run into an issue building a go cross-compiler on x86_64
targeting an arm embedded device (Netgear R7000 router) starting with gcc 11.

I was previously able to build the cross-compiler (c,c++,go) under gcc 9 & 10,
but am getting the errors listed at the bottom.

armv7 cortexa9 cpu (no fpu)
uclibc-ng (latest)
kernel 2.6.36.4.

I don't think the old kernel is an issue because the same errors arise if I use
kernel 5.12.  

I tried building with glibc, and it does work then. So I think the issue is
with uclibc-ng.

So I did use uclibc-ng with gcc 9 & 10 with success, but for some reason with
gcc 11 I am now running into this issue.

My untrained eyes think it may be as easy as a couple missing structs within
runtime.inc.   Is runtime.inc generated? because it doesn't appear in
unconfigured source I've notices.

thanks,
Lance

Build Errors
In file included from ../../../libgo/runtime/runtime.h:105,
                  from ../../../libgo/runtime/go-main.c:17:
./runtime.inc:1357:29: error: field ‘__state’ has incomplete type
  1357 |         struct ___mbstate_t __state;
       |                             ^~~~~~~
./runtime.inc:1360:33: error: field ‘__lock’ has incomplete type
  1360 |         struct _pthread_mutex_t __lock;
       |

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
@ 2021-06-28 19:25 ` ian at airs dot com
  2021-06-28 20:36 ` lancethepants at gmail dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2021-06-28 19:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #1 from Ian Lance Taylor <ian at airs dot com> ---
Yes, runtime.inc is a generated file.  Can you post the lines around the
errors? 
 These look like fields in a struct type, and I'd like to know which type it
is.  Thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
  2021-06-28 19:25 ` [Bug go/101246] " ian at airs dot com
@ 2021-06-28 20:36 ` lancethepants at gmail dot com
  2021-06-28 20:42 ` ian at airs dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: lancethepants at gmail dot com @ 2021-06-28 20:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #2 from Lance Fredrickson <lancethepants at gmail dot com> ---
echo timestamp > unicode.s-gox
f="runtime.o"; if test ! -f $f; then f="./.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-final-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/ -isystem
/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/include
-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=64 -I ../../../libgo/../libgcc -I
../../../libgo/../libbacktrace -I ../../gcc/include -fPIC -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_
BITS=64  -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-final-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/ -isystem
/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/include
-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=64 -I ../../../libgo/../libgcc -I
../../../libgo/../libbacktrace -I ../../gcc/include -fPIC -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_
BITS=64  -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=`echo runtime/aeshash.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool  --tag=CC   --mode=compile
/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-final-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/ -isystem
/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include
-isystem
 /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/sys-include   
-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 -Werror 
 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I
../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include
-D_LARGEFILE_SOU
RCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -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=`echo runtime/go-assert.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool  --tag=CC   --mode=compile
/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-final-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/ -isystem
/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include
-isystem
 /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/sys-include   
-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 -Werror 
 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I
../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include
-D_LARGEFILE_SOU
RCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -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=`echo runtime/go-caller.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ./libtool  --tag=CC   --mode=compile
/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-final-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/ -isystem
/opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/include
-isystem
 /opt/tomatoware/arm-soft-mmc/arm-tomatoware-linux-uclibcgnueabi/sys-include   
-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 -Werror 
 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I
../../../libgo/../libgcc -I ../../../libgo/../libbacktrace -I ../../gcc/include
-D_LARGEFILE_SOU
RCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -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 ‘__state’ has incomplete type
 1357 |         struct ___mbstate_t __state;
      |                             ^~~~~~~
./runtime.inc:1360:33: error: field ‘__lock’ 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 ‘__state’ has incomplete type
 1357 |         struct ___mbstate_t __state;
      |                             ^~~~~~~
./runtime.inc:1360:33: error: field ‘__lock’ has incomplete type
 1360 |         struct _pthread_mutex_t __lock;
      |                                 ^~~~~~

libtool: compile: 
/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-final-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/ -isystem
/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/include
-I../libffi/include -pthread -L../libatomic/.libs -fexceptions
-fnon-call-exceptions -Wal$
 -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I ../../../libgo/../libgcc -I
../../../libgo/../libbacktrace -I ../../gcc/include -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_O$
FSET_BITS=64 -O2 -g0 -DNDEBUG -MT runtime/go-assert.lo -MD -MP -MF
runtime/.deps/go-assert.Tpo -c ../../../libgo/runtime/go-assert.c  -fPIC -DPIC
-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: 
/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-final-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/ -isystem
/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/include
-I../libffi/include -pthread -L../libatomic/.libs -fexceptions
-fnon-call-exceptions -Wal$
 -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I ../../../libgo/../libgcc -I
../../../libgo/../libbacktrace -I ../../gcc/include -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_O$
FSET_BITS=64 -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: 
/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-final-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/ -isystem
/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/include
-I../libffi/include -pthread -L../libatomic/.libs -fexceptions
-fnon-call-exceptions -Wal$
 -Wextra -Wwrite-strings -Wcast-qual -Werror -D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I ../../../libgo/../libgcc -I
../../../libgo/../libbacktrace -I ../../gcc/include -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_O$
FSET_BITS=64 -O2 -g0 -DNDEBUG -MT runtime/go-caller.lo -MD -MP -MF
runtime/.deps/go-caller.Tpo -c ../../../libgo/runtime/go-caller.c  -fPIC -DPIC
-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 ‘__state’ has incomplete type
 1357 |         struct ___mbstate_t __state;
      |                             ^~~~~~~
./runtime.inc:1360:33: error: field ‘__lock’ 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 ‘__state’ has incomplete type
 1357 |         struct ___mbstate_t __state;
      |                             ^~~~~~~
./runtime.inc:1360:33: error: field ‘__lock’ 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 ‘__state’ has incomplete type
 1357 |         struct ___mbstate_t __state;
      |                             ^~~~~~~
./runtime.inc:1360:33: error: field ‘__lock’ 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
  2021-06-28 19:25 ` [Bug go/101246] " ian at airs dot com
  2021-06-28 20:36 ` lancethepants at gmail dot com
@ 2021-06-28 20:42 ` ian at airs dot com
  2021-06-28 20:48 ` lancethepants at gmail dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2021-06-28 20:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #3 from Ian Lance Taylor <ian at airs dot com> ---
Thanks, but I am hoping to see not the build log, but rather the contents of
the generated file TARGET/libgo/runtime.inc, around lines 1357 and 1360. 
Thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
                   ` (2 preceding siblings ...)
  2021-06-28 20:42 ` ian at airs dot com
@ 2021-06-28 20:48 ` lancethepants at gmail dot com
  2021-07-08 21:20 ` lancethepants at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: lancethepants at gmail dot com @ 2021-06-28 20:48 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #4 from Lance Fredrickson <lancethepants at gmail dot com> ---
Created attachment 51077
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51077&action=edit
runtime.inc

oops, I've attached runtime.inc

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
                   ` (3 preceding siblings ...)
  2021-06-28 20:48 ` lancethepants at gmail dot com
@ 2021-07-08 21:20 ` lancethepants at gmail dot com
  2021-08-19 19:36 ` lancethepants at gmail dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: lancethepants at gmail dot com @ 2021-07-08 21:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #5 from Lance Fredrickson <lancethepants at gmail dot com> ---
Just to check another architecture, I tried building gccgo-11 for x86_64 and
uclibc-ng.  With gcc-11 I get the same build-time error with x86_64 as I did
with arm. 

gccgo-10 for x86_64 & uclibc-ng did build, but when compiling a simple program
I get a few undefined errors I don't have with arm.
undefined reference to `__wrap_pthread_create'
undefined reference to `__morestack_block_signals'
undefined reference to `__generic_morestack'
undefined reference to `__morestack_unblock_signals'

Probably needs to be its own bug report. Not sure if gcc-10 will see more
releases, but I would guess it would still be present in gcc-11 if it built.

I hope uclibc-ng still gets some love from gcc and is supported.  It plays nice
with old kernels, has more supported targets, and is still actively developed.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
                   ` (4 preceding siblings ...)
  2021-07-08 21:20 ` lancethepants at gmail dot com
@ 2021-08-19 19:36 ` lancethepants at gmail dot com
  2022-02-23 16:55 ` lancethepants at gmail dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: lancethepants at gmail dot com @ 2021-08-19 19:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #6 from Lance Fredrickson <lancethepants at gmail dot com> ---
So I compared runtime.inc in gcc 10.3 and gcc 11.1, and they have quite a bit
different.  I tried using the runtime.inc file from 10.3 in 11.1, and it does
allow it to finish compiling, and I appear to be able to compile a simple go
program.  

I also just removing struct _FILE, which has those to fields __lock and __state
and also completes and I appear to be able to compile some simple go programs.

Not sure if any of this is helpful. I've been trying to figure out all the file
generation is happening, but it's a lot to take in.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
                   ` (5 preceding siblings ...)
  2021-08-19 19:36 ` lancethepants at gmail dot com
@ 2022-02-23 16:55 ` lancethepants at gmail dot com
  2022-03-04 18:47 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: lancethepants at gmail dot com @ 2022-02-23 16:55 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #7 from Lance Fredrickson <lancethepants at gmail dot com> ---
So this is the patch I'm using to build gccgo for uclibc arm.

https://raw.githubusercontent.com/lancethepants/tomatoware/master/patches/gcc/0006-fix-libgo-uclibc-ng.patch

In a seperate discussion you mentioned excluding the struct from generation,
and this seems to work fine. It'd be nice to see this upstreamed but submitting
for gcc looks like a high barrier to entry.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
                   ` (6 preceding siblings ...)
  2022-02-23 16:55 ` lancethepants at gmail dot com
@ 2022-03-04 18:47 ` cvs-commit at gcc dot gnu.org
  2022-03-04 18:53 ` lancethepants at gmail dot com
  2022-03-04 18:56 ` ian at airs dot com
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-04 18:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Ian Lance Taylor <ian@gcc.gnu.org>:

https://gcc.gnu.org/g:c3402486afa8b6f98d6b0cc05cd229526bc7611f

commit r12-7493-gc3402486afa8b6f98d6b0cc05cd229526bc7611f
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Mar 4 10:18:00 2022 -0800

    mkruntimeinc: skip _FILE

    We don't need it, and it breaks uclibc.

            PR go/101246

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/390021

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
                   ` (7 preceding siblings ...)
  2022-03-04 18:47 ` cvs-commit at gcc dot gnu.org
@ 2022-03-04 18:53 ` lancethepants at gmail dot com
  2022-03-04 18:56 ` ian at airs dot com
  9 siblings, 0 replies; 11+ messages in thread
From: lancethepants at gmail dot com @ 2022-03-04 18:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

--- Comment #9 from Lance Fredrickson <lancethepants at gmail dot com> ---
Thanks a bunch!

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/101246] gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
  2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
                   ` (8 preceding siblings ...)
  2022-03-04 18:53 ` lancethepants at gmail dot com
@ 2022-03-04 18:56 ` ian at airs dot com
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2022-03-04 18:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101246

Ian Lance Taylor <ian at airs dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from Ian Lance Taylor <ian at airs dot com> ---
Should be fixed on tip.

Thanks for the patch.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-03-04 18:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 19:17 [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng lancethepants at gmail dot com
2021-06-28 19:25 ` [Bug go/101246] " ian at airs dot com
2021-06-28 20:36 ` lancethepants at gmail dot com
2021-06-28 20:42 ` ian at airs dot com
2021-06-28 20:48 ` lancethepants at gmail dot com
2021-07-08 21:20 ` lancethepants at gmail dot com
2021-08-19 19:36 ` lancethepants at gmail dot com
2022-02-23 16:55 ` lancethepants at gmail dot com
2022-03-04 18:47 ` cvs-commit at gcc dot gnu.org
2022-03-04 18:53 ` lancethepants at gmail dot com
2022-03-04 18:56 ` ian at airs dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).