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-target panics with error indicating arm64 is unsupported #48510

Closed
iyutong opened this issue Sep 21, 2021 · 4 comments
Closed
Labels
FrozenDueToAge mobile Android, iOS, and x/mobile NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@iyutong
Copy link

iyutong commented Sep 21, 2021

panic: unsupported GOARCH: arm64

goroutine 1 [running]:
main.archNDK(...)
        /go/src/golang.org/x/mobile/cmd/gomobile/env.go:408
main.(*ndkToolchain).Path(0x40001a1af0, {0x400001e031, 0xb}, {0x38207e, 0x5})
        /go/src/golang.org/x/mobile/cmd/gomobile/env.go:437 +0x78
main.envInit()
        /go/src/golang.org/x/mobile/cmd/gomobile/env.go:164 +0x1b4
main.buildEnvInit()
        /go/src/golang.org/x/mobile/cmd/gomobile/env.go:149 +0x2f4
main.runBuildImpl(0x6180c0)
        /go/src/golang.org/x/mobile/cmd/gomobile/build.go:86 +0x3c
main.runBuild(0x6180c0)
        /go/src/golang.org/x/mobile/cmd/gomobile/build.go:79 +0x28
main.main()
        /go/src/golang.org/x/mobile/cmd/gomobile/main.go:73 +0x4b4
@r3inbowari
Copy link

r3inbowari commented Sep 21, 2021

Android NDK does not contain arm64 toolchains (until and including NDK 23)
about arm support

@iyutong
Copy link
Author

iyutong commented Sep 21, 2021

Android NDK 不包含有关 arm 支持的arm64 工具链(直到并包括 NDK 23)

I compiled the ARM64 version of NDK on my own and was able to pack things in just fine use

@changkun
Copy link
Member

I compiled the ARM64 version of NDK on my own and was able to pack things in just fine use

It is not yet supported because NDK does not yet support arm64. If you build your own NDK, then you may have to maintain your own gomobile dependency. A workaround may set arch to "arm64" in https://github.com/golang/mobile/blob/6d8ad35e460371e979b330d80492cba19676f933/cmd/gomobile/env.go#L399-L406

@mknyszek mknyszek added mobile Android, iOS, and x/mobile WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Oct 4, 2021
@mknyszek mknyszek changed the title How to solve this problem, run gomobile bind-target = android to report an error x/mobile: gomobile bind-target panics with error indicating arm64 is unsupported Oct 4, 2021
@gopherbot gopherbot added this to the Unreleased milestone Oct 4, 2021
@mknyszek
Copy link
Contributor

mknyszek commented Oct 4, 2021

@ytxyyt I think @changkun answered your question, but I'd appreciate it if you could fill in more detail about what exactly you were trying to do in your original post. As such, I left it as waiting for info.

I'm not familiar with exactly what's going on here though. Seems like this is unsupported. Should there be another issue about support if the NDK (Android SDK?) will support arm64 in the future? Thanks. Please close the issue if this is resolved.

@mknyszek mknyszek added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 4, 2021
@iyutong iyutong closed this as completed Oct 5, 2021
@golang golang locked and limited conversation to collaborators Oct 5, 2022
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 NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants