troubleshooting Question

Error in compilation - make file issues?

Avatar of Sreejith22
Sreejith22Flag for India asked on
CC++Java
3 Comments2 Solutions1157 ViewsLast Modified:
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


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


Regards,
Sree
ASKER CERTIFIED SOLUTION
evilrix
Senior Software Engineer (Avast)

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros