From: Jonathan Wakely <jwakely.gcc@gmail.com>
To: Ian Lance Taylor <iant@golang.org>
Cc: "Matthew R. Wilson" <mwilson@mattwilson.org>,
gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Error when building gcc w/ Go language on Solaris
Date: Sun, 17 Apr 2022 09:23:44 +0100 [thread overview]
Message-ID: <CAH6eHdREmUAWH9BXnT0nR6Sp2qWRgPazRd-VNjjtBtTbjemL2Q@mail.gmail.com> (raw)
In-Reply-To: <CAKOQZ8wdV4+bWEB3hXAZnF_kuAwaovvOdr6QPk+vEbRmbEOd4A@mail.gmail.com>
On Sun, 17 Apr 2022, 01:39 Ian Lance Taylor, <iant@golang.org> wrote:
> On Sat, Apr 16, 2022 at 12:42 PM Jonathan Wakely via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
> >
> > On Sat, 16 Apr 2022, 20:24 Matthew R. Wilson, <mwilson@mattwilson.org>
> > wrote:
> >
> > > On 04.16.2022 07:33, Jonathan Wakely wrote:
> > > >On Sat, 16 Apr 2022, 06:40 Matthew R. Wilson, <mwilson@mattwilson.org
> >
> > > >wrote:
> > > >
> > > >> I am revisiting my attempts to build GCC with Go language support on
> > > >> Solaris/SPARCv9.
> > > >>
> > > >> The error I get when I make is:
> > > >> ../.././gotools/../libgo/go/cmd/go/main.go:10:16: error:
> > > >>
> > >
> /export/home/mwilson/gcc-build/gcc-11.2.0/host-sparcv9-sun-solaris2.11/gcc/context.o
> > > >> exists but does not contain any Go export data
> > > >>
> > > >> 3) Set my PATH to: /opt/mrwgcc:/usr/bin:/usr/sbin
> > > >>
> > > >> 4) configured gcc 11.2 with a similar set of options as the
> > > >> Solaris-provided gcc:
> > > >>
> > > >> ./configure --prefix=/opt/mrwgcc \
> > > >> --enable-languages=c,c++,go --enable-shared \
> > > >> --enable-initfini-array \
> > > >> --disable-rpath --with-system-zlib --with-build-config=no \
> > > >> --without-gnu-ld --with-ld=/usr/bin/ld \
> > > >> --with-gnu-as --with-as=/opt/mrwgcc/bin/as
> > > sparcv9-sun-solaris2.11
> > > >
> > > >Just a guess, but maybe the Go build uses sed or another command like
> > > >that, and relies on the POSIX-conforming version in /usr/xpg4/bin
> > > >rather than the /usr/bin one. Try putting /usr/xpg4/bin in your path,
> > > >just after /opt/mrwgcc/bin
> > >
> > > Aha! What a great guess -- that fixed it! Thank you so much!
> > >
> >
> > Great! We should document this, if we don't already. And even better
> would
> > be if the build failed with a clear error mentioning the need for POSIX
> sed
> > (or whichever command it was).
>
> I'm happy to fix the POSIX sed requirement if we can find out where it
> comes in.
>
> I can't seem to access any Solaris systems at the moment so I can't
> recreate it myself.
>
We have a couple in the GCC compiler farm. I'll look into it on Tuesday.
> It's true that the Go build requires objcopy. It's interesting that
> the error message refers to context.o. At that point in the build
> there should be context.gox in the libgo build directory, and the
> compiler should find that one first. And even if content.gox doesn't
> exist for some reason, the context.o file should contain export data
> in the ".go_export" section. So I'm puzzled.
>
> Ian
>
next prev parent reply other threads:[~2022-04-17 8:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-16 5:39 Matthew R. Wilson
2022-04-16 6:33 ` Jonathan Wakely
2022-04-16 19:24 ` Matthew R. Wilson
2022-04-16 19:41 ` Jonathan Wakely
2022-04-16 19:47 ` Marc Glisse
2022-04-16 23:17 ` Jonathan Wakely
2022-04-17 0:38 ` Ian Lance Taylor
2022-04-17 8:23 ` Jonathan Wakely [this message]
2022-04-19 13:36 ` Jonathan Wakely
2022-04-19 19:50 ` Ian Lance Taylor
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=CAH6eHdREmUAWH9BXnT0nR6Sp2qWRgPazRd-VNjjtBtTbjemL2Q@mail.gmail.com \
--to=jwakely.gcc@gmail.com \
--cc=gcc-help@gcc.gnu.org \
--cc=iant@golang.org \
--cc=mwilson@mattwilson.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).