I am trying to compile PocketSphinxAndroidDemo, which provides an example implementation of the CMU pocketsphinx speech recognizer on Android. I first received an error similar to the discussion here. After executing ndk-build, I got this error:
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
/home/nick/workspace/android/PocketSphinxDemo/jni/pocketsphinx_wrap.c:761:28: error: sphinxbase/err.h: No such file or directory
/home/nick/workspace/android/PocketSphinxDemo/jni/pocketsphinx_wrap.c: In function 'Java_edu_cmu_pocketsphinx_pocketsphinxJNI_Decoder_1processRaw_1_1SWIG_10':
/home/nick/workspace/android/PocketSphinxDemo/jni/pocketsphinx_wrap.c:1441: warning: assignment discards qualifiers from pointer target type
make: *** [/home/nick/workspace/android/PocketSphinxDemo/obj/local/armeabi/objs-debug/pocketsphinx_jni/pocketsphinx_wrap.o] Error 1
I tried the recommendation of rebuilding the sphinxbase
and pocketsphinx
libraries and rebuilding with ndk-build -B
, but that didn't work. I then modified the jni/pocketsphinx.i swig file to change the include for err.h:
#include <pocketsphinx.h>
//#include <sphinxbase/err.h>
#include <err.h>
Did anyone that tried to compile PocketSphinxAndroidDemo ever encounter this problem? My edit seemed to allow me to get further in my compilation, but now I'm getting assembly-related errors:
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Compile thumb : pocketsphinx_jni <= pocketsphinx_wrap.c
/home/nick/workspace/android/PocketSphinxDemo/jni/pocketsphinx_wrap.c: In function 'Java_edu_cmu_pocketsphinx_pocketsphinxJNI_Decoder_1processRaw_1_1SWIG_10':
/home/nick/workspace/android/PocketSphinxDemo/jni/pocketsphinx_wrap.c:1442: warning: assignment discards qualifiers from pointer target type
Compile thumb : sphinxfeat <= cmn.c
/tmp/cceyE035.s: Assembler messages:
/tmp/cceyE035.s:655: Error: selected processor does not support `smull r1,r2,r0,r4'
/tmp/cceyE035.s:657: Error: unshifted register required -- `orr r1,r1,r2,lsl#20'
/tmp/cceyE035.s:932: Error: selected processor does not support `smull r1,r2,r0,r4'
/tmp/cceyE035.s:934: Error: unshifted register required -- `orr r1,r1,r2,lsl#20'
make: *** [/home/nick/workspace/android/PocketSphinxDemo/obj/local/armeabi/objs-debug/sphinxfeat/cmn.o] Error 1
Again, does anyone know how to resolve this problem? I haven't seen any other developers complaining of this problem, so I'm hesitant to go further. Thanks for your help.