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: Cannot get gomobile bind
to work with the canonical example
#21203
Comments
gomobile bind
to work with the canonical examplegomobile bind
to work with the canonical example
What does |
Does -x -v options output more info? |
BTW in my bug report I meant to say that i used @OneOfOne, here's what GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/paulcolea/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/7h/_z6wzdj13q788sl9dfb6qd84007fv6/T/go-build658723982=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2" @hyangah - I reran using [9:57:41 - 17-07-31] /usr/bin % gomobile bind -x -v -target=ios golang.org/x/mobile/example/bind/hello
GOMOBILE=/Users/paulcolea/go/pkg/gomobile
WORK=/var/folders/7h/_z6wzdj13q788sl9dfb6qd84007fv6/T/gomobile-work-916204126
write /var/folders/7h/_z6wzdj13q788sl9dfb6qd84007fv6/T/gomobile-work-916204126/src/gomobile_bind/interfaces.go
mkdir -p $WORK/src/gomobile_bind
write /var/folders/7h/_z6wzdj13q788sl9dfb6qd84007fv6/T/gomobile-work-916204126/gen/src/ObjC/interfaces.go
mkdir -p $WORK/gen/src/ObjC
write /var/folders/7h/_z6wzdj13q788sl9dfb6qd84007fv6/T/gomobile-work-916204126/src/gomobile_bind/interfaces.h
mkdir -p $WORK/src/gomobile_bind
write /var/folders/7h/_z6wzdj13q788sl9dfb6qd84007fv6/T/gomobile-work-916204126/src/gomobile_bind/interfaces.m
mkdir -p $WORK/src/gomobile_bind
GOOS=darwin GOARCH=arm GOARM=7 CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang CGO_CFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -miphoneos-version-min=6.1 -arch armv7 CGO_LDFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -miphoneos-version-min=6.1 -arch armv7 CGO_ENABLED=1 GOPATH=$WORK/gen: go install -pkgdir=$GOMOBILE/pkg_darwin_arm -tags ios -v -x golang.org/x/mobile/example/bind/hello
go: GOPATH entry is relative; must be absolute path: "".
For more details see: 'go help gopath'
rm -r -f "$WORK"
gomobile: go install -pkgdir=/Users/paulcolea/go/pkg/gomobile/pkg_darwin_arm -tags ios -v -x golang.org/x/mobile/example/bind/hello failed: exit status 2 |
Hey, I had the same problem and the solution:
Cheers |
Thanks so much @oliverFU! This solved my problem indeed :) |
@paulcolea i had the same problem with you, but it still didn't work using above method, can you tell me why? please |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8.3 darwin/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
What did you do?
I tried to follow the basic
gomobile bind
example on https://github.com/golang/go/wiki/Mobile, and ran:gomobile build -target=ios golang.org/x/mobile/example/basic
What did you expect to see?
That the example would work and an iOS library would be built.
What did you see instead?
gomobile: go install -pkgdir=/Users/paulcolea/go/pkg/gomobile/pkg_darwin_arm -tags ios golang.org/x/mobile/example/bind/hello failed: exit status 2
go: GOPATH entry is relative; must be absolute path: "".
For more details see: 'go help gopath'
When checking the GOPATH, I can see it's correctly set:
[17:09:47 - 17-07-28] /Users/paulcolea/go/src/golang.org/x/mobile/example/bind % go env GOPATH
/Users/paulcolea/go
The text was updated successfully, but these errors were encountered: