Search code examples
bashmakefilecygwinspeech-recognitioncmusphinx

/usr/bin/bash: -c: line 20: syntax error near unexpected token `(' while using make command to install sphinxbase


Being grateful for some people on the Internet who helped me at stackexchange(and stackoverflow,sourceforge.....), I finally got to the step "make" when I want to build the cmu sphinxbase from source.

Here are the most recent commands I execute under sphinxbase directory (Windows cygwin):

 - $./autogen.sh  
 - $./configure 
 - $make

I got this message:

/usr/bin/bash: -c: line 20: syntax error near unexpected token `(' /usr/bin/bash: -c: line 20: ` (CDPATH="${ZSH_VERSION+.}:" && cd $subdir && C:/Program Files (x86)/GnuWin32/bin/make $local_target) \' make: *** [check-recursive] Error 1

After some information searching, I guess that this is due to the $PATH variable issue. I am not pretty sure if the error raises because of the behavior of cygwin or maybe of the GNU-make(for win32). If the system searches for some string containing usr/bin/, it might get the wrong route.

Maybe there is something else I haven't noticed, so I welcome any helps or ideas.

Edited: Please see my Makefile link here.


Solution

  • As Iguananaut and Matzeri say in the comment,

    cygwin make is not cygwin build

    and

    cygwin make is not GNUwin32 make

    I open my cygwin and execute

    apt-cyg install make
    

    And redo the make command under the sphinxbase directory. It works fine. (However, we need to install apt-cyg in advance.)