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

$GOPATH value not being recognized during build #28593

Closed
andrewinfosec opened this issue Nov 4, 2018 · 3 comments
Closed

$GOPATH value not being recognized during build #28593

andrewinfosec opened this issue Nov 4, 2018 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@andrewinfosec
Copy link

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

$ go version
go version go1.11.2 darwin/amd64

Does this issue reproduce with the latest release?

I believe go version go1.11.2 darwin/amd64 is the latest release.

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/me/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/me/Google Drive/programming/golang/workspace"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.11.2/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.11.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/hb/9lrqhggd35qcrfsgfvgc4gcm0000gn/T/go-build297024427=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ echo $GOPATH
/Users/me/Google Drive/programming/golang/workspace
$ go run foo.go
foo.go:4:2: cannot find package "github.com/google/gopacket" in any of:
/usr/local/Cellar/go/1.11.2/libexec/src/github.com/google/gopacket (from $GOROOT)
/Users/me/go/src/github.com/google/gopacket (from $GOPATH)

What did you expect to see?

A successful build.

What did you see instead?

$GOPATH is set but is not being recognized. $GOPATH is defaulting to /Users/me/go even though it has a set value.

@bradfitz
Copy link
Contributor

bradfitz commented Nov 5, 2018

What does diskutil list say? Does it work if you use a path that's not under Google Drive? Does it work for a path not containing spaces?

@agnivade agnivade added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 5, 2018
@mvdan
Copy link
Member

mvdan commented Nov 5, 2018

Also, is the GOPATH variable actually exported? It needs to be for Go to see it. You can check via go env GOPATH.

@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Dec 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants