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 iOS bind error unknown GOARCH #24571

Closed
janke99 opened this issue Mar 28, 2018 · 6 comments
Closed

x/mobile: gomobile iOS bind error unknown GOARCH #24571

janke99 opened this issue Mar 28, 2018 · 6 comments

Comments

@janke99
Copy link

@janke99 janke99 commented Mar 28, 2018

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

go1.10 darwin/amd64

Does this issue reproduce with the latest release?

yes

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

mac mini
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/jane/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/jane/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/9m/d0cqs4fj04j3sj8g28t40mv80000gn/T/go-build227436364=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

go get golang.org/x/mobile/cmd/gomobile
gomobile init
gomobile bind -target=ios golang.org/x/mobile/example/bind/hello

get this error:----

panic: unknown GOARCH: ""

goroutine 1 [running]:
main.archClang(0x0, 0x0, 0x1, 0x13050c2)
/Users/jane/go/src/golang.org/x/mobile/cmd/gomobile/env.go:199 +0x27c
main.goIOSBind(0xc42018c260, 0x19, 0xc42019c020, 0x1, 0x1, 0x1, 0x0)
/Users/jane/go/src/golang.org/x/mobile/cmd/gomobile/bind_iosapp.go:61 +0x85f
main.runBind(0x14a5ec0, 0x0, 0x0)
/Users/jane/go/src/golang.org/x/mobile/cmd/gomobile/bind.go:134 +0x60a
main.main()
/Users/jane/go/src/golang.org/x/mobile/cmd/gomobile/main.go:73 +0x34e

What did you expect to see?

What did you see instead?

@odeke-em odeke-em changed the title gomobile ios bind error unknow GOARCH x/mobile: gomobile iOS bind error unknown GOARCH Mar 28, 2018
@gopherbot gopherbot added this to the Unreleased milestone Mar 28, 2018
@gopherbot gopherbot added the mobile label Mar 28, 2018
@odeke-em

This comment has been minimized.

Copy link
Member

@odeke-em odeke-em commented Mar 28, 2018

@lenlee

This comment has been minimized.

Copy link

@lenlee lenlee commented Mar 28, 2018

I also encounter this problem, cannot resolve.

@eliasnaur

This comment has been minimized.

Copy link
Contributor

@eliasnaur eliasnaur commented Mar 28, 2018

I can't reproduce the panic. Are your version of golang.org/x/mobile up to date? For example, try go get -u golang.org/x/mobile/cmd/gomobile (with the -u flag) and bind again.

@lenlee

This comment has been minimized.

Copy link

@lenlee lenlee commented Mar 28, 2018

@eliasnaur Thanks for your help, i have solved this problem. @janke99 @odeke-em The reason is that our pc donnot have xcode. Xcode is ios develop IDE. I downloaded it and this problem is solved. Read this: https://godoc.org/golang.org/x/mobile/cmd/gomobile

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Mar 28, 2018

Change https://golang.org/cl/102896 mentions this issue: cmd/gomobile: add missing checks for the NDK and Xcode

@janke99

This comment has been minimized.

Copy link
Author

@janke99 janke99 commented Mar 28, 2018

@lenlee @eliasnaur Thanks for your help, i have solved this problem

@janke99 janke99 closed this Mar 28, 2018
gopherbot pushed a commit to golang/mobile that referenced this issue Mar 28, 2018
Fixes golang/go#24571

Change-Id: I8d08548b4a4d6f9490a8bfd80c80a6408fde089b
Reviewed-on: https://go-review.googlesource.com/102896
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
@golang golang locked and limited conversation to collaborators Mar 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.