I am trying to understand how to make changes to compiler so that I can contribute to it.
I got the source code locally, then ran ./all.bash
, got the compiler binary. when I got these errors:
./bin/go build main.go
# internal/race
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# unicode/utf8
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# internal/unsafeheader
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# math/bits
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# runtime/internal/sys
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# unicode
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# runtime/internal/atomic
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# sync/atomic
compile: version "go1.16.3" does not match go tool version "go1.16.6"
# internal/cpu
compile: version "go1.16.3" does not match go tool version "go1.16.6"
Do I need to change my GOPATH or GOROOT? they are currently set to:
GOPATH="/Users/john/.go"
GOROOT="/usr/local/opt/go/libexec"