Installing NDK (arm-linux-androideabi-gcc) on Android (Remix OS)

1.2k views Asked by At

I'm trying to install some python packages (pillow) for QPython on Remix however I get the error that arm-linux-androideabi-gcc does not exist.

I googled and I think I need NDK, however looking at the website (https://developer.android.com/ndk/downloads/index.html) I couldn't find a way to do this on android.

Any help is much appreciated, thank you!

3

There are 3 answers

0
Dan Albert On

Installing the NDK on Android? As in running the NDK compilers on an Android device? We don't support Android as a host OS for the NDK.

0
Jerk On

Check out AIDE android ide from the Google playstore

0
Surge1223 On

Despite Dan's answer, which I respect. It's not entirely accurate. The Android ndk build system doesn't allow for for host to be set to the $TARGET_ARCH, but building it manually in much the same way you would for any custom toolchain is entirely possible.

I should note that I have only done this for gcc, and have not attempted to do so with clang.

From Googles ndk toolchain repo just take the essentials needed, gcc, binutils, gmp, mpfr, etc and set your host and target to the ndk toolchain gcc. Use the ndk sysroot as build-sysroot, and then just add your compiler flags and with a little fiddling you should get it.

Id be happy to post more, it's been a project of mine to build Android on Android, also i highly recommend adding static versions of the ndk libs, as the android system doesn't have a c++ lib, and a few others. You may have to build some manually using aosp build system

I built it with stage-one flags so that the binaries would be static, as you never know when android might remove a lib that your toolchain depends on.

I encourage you to try, as an added benefit you will then he able to build many useful android native binaries that usually aren't available without editing the aosp source. Also having the ability to build binaries on the fly is very useful