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

cmd/go/internal/bug: use the go tool in GOROOT to report go version and go ev #45708

Closed
perillo opened this issue Apr 22, 2021 · 1 comment
Closed

Comments

@perillo
Copy link
Contributor

perillo commented Apr 22, 2021

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

$ go version
go version go1.16.3 linux/amd64

Does this issue reproduce with the latest release?

Yes.

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

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/manlio/.local/bin"
GOCACHE="/home/manlio/.cache/go-build"
GOENV="/home/manlio/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE="*.local"
GOMODCACHE="/home/manlio/.local/lib/go/pkg/mod"
GONOPROXY=""
GONOSUMDB="*.local"
GOOS="linux"
GOPATH="/home/manlio/.local/lib/go:/home/manlio/src/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.3"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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-build2241291915=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.16.3 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.16.3
uname -sr: Linux 5.11.15-arch1-2
/usr/lib/libc.so.6: GNU C Library (GNU libc) release release version 2.33.
gdb --version: GNU gdb (GDB) 10.1

What did you do?

Running go bug from the Go repository.

What did you expect to see?

To see the go version and go env from the go command i'm using.

What did you see instead?

The go version and go env from the version of go from the version of go installed on the system.

Notes

I think that it is wrong for go bug to use the relative path to the go command. I'm also not sure to understand the need to show GOROOT/bin/go. The header in the bug report clearly says "What version of Go are you using", not "What version of Go is installed on your system".

For this reason I suggest that the entry GOROOT/bin/go should be removed, and the entry GOROOT/bin/go tool compile -V should be replaced with `go tool compile -V.

Note that when using, as an example, go1.10.3 bug from go get golang.org/dl/go1.10.3, GOROOT/bin/ is set as the first entry in PATH, so there is no problem.

@seankhliao
Copy link
Member

Duplicate of #43981

@seankhliao seankhliao marked this as a duplicate of #43981 Apr 22, 2021
@golang golang locked and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants