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/compile: "version […] does not match go tool version" error is too vague #34214

Closed
jeanbza opened this issue Sep 10, 2019 · 5 comments
Closed
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@jeanbza
Copy link
Member

jeanbza commented Sep 10, 2019

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

deklerk at deklerk in ~/workspace/google-cloud-go on master
$ go version
go version go1.11.5 linux/amd64

Does this issue reproduce with the latest release?

Yes, I get version "go1.12.5" does not match go tool version "go1.13".

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

go env Output
$ go env
GOARCH="amd64"
GOBIN="/usr/local/google/home/deklerk/dev/go1.12.5.linux-amd64/go/bin"
GOCACHE="/usr/local/google/home/deklerk/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr/local/google/home/deklerk/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/google/home/deklerk/dev/go1.12.5.linux-amd64/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/google/home/deklerk/dev/go1.12.5.linux-amd64/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/usr/local/google/home/deklerk/workspace/google-cloud-go/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-build676893260=/tmp/go-build -gno-record-gcc-switch

What did you do?

deklerk at deklerk in ~/workspace/google-cloud-go on master
$ go run storage/internal/benchwrapper/main.go
# runtime/internal/sys
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# errors
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# unicode/utf16
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# unicode/utf8
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# encoding
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# math/bits
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# runtime/internal/atomic
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# unicode
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# internal/cpu
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# internal/race
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# crypto/subtle
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# internal/x/crypto/curve25519
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# internal/x/crypto/cryptobyte/asn1
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# internal/nettrace
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# container/list
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# crypto/internal/subtle
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# google.golang.org/grpc/resolver
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# go.opencensus.io
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# go.opencensus.io/trace/internal
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# go.opencensus.io/internal/tagencoding
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# sync/atomic
compile: version "go1.12.5" does not match go tool version "go1.11.5"
# runtime/cgo
compile: version "go1.12.5" does not match go tool version "go1.11.5"

What did you expect to see?

It works.

What did you see instead?

A bunch of errors that are totally opaque. What does "compile: version" mean? Is it the go.mod version? How do I fix it? Why does it need to be exactly the same, as the error suggests?

@bcmills
Copy link
Contributor

bcmills commented Sep 10, 2019

Usually this implies that the version of GOROOT/bin/go does not match the version used to compile GOROOT/pkg/[…]. Did you check out a different commit of the go repo and forget to run make.bash?

@FiloSottile
Copy link
Contributor

Alternatively, this can be due to running a go command with GOROOT set to a different version, or maybe a failed partial installation of Go.

@FiloSottile FiloSottile added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Sep 10, 2019
@andybons andybons changed the title version incompatibility cmd/go: version incompatibility Sep 11, 2019
@bcmills bcmills changed the title cmd/go: version incompatibility cmd/compile: "version […] does not match go tool version" error is too vague Sep 11, 2019
@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Sep 11, 2019
@bcmills bcmills added this to the Unplanned milestone Sep 11, 2019
@jeanbza
Copy link
Member Author

jeanbza commented Sep 11, 2019

Sounds like my environment is borked. Thanks for the help folks!

@jeanbza jeanbza closed this as completed Sep 11, 2019
@abliss
Copy link

abliss commented Feb 7, 2020

I hit this message today and I agree that it is too vague. Could the message perhaps include the full path to the two "things" (whatever they are) which don't agree with each other?

@ORESoftware
Copy link

Why can't I just recompile it with a different version of go?

@golang golang locked and limited conversation to collaborators Apr 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

6 participants