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

run.bash: GOPATH should be set to a non-existent, non-empty string #19237

Closed
sean-jc opened this issue Feb 22, 2017 · 1 comment
Closed

run.bash: GOPATH should be set to a non-existent, non-empty string #19237

sean-jc opened this issue Feb 22, 2017 · 1 comment

Comments

@sean-jc
Copy link
Contributor

sean-jc commented Feb 22, 2017

Various tests invoked by run.bash fail if $GOROOT resides under $GOPATH. run.bash previously handled this via unset GOPATH prior to running the tests, but this is no longer sufficient as Go now defines a default $GOPATH (#17262), i.e $GOROOT may conflict with the default $GOPATH. This can be resolved by setting GOPATH to a semantically valid, non-empty string that is guaranteed not to conflict with $GOROOT, e.g. GOPATH=$GOROOT/nil.


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

1.8, or any build since dc4a815.

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

go env

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/sean/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build456320300=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

What did you do?

Clone go repository to /home/sean/go/src/github.com/golang/go, run all.bash.

What did you expect to see?

Successful build.

What did you see instead?

cgo tests that import local packages fail, e.g. gcc68255.go:10:2: local import "./gcc68255" in non-local package.

@gopherbot
Copy link
Contributor

CL https://golang.org/cl/37396 mentions this issue.

@golang golang locked and limited conversation to collaborators Feb 24, 2018
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

2 participants