{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/335","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/335/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/335/events","html_url":"https://github.com/cockroachdb/cockroach/issues/335","id":58360783,"number":335,"title":"Build problems due to `go clean -r` and $GOPATH","user":{"login":"tschottdorf","id":5076964,"avatar_url":"https://avatars.githubusercontent.com/u/5076964?v=3","gravatar_id":"","url":"https://api.github.com/users/tschottdorf","html_url":"https://github.com/tschottdorf","followers_url":"https://api.github.com/users/tschottdorf/followers","following_url":"https://api.github.com/users/tschottdorf/following{/other_user}","gists_url":"https://api.github.com/users/tschottdorf/gists{/gist_id}","starred_url":"https://api.github.com/users/tschottdorf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tschottdorf/subscriptions","organizations_url":"https://api.github.com/users/tschottdorf/orgs","repos_url":"https://api.github.com/users/tschottdorf/repos","events_url":"https://api.github.com/users/tschottdorf/events{/privacy}","received_events_url":"https://api.github.com/users/tschottdorf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-20T14:36:25Z","updated_at":"2015-02-20T16:09:23Z","closed_at":null,"body":"- in 261b30bb we moved to using `go clean -r`, which recursively also cleans dependencies. Unfortunately, that includes the standard library, which resides in `/usr/local/go` (at least when using `godeb`) and isn't accessible by user accounts. Hence invocations of `make clean` will fail.\r\n\r\n  It's the same problem [this guy](http://stackoverflow.com/questions/23884525/go-clean-i-r-tries-to-remove-usr-local-go-pkg-linux-amd64-runtime-a) is having. For `go build -a`, there was a related change here: [make build -a skip standard packages in Go releases](https://code.google.com/p/go/source/detail?r=6364b071649c).\r\n\r\n  The workaround for now is to use `sudo GOPATH=$GOPATH make clean`, but then I also need to run `make build` via `sudo` because I won't have a standard library any more.\r\n\r\n- in 37dbbcb9 we switched the order of the vendored and global $GOPATH variables. That means I'm not allowed to have coreos/etcd in my global GOPATH or it will prefer that over the vendored version."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/75263585","html_url":"https://github.com/cockroachdb/cockroach/issues/335#issuecomment-75263585","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/335","id":75263585,"user":{"login":"petermattis","id":6201335,"avatar_url":"https://avatars.githubusercontent.com/u/6201335?v=3","gravatar_id":"","url":"https://api.github.com/users/petermattis","html_url":"https://github.com/petermattis","followers_url":"https://api.github.com/users/petermattis/followers","following_url":"https://api.github.com/users/petermattis/following{/other_user}","gists_url":"https://api.github.com/users/petermattis/gists{/gist_id}","starred_url":"https://api.github.com/users/petermattis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petermattis/subscriptions","organizations_url":"https://api.github.com/users/petermattis/orgs","repos_url":"https://api.github.com/users/petermattis/repos","events_url":"https://api.github.com/users/petermattis/events{/privacy}","received_events_url":"https://api.github.com/users/petermattis/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T16:09:23Z","updated_at":"2015-02-20T16:09:23Z","body":"Hmm, I hadn't noticed that behavior of `go clean -r`. Perhaps the right thing is `go clean ./...`. Let me experiment."}}