Skip to content
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

make.bash: spurious "supported GOARCH" warning #41525

Closed
aclements opened this issue Sep 21, 2020 · 1 comment
Closed

make.bash: spurious "supported GOARCH" warning #41525

aclements opened this issue Sep 21, 2020 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@aclements
Copy link
Member

What version of Go are you using (go version)?

$ go version
go version devel +b4ea672009 Mon Sep 21 01:30:48 2020 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes. And with Go 1.14 (but not Go 1.13)

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/austin/.cache/go-build"
GOENV="/home/austin/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/austin/r/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/austin/r/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/austin/go.dev"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/austin/go.dev/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/austin/go.dev/src/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build542776898=/tmp/go-build -gno-record-gcc-switches"

What did you do?

While using Go 1.4 as the bootstrap compiler:
GOOS=linux GOARCH=arm64 ./make.bash

What did you expect to see?

Logs from a successful cross-compilation.

What did you see instead?

Before the successful cross-compilation, the following scary-sounding warning:
2020/09/21 09:05:27 unsupported GOARCH arm64

This output comes from make.bash invoking go version on the bootstrap compiler with the GOOS and GOARCH provided by the user. Since I'm using 1.4 as a bootstrap and it didn't support GOARCH=arm64 (or many other GOARCHes), the bootstrap compiler complains.

It looks like this was introduced in CL 204757 as a simple debugging aid to print the bootstrap compiler's version in the make.bash log. Probably the simplest thing to do is just clear GOOS and GOARCH on the go version invocation.

/cc @bradfitz @ianlancetaylor

@aclements aclements added the NeedsFix The path to resolution is known, but the work has not been done. label Sep 21, 2020
@aclements aclements added this to the Unplanned milestone Sep 21, 2020
@gopherbot
Copy link

Change https://golang.org/cl/256297 mentions this issue: make.bash: avoid warning when bootstrap doesn't support GOOS/GOARCH

@golang golang locked and limited conversation to collaborators Sep 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants