Menu

error on installing pocketsphinx and sphinxbase

Help
tmt
2015-12-08
2015-12-14
  • tmt

    tmt - 2015-12-08

    when i tried to install pocketsphinx, in the make step, it showed sphinxbase is not found in the system. So i tried to install sphinxbase.
    performed ./configure and the make command.
    in the make command got an error:

    creating build/temp.linux-x86_64-2.7
    x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I../include -I../include -I/usr/include/python2.7 -c sphinxbase.c -o build/temp.linux-x86_64-2.7/sphinxbase.o
    sphinxbase.c:4:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    make[1]: *** [pymod-build-stamp] Error 1
    make[1]: Leaving directory `/home/thanky/mproj/pocketsphinx-0.5/sphinxbase/python'
    make: *** [all-recursive] Error 1
    

    how to solve this problem

     

    Last edit: Nickolay V. Shmyrev 2015-12-10
    • Nickolay V. Shmyrev

      You need to install python development package

       
      • tmt

        tmt - 2015-12-09

        Thanks a lot..Now it worked!

         
  • tmt

    tmt - 2015-12-09

    after installing pocketsphinx and sphinxbase. I tried to install sphintrain-5peralpha, but in make step following errors occured.

    thanky@thanky-HP-15-Notebook-PC:~/mproj/tutorial/sphinxtrain-5prealpha$ sudo make
    Making all in etc
    make[1]: Entering directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/etc'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/etc'
    Making all in include
    make[1]: Entering directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/include'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/include'
    Making all in python
    make[1]: Entering directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/python'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/python'
    Making all in scripts
    make[1]: Entering directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/scripts'
    make[1]: Nothing to be done for `all'.
    make[1]: Leaving directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/scripts'
    Making all in src
    make[1]: Entering directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/src'
    Making all in libs
    make[2]: Entering directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/src/libs'
    Making all in libclust
    make[3]: Entering directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/src/libs/libclust'
    /bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" -DPACKAGE_STRING=\"SphinxTrain\ 5prealpha\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I.   -I/usr/local/include/sphinxbase   -I../../../include -g -O2 -fPIC -DPIC -MT div.lo -MD -MP -MF .deps/div.Tpo -c -o div.lo div.c
    libtool: compile:  gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" "-DPACKAGE_STRING=\"SphinxTrain 5prealpha\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I. -I/usr/local/include/sphinxbase -I../../../include -g -O2 -fPIC -DPIC -MT div.lo -MD -MP -MF .deps/div.Tpo -c div.c  -fPIC -DPIC -o .libs/div.o
    libtool: compile:  gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" "-DPACKAGE_STRING=\"SphinxTrain 5prealpha\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I. -I/usr/local/include/sphinxbase -I../../../include -g -O2 -fPIC -DPIC -MT div.lo -MD -MP -MF .deps/div.Tpo -c div.c -o div.o >/dev/null 2>&1
    mv -f .deps/div.Tpo .deps/div.Plo
    /bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" -DPACKAGE_STRING=\"SphinxTrain\ 5prealpha\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I.   -I/usr/local/include/sphinxbase   -I../../../include -g -O2 -fPIC -DPIC -MT kdtree.lo -MD -MP -MF .deps/kdtree.Tpo -c -o kdtree.lo kdtree.c
    libtool: compile:  gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" "-DPACKAGE_STRING=\"SphinxTrain 5prealpha\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I. -I/usr/local/include/sphinxbase -I../../../include -g -O2 -fPIC -DPIC -MT kdtree.lo -MD -MP -MF .deps/kdtree.Tpo -c kdtree.c  -fPIC -DPIC -o .libs/kdtree.o
    libtool: compile:  gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" "-DPACKAGE_STRING=\"SphinxTrain 5prealpha\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I. -I/usr/local/include/sphinxbase -I../../../include -g -O2 -fPIC -DPIC -MT kdtree.lo -MD -MP -MF .deps/kdtree.Tpo -c kdtree.c -o kdtree.o >/dev/null 2>&1
    mv -f .deps/kdtree.Tpo .deps/kdtree.Plo
    /bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" -DPACKAGE_STRING=\"SphinxTrain\ 5prealpha\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I.   -I/usr/local/include/sphinxbase   -I../../../include -g -O2 -fPIC -DPIC -MT kmeans.lo -MD -MP -MF .deps/kmeans.Tpo -c -o kmeans.lo kmeans.c
    libtool: compile:  gcc -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" "-DPACKAGE_STRING=\"SphinxTrain 5prealpha\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I. -I/usr/local/include/sphinxbase -I../../../include -g -O2 -fPIC -DPIC -MT kmeans.lo -MD -MP -MF .deps/kmeans.Tpo -c kmeans.c  -fPIC -DPIC -o .libs/kmeans.o
    In file included from kmeans.c:51:0:
    /usr/local/include/sphinxbase/profile.h:130:17: error: unknown type name 'FILE'
     void pctr_print(FILE *fp,      /**< A file pointer */
                     ^
    /usr/local/include/sphinxbase/profile.h:203:22: error: unknown type name 'FILE'
     void ptmr_print_all (FILE *fp,    /**< The file pointer */
                          ^
    make[3]: *** [kmeans.lo] Error 1
    make[3]: Leaving directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/src/libs/libclust'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/src/libs'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/thanky/mproj/tutorial/sphinxtrain-5prealpha/src'
    make: *** [all-recursive] Error 1
    

    these 3 folders are under the same root file 'tutorial'. How can I solve this error?

     

    Last edit: Nickolay V. Shmyrev 2015-12-10
    • Nickolay V. Shmyrev

      It seems your gcc is broken, you can reinstall it. You can also look for file stdio.h in non-standard location like /usr/local/include, it also might break the build.

       
  • tmt

    tmt - 2015-12-10

    leaving same error even after reinstallation of gcc
    i had reinstalled gcc using the command
    sudo apt-get install --reinstall gcc

     

    Last edit: tmt 2015-12-10
    • Nickolay V. Shmyrev

      Run this from command line from the folder sphinxtrain-5prealpha/src/libs/libclust:

      gcc -H -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" "-DPACKAGE_STRING=\"SphinxTrain 5prealpha\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I. -I/usr/local/include/sphinxbase -I../../../include -g -O2 -fPIC -DPIC -MT kmeans.lo -MD -MP -MF .deps/kmeans.Tpo -c kmeans.c -fPIC -DPIC -o .libs/kmeans.o

      And provide the output.

       
  • tmt

    tmt - 2015-12-11

    This is the output obtained

    thanky@thanky-HP-15-Notebook-PC:~/mproj/tutorial/sphinxtrain-5prealpha/src/libs/libclust$ gcc -H -DPACKAGE_NAME=\"SphinxTrain\" -DPACKAGE_TARNAME=\"sphinxtrain\" -DPACKAGE_VERSION=\"5prealpha\" "-DPACKAGE_STRING=\"SphinxTrain 5prealpha\"" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -DHAVE_LIBM=1 -I. -I/usr/local/include/sphinxbase -I../../../include -g -O2 -fPIC -DPIC -MT kmeans.lo -MD -MP -MF .deps/kmeans.Tpo -c kmeans.c -fPIC -DPIC -o .libs/kmeans.o
    . /usr/local/include/sphinxbase/ckd_alloc.h
    .. /usr/include/stdlib.h
    ... /usr/include/features.h
    .... /usr/include/x86_64-linux-gnu/sys/cdefs.h
    ..... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    .... /usr/include/x86_64-linux-gnu/gnu/stubs.h
    ..... /usr/include/x86_64-linux-gnu/gnu/stubs-64.h
    ... /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h
    ... /usr/include/x86_64-linux-gnu/bits/waitflags.h
    ... /usr/include/x86_64-linux-gnu/bits/waitstatus.h
    .... /usr/include/endian.h
    ..... /usr/include/x86_64-linux-gnu/bits/endian.h
    ..... /usr/include/x86_64-linux-gnu/bits/byteswap.h
    ...... /usr/include/x86_64-linux-gnu/bits/types.h
    ....... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    ....... /usr/include/x86_64-linux-gnu/bits/typesizes.h
    ...... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    ...... /usr/include/x86_64-linux-gnu/bits/byteswap-16.h
    ... /usr/include/x86_64-linux-gnu/sys/types.h
    .... /usr/include/time.h
    .... /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h
    .... /usr/include/x86_64-linux-gnu/sys/select.h
    ..... /usr/include/x86_64-linux-gnu/bits/select.h
    ...... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    ..... /usr/include/x86_64-linux-gnu/bits/sigset.h
    ..... /usr/include/time.h
    ..... /usr/include/x86_64-linux-gnu/bits/time.h
    ..... /usr/include/x86_64-linux-gnu/bits/select2.h
    .... /usr/include/x86_64-linux-gnu/sys/sysmacros.h
    .... /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h
    ..... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    ... /usr/include/alloca.h
    .... /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h
    ... /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h
    ... /usr/include/x86_64-linux-gnu/bits/stdlib-float.h
    ... /usr/include/x86_64-linux-gnu/bits/stdlib.h
    .. /usr/include/setjmp.h
    ... /usr/include/x86_64-linux-gnu/bits/setjmp.h
    .... /usr/include/x86_64-linux-gnu/bits/wordsize.h
    ... /usr/include/x86_64-linux-gnu/bits/sigset.h
    ... /usr/include/x86_64-linux-gnu/bits/setjmp2.h
    .. /usr/local/include/sphinxbase/sphinxbase_export.h
    .. /usr/local/include/sphinxbase/prim_type.h
    ... /usr/local/include/sphinxbase/sphinx_config.h
    . /usr/local/include/sphinxbase/profile.h
    In file included from kmeans.c:51:0:
    /usr/local/include/sphinxbase/profile.h:130:17: error: unknown type name ‘FILE’
    void pctr_print(FILE fp, /< A file pointer /
    ^
    /usr/local/include/sphinxbase/profile.h:203:22: error: unknown type name ‘FILE’
    void ptmr_print_all (FILE fp, /< The file pointer /
    ^
    . ../../../include/s3/kmeans.h
    .. /usr/local/include/sphinxbase/prim_type.h
    .. ../../../include/s3/vector.h
    . ../../../include/s3/s3.h
    .. /usr/local/include/sphinxbase/err.h
    ... /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h
    ... /usr/include/stdio.h
    .... /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h
    .... /usr/include/libio.h
    ..... /usr/include/_G_config.h
    ...... /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h
    ...... /usr/include/wchar.h
    .... /usr/include/x86_64-linux-gnu/bits/stdio_lim.h
    .... /usr/include/x86_64-linux-gnu/bits/sys_errlist.h
    .... /usr/include/x86_64-linux-gnu/bits/stdio.h
    .... /usr/include/x86_64-linux-gnu/bits/stdio2.h
    ... /usr/include/errno.h
    .... /usr/include/x86_64-linux-gnu/bits/errno.h
    ..... /usr/include/linux/errno.h
    ...... /usr/include/x86_64-linux-gnu/asm/errno.h
    ....... /usr/include/asm-generic/errno.h
    ........ /usr/include/asm-generic/errno-base.h
    . /usr/include/assert.h
    Multiple include guards may be useful for:
    /usr/include/assert.h
    /usr/include/errno.h
    /usr/include/linux/errno.h
    /usr/include/wchar.h
    /usr/include/x86_64-linux-gnu/asm/errno.h
    /usr/include/x86_64-linux-gnu/bits/byteswap-16.h
    /usr/include/x86_64-linux-gnu/bits/byteswap.h
    /usr/include/x86_64-linux-gnu/bits/endian.h
    /usr/include/x86_64-linux-gnu/bits/errno.h
    /usr/include/x86_64-linux-gnu/bits/select.h
    /usr/include/x86_64-linux-gnu/bits/select2.h
    /usr/include/x86_64-linux-gnu/bits/setjmp2.h
    /usr/include/x86_64-linux-gnu/bits/stdio.h
    /usr/include/x86_64-linux-gnu/bits/stdio2.h
    /usr/include/x86_64-linux-gnu/bits/stdio_lim.h
    /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h
    /usr/include/x86_64-linux-gnu/bits/stdlib-float.h
    /usr/include/x86_64-linux-gnu/bits/stdlib.h
    /usr/include/x86_64-linux-gnu/bits/sys_errlist.h
    /usr/include/x86_64-linux-gnu/bits/time.h
    /usr/include/x86_64-linux-gnu/bits/typesizes.h
    /usr/include/x86_64-linux-gnu/bits/waitflags.h
    /usr/include/x86_64-linux-gnu/bits/waitstatus.h
    /usr/include/x86_64-linux-gnu/gnu/stubs-64.h
    /usr/include/x86_64-linux-gnu/gnu/stubs.h
    /usr/local/include/sphinxbase/sphinx_config.h

     
    • Nickolay V. Shmyrev

      Ok, it seems you are trying to compile against really old sphinxbase. Please make sure you compiled and installed latest sphinxbase 5prealpha.

       

Log in to post a comment.