-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
all: support native build on Android #47727
Comments
This looks like a problem with the Android linker Does Go 1.16 work? It has the same use of |
Oh my god. You're right. This is a regression in Android 12 Developer Preview 4. Here's a OS: Android 12 aarch64
Host: google Pixel 3
Kernel: 4.9.270-gc51c7b10ee52-ab7522847
Uptime: 5 days, 1 hour, 38 mins
Packages: 109 (dpkg), 1 (pkg)
Shell: bash 5.1.8
CPU: Qualcomm SDM845 (8) @ 1.766GHz
Memory: 2690MiB / 3579MiB Termux is a terminal emulator for Android : https://github.com/termux/termux-app Google has been trying to forbid executing arbitrary code for a long time now, looks like they finally flipped the switch. Here's the latest updates from Termux
Since it will be no longer possible to build Go on Android, is it going to be dropped from Go's support or will Go continue to support up to Android 11? |
go1.17
on Termux
CC @hyangah to take a look |
Go supports and will probably continue to support Android as a target. As far as I can tell, Android is mostly not a developer platform and most Android developers don't build on Android. And I'm not sure there is a "standard" development environment. As far as I can tell, building on Android is not really officially supported and tested. |
As seen in go/src/internal/testenv/testenv.go Lines 37 to 49 in df9c5d8
go toolchains. This mode of android support was never intended.
|
The -llog flag has been removed from the golang that is cross-compiled for termux. If you want to compile golang in termux and be able to use it successfully you probably need to apply all three patches that termux applies.
The potential issues/drawbacks only happen for apps targeting android 11 or newer. As of now (and probably for the foreseeable future) termux targets android 10. This works fine for now except for that the app is not allowed to be updated through playstore (and will be removed at some points). There's nothing golang itself can do to be compatible with android >= 11, as the issue is when an app (like termux) runs (" |
Only $ go version go version go1.17 android/arm64
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: