public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "lancethepants at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/101246] New: gccgo cross-compiler targeting arm fails to build with gcc 11. Missing structs in runtime.inc. Using uclibc-ng
Date: Mon, 28 Jun 2021 19:17:56 +0000	[thread overview]
Message-ID: <bug-101246-4@http.gcc.gnu.org/bugzilla/> (raw)

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;
       |

             reply	other threads:[~2021-06-28 19:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 19:17 lancethepants at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-101246-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).