Skip to content
This repository has been archived by the owner on Jul 3, 2020. It is now read-only.

Missing arm-linux-androideabi-gcc #208

Closed
kvark opened this issue Apr 23, 2019 · 10 comments
Closed

Missing arm-linux-androideabi-gcc #208

kvark opened this issue Apr 23, 2019 · 10 comments

Comments

@kvark
Copy link

kvark commented Apr 23, 2019

Following the readme instructions and reaching the point of running it:

cargo apk build
Compiling android_native_app_glue.c
error: could not execute process `/hub/tools/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc /hub/tools/android-ndk-r19c/sources/android/native_app_glue/android_native_app_glue.c -c -o /hub/moz/wr/target/android-artifacts/armv7-linux-androideabi/android_native_app_glue.o --sysroot /hub/tools/android-ndk-r19c/platforms/android-28/arch-arm` (never executed)

Caused by:
  No such file or directory (os error 2)

Checking the binaries in this folder:

kvark@ant /hub/tools/android-ndk-r19c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin $ ls
arm-linux-androideabi-addr2line  arm-linux-androideabi-c++filt  arm-linux-androideabi-gprof   arm-linux-androideabi-ld.gold  arm-linux-androideabi-objdump  arm-linux-androideabi-size
arm-linux-androideabi-ar         arm-linux-androideabi-dwp      arm-linux-androideabi-ld      arm-linux-androideabi-nm       arm-linux-androideabi-ranlib   arm-linux-androideabi-strings
arm-linux-androideabi-as         arm-linux-androideabi-elfedit  arm-linux-androideabi-ld.bfd  arm-linux-androideabi-objcopy  arm-linux-androideabi-readelf  arm-linux-androideabi-strip
@digiwizkid
Copy link

digiwizkid commented Apr 25, 2019

I am also getting similar issues with NDK version 19.2.*

cargo apk build          
Compiling android_native_app_glue.c
error: could not execute process 
`/home/subhadipl/Android/Sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc
/home/subhadipl/Android/Sdk/ndk-bundle/sources/android/native_app_glue/android_native_app_glue.c -c -o
/home/subhadipl/rusts/helloAndroid/target/android-artifacts/arm-linux-androideabi/android_native_app_glue.o --sysroot
/home/subhadipl/Android/Sdk/ndk-bundle/platforms/android-18/arch-arm` (never executed) Caused by: No such file or directory (os error 2)

@kvark
Copy link
Author

kvark commented Apr 25, 2019

I tried "r18b" NDK and now getting a different error:

/hub/tools/android-ndk-r18b/sources/android/native_app_glue/android_native_app_glue.c:18:10: fatal error: 'jni.h' file not found

@shreevari
Copy link

What does -c do in this command?

@digiwizkid
Copy link

-c Only run preprocess, compile, and assemble steps

@Gordon-F
Copy link

Gordon-F commented May 3, 2019

Looks like GCC not a part of the NDK.

android/ndk#802

@shijunti19
Copy link

How to solve it?

@krystcich
Copy link

krystcich commented May 14, 2019

@shijunti19 you need to download a revision before r18b, where GCC is still present e.g.
https://developer.android.com/ndk/downloads/older_releases.html#ndk-17c-downloads

That made Compiling android_native_app_glue.c error to go away for me.

@mb64
Copy link
Contributor

mb64 commented Jul 30, 2019

Fixed by #223.

@mb64 mb64 closed this as completed Jul 30, 2019
@ivnsch
Copy link

ivnsch commented Aug 3, 2019

@mb64 Could you please explain how to use master ("manual usage")? If I do what's in the readme now it still shows the same error.

@philip-alldredge
Copy link
Contributor

The version on crates.io is an older version unfortunately. See #221. To work around, either use the docker or checkout the code from git and install using cargo install --locked --force --path . from the cargo-apk directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants