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 bind fails when GOPATH="" #21658

Closed
landsnail opened this issue Aug 28, 2017 · 2 comments
Closed

x/mobile: gomobile bind fails when GOPATH="" #21658

landsnail opened this issue Aug 28, 2017 · 2 comments
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Milestone

Comments

@landsnail
Copy link

landsnail commented Aug 28, 2017

use 1.8.3
gomobile build and install was success but fail with bind

the console log:

gomobile: loadExportData failed go install -pkgdir=/Users/landsnail/go/pkg/gomobile/pkg_android_arm -gcflags=-shared -ldflags=-shared test failed: exit status 2
go: GOPATH entry is relative; must be absolute path: "".
For more details see: 'go help gopath'

oh, i am using mac with OSX system.

if someone can repply?

@crawshaw
Copy link
Member

crawshaw commented Sep 3, 2017

Looks like gomobile may need to be updated to handle the new meaning of a missing GOPATH.

For now, you can make it work with: export GOPATH=$HOME/go.

@crawshaw crawshaw changed the title when use "gomobile bind" compile a aar,it fail x/mobile: gomobile bind fails when GOPATH="" Sep 3, 2017
@gopherbot gopherbot added this to the Unreleased milestone Sep 3, 2017
@gopherbot gopherbot added the mobile Android, iOS, and x/mobile label Sep 3, 2017
@gopherbot
Copy link

Change https://golang.org/cl/101117 mentions this issue: cmd/gobind,cmd/gomobile: support the default GOPATH

@golang golang locked and limited conversation to collaborators Mar 26, 2019
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 10, 2021
Instead of using os.Getenv("GOPATH"), use go env GOPATH to determine
the effective GOPATH.

Fixes golang/go#21658

Change-Id: I03f897969e30fc3256d171aa7b32c101a9342a1a
Reviewed-on: https://go-review.googlesource.com/101117
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
imWildCat pushed a commit to imWildCat/go-mobile that referenced this issue Apr 11, 2021
Instead of using os.Getenv("GOPATH"), use go env GOPATH to determine
the effective GOPATH.

Fixes golang/go#21658

Change-Id: I03f897969e30fc3256d171aa7b32c101a9342a1a
Reviewed-on: https://go-review.googlesource.com/101117
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile
Projects
None yet
Development

No branches or pull requests

3 participants