-
Notifications
You must be signed in to change notification settings - Fork 18k
x/mobile: panic: unsupported GOARCH: arm64 #46464
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
Comments
please fill out the entire template. |
Looks like he is hitting this panic https://github.com/golang/mobile/blob/master/cmd/gomobile/env.go#L298 cc @hajimehoshi |
What version of Go are you using (
|
@hyangah I don't have M1 Mac then I cannot test this, but I guess gomobile should support M1 environments and this should be easy. What do you think? |
Can't the toolchains be downloaded via Android Studio? |
Nope, as far as I can tell, there is no M1 build of NDK at all yet. |
Ah that makes sense. Then for M1 mac, we should invoke x64 toolchains with Rosetta. |
ndk support should be android/ndk#1299 , comments there say rosetta works |
” gomobile build -target=ios ” ,the same mistake |
Unfortunately this may help for Android by now, but not for iOS as with Xcode 13:
|
Change https://golang.org/cl/346153 mentions this issue: |
goroutine 1 [running]:
main.archNDK(...)
/Users/xxx/go/src/golang.org/x/mobile/cmd/gomobile/env.go:298
main.(*ndkToolchain).Path(0x14000197b00, 0x140000b8000, 0x29, 0x1011be402, 0x5, 0x0, 0x14000197938)
/Users/xxx/go/src/golang.org/x/mobile/cmd/gomobile/env.go:327 +0xc0
main.envInit(0x14000016047, 0x31)
/Users/xxx/go/src/golang.org/x/mobile/cmd/gomobile/env.go:108 +0xa0c
main.buildEnvInit(0x1014a8980, 0x1400011dc20, 0x0)
/Users/xxx/go/src/golang.org/x/mobile/cmd/gomobile/env.go:79 +0x1a8
main.runBuildImpl(0x10149f860, 0x0, 0x0, 0x0)
/Users/xxx/go/src/golang.org/x/mobile/cmd/gomobile/build.go:76 +0x38
main.runBuild(0x10149f860, 0x14000140020, 0x2)
/Users/xxx/go/src/golang.org/x/mobile/cmd/gomobile/build.go:69 +0x28
main.main()
/Users/xxx/go/src/golang.org/x/mobile/cmd/gomobile/main.go:73 +0x2c0
device: MacBook pro m1
The text was updated successfully, but these errors were encountered: