-
Notifications
You must be signed in to change notification settings - Fork 18k
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: init fails when running make_standalone_toolchain.py #27265
Comments
I believe I am having the same problem. I've updated the env.go file but how do you rebuild gomobile at this point? |
Running the |
Thanks. Given this I tried the following and pretty much get the same result as before. So, maybe I'm still doing something wrong or my problem is different. Does the following command look correct? I've trimmed the middle of its output. powershell> gomobile init -ndk C:\Users\auld\AppData\Local\Android\sdk1\ndk-bundle -v Installing std for android/arm.runtime/cgo runtime/cgoC:\Users\auld\AppData\Local\Android\sdk1\ndk-bundle\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin\ld: error: cannot open crtbegin_dynamic.o: No such file or directory |
From what I can see, your problem seems to be different. In your case it seems that the actual compilation of the Android native stuff fails:
|
OK, well thanks for your help, I'll keep digging. |
OK here is what works for me (I'm on Win10):
|
I believe this is fixed in the latest gomobile version. Can you confirm? |
Yes, it seems to be working fine now. |
OK, I renamed my GOPATH/src/x to xold$ go get golang.org/x/mobile/cmd/gomobile
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
I'm trying to install gomobile, but the init step fails.
The Android SDK version which I have installed is
18.0.4951716 rc2
.What did you expect to see?
I expected to see no error message at all.
What did you see instead?
From what I can see, the arguments specified to run the Android NDK
make_standalone_toolchain.py
are incorrect. When making the toolchain for eitherarm
orx86
requires a minimum api level of16
, not15
. This can easily be fixed by updating the following file:There, the NDK config should be updated from:
to
After patching this file manually, rebuilding the
gomobile
command, I was able to succesfully runbin/gomobile init -ndk /Library/Android/sdk/ndk-bundle
.The text was updated successfully, but these errors were encountered: