ndk-build: command not found-mupdf compilation failed - android

I'm trying to compile Mupdf. I followed the steps given in the mupdf documentation:
http://www.mupdf.com/docs/how-to-build-mupdf-for-android
But I'm getting a error at this step:
~/src/mupdf/platform/android $ ndk-build -ndk-build: command not found
I have installed ndk-10. And I have given the path in eclipse. I followed below steps to give ndk path.
Window->Preferences->Android->ndk and i gave the path. But I'm not able to complete mupdf compilation. I'm not able to understand, what might have gone wrong. Is anyone facing a similar issue?
Thanks in advance..

Related

"Cannot find build.xml" error building MuPDF with Ant

I am trying to implement the MuPDF library in my Android project. When I execute ant debug it gives me the following error:
Buildfile:
C:\Users\Saket\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\build.xml
BUILD FAILED
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\build.xml:83:
Cannot find
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\UsersSaketAppDataLocalAndroidsdk\tools\ant\build.xml
imported from
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\build.xml
Can anyone help me with this problem?
This path is clearly bogus:
C:\Users\AndroidNewBee\AndroidStudioProjects\muPdf\mupdf\platform\android\viewer\UsersSaketAppDataLocalAndroidsdk\tools\ant\build.xml
ie. the 'UsersSaketAppDataLocalAndroidsdk' part is obviously not going to work.
Check the setting of your ANDROID_HOME environment variable (try echo %ANDROID_HOME% from a cmd window), this is likely to be where the bad part is coming from.

Compiling ffmpeg for android using cygwin-x86

I'd like to test ijkplayer (android) project.
During compiling ffmpeg libs (./compile-ffmpeg.sh) usin Cygwin in WIN7 environment I faced the following error message:
"build on CYGWIN_NT-6.1 x86_64
Host system 'cygwin-x86' is not supported by the source NDK!
Try --system= with one of: windows-x86_64"
The suggested 'system' command doesn't solve the problem.
Axtually I use android-ndk-r10c
If I try the same process using MINGW32 I get a lot of syntax error.
Please help!

Bambuser ffmpeg - "arm-linux-androideabi-gcc is unable to create an executable file."

I know this may be possible duplicate of some questions. but answers for those threads are not helping me.
I am trying to compile ffmpeg library for android using Bambuser's ffmpeg.
I downloaded Archive for client versions 1.3.7 to 1.6.0. from bambuser.
I followed instruction given in REAME.
While running ./build.sh i came across following error
arm-linux-androideabi-gcc is unable to create an executable file.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user#mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
Here are last few lines of config.log of ffmpeg
mktemp is /bin/mktemp
check_ld
check_cc
BEGIN /tmp/ffconf.qflVj27Q.c
1 int main(void){ return 0; }
END /tmp/ffconf.qflVj27Q.c
arm-linux-androideabi-gcc --sysroot=/home/chaitanya/android/android-ndk-r5b/platforms/android-8/arch-arm -c -o /tmp/ffconf.gc6um0Ki.o /tmp/ffconf.qflVj27Q.c
arm-linux-androideabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
C compiler test failed.
in tmp i do not find any relative folder or file as per config.log says "ffconf.qflVj27Q.c".
I am doing this on
1. Ubuntu 11.10
2. OpenJDK 6
3. android-ndk-r5b
NOte:
I only have API-10 Installed in eclipse. (if it matters :D)
What could be the solution for this?
I finally found the problem with my setup when facing this same issue... Looking at the arm-build.sh script, I started following the script. Notice the "TOOLCHAIN=..." path.
Originally the path was:
TOOLCHAIN=echo $NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/*-x86
When I went to verify this path exists, I noticed that it did not.
I think the reason is that I have a 64-bit build.
My path is actually:
.../toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64
What I ended up doing was copying the folder, and renaming it to "linux-x86" and now all is compiling.
Hope this helps someone!
I also faced this problem this morning and tried solutions suggested for similar questions here. But none of the solutions worked for me.
But finally i solved it. In my case, it was problem with Android NDK package. My system is 64bit ubuntu and my ndk pkg was also linux-64bit. But when i used the ndk-linux-x86, this problem was solved. I hope that this might help someone else.

OpenCV C++ with Android

I have checked a lot of threads already but none of them seems to solve my problem. I'm working on a project regarding my study and want to use the OpenCV library with my Android app. Here is a list of the programs and tools I use:
Eclipse IDE for Java Developers (3.7.0)
Android SDK r16
OpenCV 2.3.1
Android NDK r7b
I am following a tutorial, and everything works fine until the part where I need the NDK for using C++ OpenCV code. I can code and run Android apps and the "Tutorial 1" samples from the OpenCV 2.3.1 are working fine. However the "Tutorial 2" samples won't work. I tried following the steps in the C++ part of the tutorial.
When I try to run the NDK-build (tried both the command line and Eclipse part) I keep getting this error:
/usr/bin/sh: -c: line 1: syntax error: unexpected end of file
make: *** [obj/local/armeabi/objs/opencv/cvjni.o] Error 1
Does anyone has a solution for my problem? Thanks in advance
in bash script unexpected "syntax error: unexpected end of file" on if statement
Make sure your shell scripts use Unix-style line endings

can anyone out there help me for get solution while compiling ocr code in cygwin?

I want to make business card scanner application in android. I have these all dependence module
1) windows xp
2) cygwin (compiler)
3) eclipse
4) android-ndk
5) android-emulator
Now , the main problem is with the help of android ndk and cygwin when I compile ocr project . It gives me error like this :
ld.exe : cannot find -ljpeg
plz help me to solve it. .I think i am very near to complete project. any help great appreciate. thanks.
Your problem is that libjpeg doesn't seem to be installed in your cygwin environment. You should either add it from the cygwin installer or compile/install from sources. You can get source code here: http://sourceforge.net/projects/libjpeg/files/libjpeg/6b/jpegsr6.zip - and compile/install it following the instructions in the install.doc file in the zip file. After that you should be able to compile your project.

Categories

Resources