Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android NDK - building TessTwo (Fork of Tesseract Tools for Android) - ndk-build fails

when I run ndk-build, it fails complaining from the following errors:

$ ndk-build
make: /…/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found

Compile arm : jpeg <= jcapimin.c
make: /…/android-ndk-r7/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: Command not found

make: *** [obj/local/armeabi/objs/jpeg/jcapimin.o] Error 127

The problem is that although it says "command not found", "arm-linux-androideabi-gcc" exists in the above path. Even when I run "arm-linux-androideabi-gcc" directly from /…/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/ it gives the same error of "command not found"

I also added ./toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin to my PATH but still getting the same error. Even I tried different versions of ndk (7, 7b, 6b) still same error! seems to me the above gcc is meant for 32bit machines whereas my machine is "Linux 2.6.32-37-server x86_64". but I guess the ndk package should work for both 32 and 64bit. am I right? do I need to compile or build ndk before using it? I assume downloading and unpacking is all I have to do. right? how about sdk? I just downloaded and unpacked it at the same folder that I have my ndk. do I need to configure them to work with each other

like image 555
user1231589 Avatar asked Feb 24 '12 20:02

user1231589


1 Answers

I ran into the same problem. You are right, the problem is due to trying to run a 32-bit binary on a 64-bit kernel.

I solved it on Ubuntu 11.10 by installing the 32-bit compatibility libs:

sudo apt-get install ia32-libs
like image 78
Graham Borland Avatar answered Oct 03 '22 02:10

Graham Borland