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 looking for wrong file? #18876

Closed
ekeskin opened this issue Feb 1, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@ekeskin
Copy link

commented Feb 1, 2017

Please answer these questions before submitting your issue. Thanks!

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

go version go1.7.5 darwin/amd64

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

GOARCH="amd64"
GOBIN="/Users/ekeskin/Documents/Gopath/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/ekeskin/Documents/Gopath/"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/vc/p3yc91kj299bkcj0g9sr5z4h0000gn/T/go-build005903550=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

What did you do?

gomobile bind -target android golang.org/x/mobile/example/bind/hello/

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

What did you expect to see?

Succesful build of the aar.

What did you see instead?

./bin/gomobile: loadExportData failed open /Users/ekeskin/Documents/Gopath/pkg/gomobile/pkg_android_arm/golang.org/x/mobile/example/bind/hello/.a: no such file or directory

When i examine the path "/Users/ekeskin/Documents/Gopath/pkg/gomobile/pkg_android_arm/golang.org/x/mobile/example/bind/", i realized there is a file named "hello.a" instead file named ".a" under directory "hello"

@ALTree ALTree changed the title Gomobile bind looking for wrong file? x/mobile: gomobile bind looking for wrong file? Feb 1, 2017

@ALTree

This comment has been minimized.

Copy link
Member

commented Feb 1, 2017

Can you try with go1.8?

Possibly related: #17945

@eliasnaur

This comment has been minimized.

Copy link
Contributor

commented Feb 7, 2017

Make sure you've run go install golang.org/x/mobile/cmd/... after go get'ing or otherwise updated gomobile. After that, make sure you've run gomobile init.

If all else fails, I'll need a (small) sample to reproduce the error.

@ekeskin

This comment has been minimized.

Copy link
Author

commented Feb 20, 2017

the problem caused by '/' at the end of the

gomobile bind -target android golang.org/x/mobile/example/bind/hello/

and it should be

gomobile bind -target android golang.org/x/mobile/example/bind/hello

@ekeskin ekeskin closed this Feb 20, 2017

@gopherbot

This comment has been minimized.

Copy link

commented Feb 21, 2017

CL https://golang.org/cl/37323 mentions this issue.

gopherbot pushed a commit to golang/mobile that referenced this issue Feb 21, 2017

Elias Naur
cmd/gomobile: clean package paths
Clean the package paths so gomobile use the same directory for the
export data (*.a) files as the go tool.

Fixes golang/go#18876.

Change-Id: I40285f9203f04dbb80b21bd74d9b24212b677533
Reviewed-on: https://go-review.googlesource.com/37323
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>

@golang golang locked and limited conversation to collaborators Feb 21, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.