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 init fails to download ndk on x86 host #18522
Comments
To the best of my knowledge, the NDK dropped 32-bit support on Linux quite a few releases ago. They still seem to offer 32-bit builds for Windows, though. |
32-bit Linux is not supported anymore. We should die with a proper error message saying it is not supported. |
@rakyll |
There is no way to override the NDK location right now, but you should be able to override CC, CXX, CGO_CFLAGS, CGO_CPPFLAGS and CGO_LDFLAGS individually to target an earlier version of NDK toolchain. |
CL https://golang.org/cl/35173 mentions this issue. |
Gomobile has up until now used stripped NDKs hosted by Google. This arrangement adds maintenance overhead and blocks the use of custom NDKs or custom API levels. Also, as noted in issue 16211, the stripped NDK is no longer tiny because Gomobile supports more platforms. This CL removed the code for generating and packaging stripped NDKs and adds support for using external NDKs to the gomobile tool. gomobile init will now use the NDK installed by the Android SDK manager, if present, or a user specified NDK if the -ndk flag is given. If no NDK was found or specified, Android initialization is skipped. gomobile will instruct the user to run init with a valid NDK if bind or build is invoked without Android initialization. gomobile init will also attempt to build OpenAL for Android if the -openal flag specifies a source directory. It needs cmake and, on Windows, nmake installed. If gomobile build is run on an app that requires golang.org/x/mobile/exp/audio/al and OpenAL wasn't built by init, the user is instructed to do so. Tested on Linux, macOS, Windows. Fixes golang/go#16211 Fixes golang/go#18522 Change-Id: Ia38f6e43e671a207dad562678c65225b426e7e3e Reviewed-on: https://go-review.googlesource.com/35173 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Gomobile has up until now used stripped NDKs hosted by Google. This arrangement adds maintenance overhead and blocks the use of custom NDKs or custom API levels. Also, as noted in issue 16211, the stripped NDK is no longer tiny because Gomobile supports more platforms. This CL removed the code for generating and packaging stripped NDKs and adds support for using external NDKs to the gomobile tool. gomobile init will now use the NDK installed by the Android SDK manager, if present, or a user specified NDK if the -ndk flag is given. If no NDK was found or specified, Android initialization is skipped. gomobile will instruct the user to run init with a valid NDK if bind or build is invoked without Android initialization. gomobile init will also attempt to build OpenAL for Android if the -openal flag specifies a source directory. It needs cmake and, on Windows, nmake installed. If gomobile build is run on an app that requires golang.org/x/mobile/exp/audio/al and OpenAL wasn't built by init, the user is instructed to do so. Tested on Linux, macOS, Windows. Fixes golang/go#16211 Fixes golang/go#18522 Change-Id: Ia38f6e43e671a207dad562678c65225b426e7e3e Reviewed-on: https://go-review.googlesource.com/35173 Reviewed-by: David Crawshaw <crawshaw@golang.org>
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.7.4 linux/386
What operating system and processor architecture are you using (
go env
)?GOARCH="386"
GOBIN=""
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/max/dev/workspace/go"
GORACE=""
GOROOT="/home/max/dev/go"
GOTOOLDIR="/home/max/dev/go/pkg/tool/linux_386"
CC="gcc"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build501597397=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
What did you do?
I'm trying to install gomobile using https://github.com/golang/go/wiki/Mobile as a manual.
Running (
gomobile init
) ends up with error message:"gomobile: error fetching https://dl.google.com/go/mobile/gomobile-ndk-r12b-linux-x86.tar.gz, status: 404 Not Found"
Looks like it just can't find proper ndk to download. Is there any known fix or workaround for this?
The text was updated successfully, but these errors were encountered: