Skip to content

gomobile: init fails to install gobind because it's missing the version #51078

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

Closed
gf3 opened this issue Feb 8, 2022 · 2 comments
Closed

gomobile: init fails to install gobind because it's missing the version #51078

gf3 opened this issue Feb 8, 2022 · 2 comments

Comments

@gf3
Copy link

gf3 commented Feb 8, 2022

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

$ go version

go version go1.17.2 darwin/arm64

Does this issue reproduce with the latest release?

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

go env Output
$ go env

GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/gianni/Library/Caches/go-build"
GOENV="/Users/gianni/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/gianni/.go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/gianni/.go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/homebrew/Cellar/go/1.17.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/homebrew/Cellar/go/1.17.2/libexec/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.17.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7g/yp6261y56h307cmzhxr8f7740000gn/T/go-build4244256730=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

gomobile init

What did you see instead?

$ gomobile init

gomobile: go install golang.org/x/mobile/cmd/gobind failed: exit status 1
go install: version is required when current directory is not in a module
	Try 'go install golang.org/x/mobile/cmd/gobind@latest' to install the latest version

Affected area

Source of issue is here: https://github.com/golang/mobile/blob/858099ff7816818cadcc1811d602f42640d33bb5/cmd/gomobile/init.go#L81

@changkun
Copy link
Member

changkun commented Feb 8, 2022

duplicate of #50994

@gf3
Copy link
Author

gf3 commented Feb 8, 2022

thanks @changkun

@gf3 gf3 closed this as completed Feb 8, 2022
@golang golang locked and limited conversation to collaborators Feb 8, 2023
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

3 participants