Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4030286
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:27:07+00:00 2026-05-20T11:27:07+00:00

I am trying to compile PocketSphinxAndroidDemo, which provides an example implementation of the CMU

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:27:08+00:00Added an answer on May 20, 2026 at 11:27 am

    Apparently, some of the sources still needed to be marked for ARM compilation. I modified the following section of Android.mk to set cmn.c and lda.c to compile with ARM.

    include $(CLEAR_VARS)
    LOCAL_C_INCLUDES := $(SPHINX_PATH)/sphinxbase/include/android $(SPHINX_PATH)/sphinxbase/include
    LOCAL_CFLAGS += -DHAVE_CONFIG_H
    LOCAL_CFLAGS += -DANDROID_NDK
    
    LOCAL_PATH := $(SPHINX_PATH)/sphinxbase/src/libsphinxbase/feat
    LOCAL_MODULE := sphinxfeat
    
    LOCAL_SRC_FILES := \
        agc.c \
        cmn.c.arm \
        cmn_prior.c.arm \
        feat.c \
        lda.c.arm
    

    I am still wondering if anyone else had to do this to get their code to compile successfully.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When trying to compile GNU software on HP-UX (binutils for example) I'm getting error
When trying to compile my class I get an error: The constant 'NamespaceName.ClassName.CONST_NAME' cannot
Trying to compile a iPhone/iPad application with SDK3.2 and am getting this error: Undefined
Iam trying to compile rtmpd using VS2008 Iam getting this error. Error 63 error
I am trying to compile my first c++ file on windows with the g++
I'm trying to compile the two files below, but get an error message from
When trying to compile a file that include winnt.h via windows.h, I get the
I'm trying to compile a Delphi 7 project that I've inherited, and I'm getting
I'm trying to compile/link a very old piece of software on a linux system
I'm trying to compile a program called ngrep, and when I ran configure, things

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.