New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gccgo: "unsupported GOOS/GOARCH pair" using gccgo - regression #24398
Comments
I can't recreate this. Please show us the exact command that you are running and the exact output that you see. Thanks. |
Here is a way to reproduce:
Note that it also fails when not doing any building, as with the following command:
Background: I was trying to build a wrapper around the |
OK, I can recreate this if I use the gc version of the go tool, but not if I use the gccgo version of the go tool. Is that what you are doing? |
I'm not entirely sure what you mean? Are there two different versions of the |
Yes, there are two slightly different versions of the go command. If you install gccgo, you will get a gccgo-specific version of the command, which will default to |
Actually, I have Note that I have used
|
If you have installed gccgo, then in the same directory as the gccgo executable there is a go executable. Run that instead of /usr/local/go/bin/go. I'm not saying that there isn't a bug here. There is a bug. I'm just giving you a workaround. |
Ah, I didn't know about that! Thanks for the hint.
|
I think the go command error message is a little bit misleading. In the issue's case, I think it's better to show something like this:
|
Yes, we agree there is a bug here. Want to send a patch? Thanks. |
I took a dig and found that the root cause is that before real But this leading to call cmd/go/internal/work.Builder.Init, and this function will validate the OS/ARCH pair and may cause exit. And at that moment, the buildCmd is not executed and the I thought we can add a @ianlancetaylor what do you think, or have other idea? |
Seems to me that we should just move the call to |
Change https://golang.org/cl/234658 mentions this issue: |
Change https://golang.org/cl/236563 mentions this issue: |
The Builder isn't needed by MkEnv, and Builder.Init doesn't have side effects that change the environment. Builder.Init does currently call CheckGOOSARCHPair, but that's being moved out in CL 234658. Builder.Init creates the temporary work directory used by the builder. For the builder created in MkEnv, this directory is never used. Creating this directory can cause unnecessary errors for commands that don't use a builder like 'go clean' and 'go list'. Fixes #38395 Updates #24398 Change-Id: Ib93ae55afdf958000470657f4c4ff5bd92700e46 Reviewed-on: https://go-review.googlesource.com/c/go/+/236563 Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
Is there anything more needed for this issue? I'm seeing the following with a
That seems to match the desired behavior described in #24398 (comment). |
FYI: I'm not using |
It looks like issue #12272 is back in go 1.10, while it was still gone in go 1.9.4. It emits this error "unsupported GOOS/GOARCH pair" even when using
-compiler=gccgo
. As per #12272 (comment), I think it should be fixed again.Go version: go1.10 linux/amd64
Note: I'm trying to write a cross-compiler wrapper to the ESP32 (see here), which compiles with GOOS=esp32 and GOARCH=xtensa (I had to choose something for those values).
The text was updated successfully, but these errors were encountered: