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/mobile: gomobile version doesn't work when not checked out under GOPATH or not built in GOPATH mode #37654

davidsteed opened this issue Mar 4, 2020 · 3 comments
mobile NeedsInvestigation


Copy link

@davidsteed davidsteed commented Mar 4, 2020

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

$ go version
go version go1.13.4 linux/amd64

Does this issue reproduce with the latest release?


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


What did you do?

gomobile version
gomobile version unknown: mobile repo git log failed: exit status 128, fatal: not a git repository (or any of the parent directories): .git

Copy link

@hyangah hyangah commented Mar 4, 2020

For now, the gomobile needs to be checked out under GOPATH and built in GOPATH mode.
Maybe we can now stop doing that and move to use the runtime/debug.ReadBuildInfo or go version -m.

@dmitshur dmitshur added NeedsInvestigation mobile labels Mar 4, 2020
@dmitshur dmitshur added this to the Unreleased milestone Mar 4, 2020
@dmitshur dmitshur changed the title go mobile version not working x/mobile: gomobile version doesn't work when not checked out under GOPATH or not built in GOPATH mode Mar 4, 2020
Copy link

@daluu daluu commented Mar 24, 2020

Can you clarify what it means to "build in GOPATH mode"? What is this alternate build method from the standard instructions of go getting the package.

Copy link

@daluu daluu commented Mar 24, 2020

Well, for me, the following worked, so maybe this what was meant for how to build. Just go get the gomobile package from any directory without a go.mod file.

When I did it inside a directory with go.mod, the source code wasn't copied to $GOPATH src tree, and the binary seems to be functioning improperly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
mobile NeedsInvestigation
None yet

No branches or pull requests

4 participants