Error in compilation - make file issues?

Sreejith22
Sreejith22 used Ask the Experts™
on
I'm a java programmer trying to access a native function through JNI.  I am copying the JNI folder from a working application to mine and then building my application.

When I compile the source, I get the error as shown:

target Java: jp.co.nyk.android.model.project_sh70f (out/target/common/obj/JAVA_LIBRARIES/jp.co.nyk.android.model.project_sh70f_intermediates/classes)
make: *** No rule to make target `/home/administrator/CMUSphinx/pocketsphinx/src/libpocketsphinx/hmm.c', needed by `out/target/product/SH70F/obj/STATIC_LIBRARIES/pocketsphinx_intermediates/hmm.o'.  Stop.
make: *** Waiting for unfinished jobs....
target thumb C: pocketsphinx_jni <= packages/apps/VoiceReco/jni/pocketsphinx_wrap.c
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:760:26: error: pocketsphinx.h: No such file or directory
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:761:28: error: sphinxbase/err.h: No such file or directory
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'new_Hypothesis':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:780: warning: implicit declaration of function 'ckd_calloc'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:780: warning: initialization makes pointer from integer without a cast
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:782: warning: implicit declaration of function 'ckd_salloc'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:782: warning: assignment makes pointer from integer without a cast
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:784: warning: assignment makes pointer from integer without a cast
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'delete_Hypothesis':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:790: warning: implicit declaration of function 'ckd_free'project
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'new_Config__SWIG_0':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:795: warning: implicit declaration of function 'cmd_ln_init'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:795: warning: implicit declaration of function 'ps_args'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:795: error: 'FALSE' undeclared (first use in this function)
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:795: error: (Each undeclared identifier is reported only once
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:795: error: for each function it appears in.)
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'new_Config__SWIG_1':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:799: warning: implicit declaration of function 'cmd_ln_parse_file_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:799: error: 'FALSE' undeclared (first use in this function)
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'delete_Config':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:803: warning: implicit declaration of function 'cmd_ln_free_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_setBoolean':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:806: warning: implicit declaration of function 'cmd_ln_set_boolean_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_setInt':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:809: warning: implicit declaration of function 'cmd_ln_set_int_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_setFloat':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:812: warning: implicit declaration of function 'cmd_ln_set_float_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_setString':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:815: warning: implicit declaration of function 'cmd_ln_set_str_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_exists':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:818: warning: implicit declaration of function 'cmd_ln_exists_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_getBoolean':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:821: warning: implicit declaration of function 'cmd_ln_boolean_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_getInt':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:824: warning: implicit declaration of function 'cmd_ln_int_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_getFloat':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:827: warning: implicit declaration of function 'cmd_ln_float_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Config_getString':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:830: warning: implicit declaration of function 'cmd_ln_str_r'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:830: warning: return makes pointer from integer without a cast
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'new_Decoder__SWIG_0':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:839: warning: implicit declaration of function 'ps_init'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:839: error: 'FALSE' undeclared (first use in this function)
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'new_Decoder__SWIG_1':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:843: warning: initialization makes pointer from integer without a cast
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Decoder_getConfig':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:847: warning: implicit declaration of function 'cmd_ln_retain'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:847: warning: implicit declaration of function 'ps_get_config'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:847: warning: return makes pointer from integer without a cast
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Decoder_startUtt__SWIG_0':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:850: warning: implicit declaration of function 'ps_start_utt'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Decoder_getUttid':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:856: warning: implicit declaration of function 'ps_get_uttid'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:856: warning: return makes pointer from integer without a cast
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Decoder_endUtt':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:859: warning: implicit declaration of function 'ps_end_utt'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Decoder_processRaw__SWIG_0':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:862: warning: implicit declaration of function 'ps_process_raw'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Decoder_getHyp':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:869: error: 'int32' undeclared (first use in this function)
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:869: error: expected ';' before 'best_score'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:870: warning: implicit declaration of function 'ps_get_hyp'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:870: error: 'best_score' undeclared (first use in this function)
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'delete_Decoder':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:877: warning: implicit declaration of function 'ps_free'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'setLogfile':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:882: warning: implicit declaration of function 'err_set_logfile'
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c: In function 'Java_edu_cmu_pocketsphinx_pocketsphinxJNI_Decoder_1processRaw_1_1SWIG_10':
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:1441: warning: assignment discards qualifiers from pointer target type
make: *** [out/target/product/SH70F/obj/SHARED_LIBRARIES/pocketsphinx_jni_intermediates/pocketsphinx_wrap.o] Error 1
DDK build start.

error: build_android

Open in new window



Any help in this regard which would help me resolve this issue would be well appreciated.


Regards,
Sree
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
noone knows?
Senior Software Engineer (Avast)
Commented:
These two errors are the key

packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:760:26: error: pocketsphinx.h: No such file or directory
packages/apps/VoiceReco/jni/pocketsphinx_wrap.c:761:28: error: sphinxbase/err.h: No such file or directory

Have you told the compiler where these headers live?
1) make: *** No rule to make target `/home/administrator/CMUSphinx/pocketsphinx/src/libpocketsphinx/hmm.c', needed by `out/target/product/SH70F/obj/STATIC_LIBRARIES/pocketsphinx_intermediates/hmm.o'.  Stop.

This line indicates that "/home/administrator/CMUSphinx/pocketsphinx/src/libpocketsphinx/hmm.c'" file is not present on your system

2) Compilation of "pocketsphinx_wrap.c" failed
You have to fix all error message  coming for compilation of this file.
You can try with correcting first two line ie missing header file correction.
Then proceed step by step for each error message coming in compilation

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial