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
jadekler opened this issue Sep 10, 2019 · 3 comments
Closed

Comments

@jadekler
Copy link
Contributor

@jadekler jadekler 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

This comment has been minimized.

Copy link
Member

@bcmills 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

This comment has been minimized.

Copy link
Member

@FiloSottile FiloSottile commented Sep 10, 2019

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.

@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 this to the Unplanned milestone Sep 11, 2019
@jadekler

This comment has been minimized.

Copy link
Contributor Author

@jadekler jadekler commented Sep 11, 2019

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

@jadekler jadekler closed this Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.