I am trying to compile pocketsphinx for Android and I get the following error during compilation:
/home/spodder/Speech/PocketSphinxDemo/jni/pocketsphinx_wrap.c: At top level:
/home/spodder/Speech/PocketSphinxDemo/jni/pocketsphinx_wrap.c:1518: fatal error: opening dependency file /home/spodder/Speech/PocketSphinxDemo/obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.o.d.org: Permission denied
compilation terminated.
make: *** [/home/spodder/Speech/PocketSphinxDemo/obj/local/armeab开发者_如何学编程i/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1
I have followed all the steps mentioned in http://cmusphinx.sourceforge.net/2011/05/building-pocketsphinx-on-android/comment-page-1/
The file pocketsphinx_wrap.o.d.org doesn't even exist, but pocketsphinx_wrap.o.d exists at the specified location.
I copied pocketsphinx_wrap.o.d to pocketsphinx_wrap.o.d.org, and gave rwx permissions for each. Still the error occurs.
However, when i run the application it runs and the following error is seen in logcat
E/AndroidRuntime( 368): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 368): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 368): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 368): Caused by: java.lang.UnsatisfiedLinkError: Library pocketsphinx_jni not found
E/AndroidRuntime( 368): at java.lang.Runtime.loadLibrary(Runtime.java:461)
E/AndroidRuntime( 368): at java.lang.System.loadLibrary(System.java:557)
E/AndroidRuntime( 368): at edu.cmu.pocketsphinx.demo.PocketSphinxDemo.<clinit>(PocketSphinxDemo.java:19)
Has anyone else encountered similar problem? Does this have to do anything with file permissions, or is the name for file is wrongly set due to which the error occured?
Thanks in advance!!
Removing the ndk build form Eclipse solved the problem.
As the compilation error was in compiling native code, which is already built externally from command-line with no errors.
精彩评论