# ndk-build
/root/android-ndk-r10e/ndk-build: 158: /root/android-ndk-r10e/ndk-build: file: not found
/bin/sh: 1: file: not found
[armeabi] Compile thumb : blank_webserver <= blank_webserver.c
make: /root/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found
/root/android-ndk-r10e/build/core/build-binary.mk:464: recipe for target 'obj/local/armeabi/objs/blank_webserver/blank_webserver.o' failed
make: *** [obj/local/armeabi/objs/blank_webserver/blank_webserver.o] Error 127
to my eyes it looks like its searching the prebuild compiler for a x86 host, even its clearly a 64bit arcitecture:
# uname -m
x86_64
is it me who does something wrong or is it a bug?
$ NDK_LOG=1 /opt/android-ndk-r10e/ndk-build -n | grep HOST -C 5
HOST_OS=linux
HOST_ARCH=x86_64
/opt/android-ndk-r10e/ndk-build: 158: /opt/android-ndk-r10e/ndk-build: file: not found
HOST_ARCH=x86 (32-bit userland detected)
HOST_TAG=linux-x86
GNUMAKE=/usr/bin/make (system path)
Android NDK: NDK installation path auto-detected: '/opt/android-ndk-r10e'
Android NDK: GNU Make version 4.1 detected
Android NDK: Host OS was auto-detected: linux
Android NDK: Host operating system detected: linux
/bin/sh: 1: file: not found
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to linux-x86
Android NDK: Host tools prebuilt directory not found
HOST_OS=linux
HOST_ARCH=x86_64
HOST_ARCH=x86 (32-bit userland detected)
HOST_TAG=linux-x86
GNUMAKE=/usr/bin/make (system path)
Android NDK: NDK installation path auto-detected: '/opt/android-ndk-r10e'
Android NDK: GNU Make version 4.1 detected
Android NDK: Host OS was auto-detected: linux
Android NDK: Host operating system detected: linux
Android NDK: Host CPU was auto-detected: x86
Android NDK: HOST_TAG set to linux-x86
Android NDK: Host tools prebuilt directory: /opt/android-ndk-r10e/prebuilt/linux-x86_64/bin
Android NDK: Host 'echo' tool: echo
Android NDK: Host 'echo -n' tool: printf %s
Android NDK: Host 'cmp' tool: cmp
Android NDK: Host 'awk' tool: /opt/android-ndk-r10e/prebuilt/linux-x86_64/bin/awk