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

x/build/DIR: pkgbuild produces an installer that installs to /usr/local/go/bin/go, no longer in PATH on os X mojave #28901

Open
b5 opened this issue Nov 20, 2018 · 5 comments

Comments

@b5
Copy link

commented Nov 20, 2018

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

go 1.11.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

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

darwin/amd64

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/b5/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/b5/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/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/6p/sjn8bct92397mbgwmwwvcb4h0000gn/T/go-build195699704=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Ran the go .pkg installer downloaded from golang.org. Installer completes successfully. I then moved over to the command line & ran:

$ which go
go not found

What did you expect to see?

I was hoping to see /usr/local/go/bin/go, or for some magic created by pkgbuild/productbuild to symlink /usr/local/go/bin/go -> /usr/local/bin/go. but alas, nope. This problem only seems to exist on os x Mojave (as far as I can tell).

What did you see instead?

go not found

My guess is the fix will land here

@gopherbot gopherbot added this to the Unreleased milestone Nov 20, 2018

@gopherbot gopherbot added the Builders label Nov 20, 2018

@agnivade

This comment has been minimized.

Copy link
Member

commented Nov 21, 2018

See https://golang.org/doc/install#macos.

You have to restart any existing Terminal sessions for the $PATH changes to take effect. Have you done that ?

@b5

This comment has been minimized.

Copy link
Author

commented Nov 27, 2018

Apologies for the delay, yes I have / did create a new session at the time. $PATH changes are present, the issue is the go tool itself isn't available.

@agnivade

This comment has been minimized.

Copy link
Member

commented Nov 27, 2018

If the $PATH changes are present, I fail to see how the go tool isn't available. Can you dump the output of $PATH variable ?

@b5

This comment has been minimized.

Copy link
Author

commented Nov 27, 2018

relevant components of my $PATH:

$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/b5/go/bin
@agnivade

This comment has been minimized.

Copy link
Member

commented Nov 28, 2018

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.