Menu

Compile error ps_mgau_t & acmod_t undefined

Help
2020-03-23
2020-03-27
  • William Melgaard

    Attempting to compile (gcc, Linux) Pocketsphinx, I get the subject errors from ms_mgau.h
    ??

     
    • Nickolay V. Shmyrev

      Please provide more information on the problem to get help (steps, logs, errors, environment)

       
      • William Melgaard

        This project started by installing pocketsphinx from the Debian Stable repository. The installed version is 0.8+5prealpha+1-2+b2
        That compiles and runs correctly as
        gcc -o pocketsphinx pocketsphinx.c -DMODELDIR=\"pkg-config --variable=modeldir pocketsphinx\" pkg-config --cflags --libs pocketsphinx sphinxbase

        Baby steps
        gcc -o hello_ps hello.c -DMODELDIR=\"pkg-config --variable=modeldir pocketsphinx\" pkg-config --cflags --libs pocketsphinx sphinxbase
        That also works
        As far as I can tell, -DMODELDIR invokes QT. I do not understand how that works. My next step was to try to compile
        gcc -o hello_ps hello.c
        i.e. without the extraneous stuff. That resulted in a dozen missing header files, which I obtained from
        https://cmusphinx.github.io/doc/pocketsphinx
        Compile errors stated "unknown file name 'ps_mgau_t'" amd also 'acmod_t'

         
        • William Melgaard

          Here is a condensed error report:
          ms_mgau.h:92:5: error: unknown type name ‘ps_mgau_t’
          ms_mgau.h:105:1: error: unknown type name ‘ps_mgau_t’;
          ms_mgau.h:105:25: error: unknown type name ‘acmod_t’;
          ms_mgau.h:106:19: error: unknown type name ‘ps_mgau_t’;
          ms_mgau.h:107:31: error: unknown type name ‘ps_mgau_t’;
          ms_mgau.h:114:30: error: unknown type name ‘ps_mgau_t’;

          acmod_t appears to be defined in line 202 of https://cmusphinx.github.io/doc/pocketsphinx/acmod_8h_source.html
          Here is the source file for ms_mgau.h https://cmusphinx.github.io/doc/pocketsphinx/ms__mgau_8h_source.html
          Should 'ps_mgau_t' reat 'ms_mgau_t'?

           
        • Nickolay V. Shmyrev

          As far as I can tell, -DMODELDIR invokes QT

          It doesn't. It just computes the header path and pass them to compiler.

          You can run:
          pkg-config --cflags --libs pocketsphinx sphinxbase

          To see what it outputs.

          . My next step was to try to compile
          gcc -o hello_ps hello.c

          You can't do that, you need the header path from pkg-config. You can substitute the pkg-config result yourself though.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.