Android NDK - creating TessTwo (Tesseract Tools fork for Android) - ndk-build does not work

when i run ndk-build it cannot complain about 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 he says that β€œthe command was not found,” there is β€œarm-linux-androideabi-gcc” in the path above. 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 "command not found "

I also added. / toolchains / arm -linux-androideabi-4.4.3 / prebuilt / linux-x86 / bin in my PATH, but still getting the same error. Even I tried different versions of ndk (7, 7b, 6b) another error! It seems to me that the aforementioned gcc is for 32-bit machines, while my machine is "Linux 2.6.32-37-server x86_64". but I think the ndk package should work on both 32 and 64 bits. I'm 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 in the same folder in which I have ndk. I need to configure them to work with each other

+6
source share
1 answer

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

I solved this on Ubuntu 11.10 by installing 32-bit compatibility libraries:

 sudo apt-get install ia32-libs 
+4
source

Source: https://habr.com/ru/post/909307/


All Articles