Closed Koritskaya closed 8 years ago
but it causes different issues
What issues
C:\Users\2018085\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9 .0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DS PHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/i nclude/sphinxbase -Isphinxbase/include/win32 -IC:\Users\2018085\AppData\Local\Co ntinuum\Anaconda2\include -IC:\Users\2018085\AppData\Local\Continuum\Anaconda2\P C /Tcsphinxbase/src/libsphinxbase/lm\ngram_model_trie.c /Fobuild\temp.win-amd64- 2.7\Release\sphinxbase/src/libsphinxbase/lm\ngram_model_trie.obj /wd4244 /wd4267 /wd4197 /wd4090 /wd4018 ngram_model_trie.c sphinxbase/src/libsphinxbase/lm\ngram_modeltrie.c(128) : error C2275: 'unigram t' : illegal use of this type as an expression c:\users\2018085\appdata\local\continuum\anaconda2\pocketsphinx-python\s phinxbase\src\libsphinxbase\lm\lm_trie.h(51) : see declaration of 'unigram_t' sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(128) : error C2065: 'unigram' : undeclared identifier sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(129) : error C2065: 'unigram' : undeclared identifier sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(129) : error C2223: left of ' ->prob' must point to struct/union sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(131) : error C2065: 'unigram' : undeclared identifier sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(131) : error C2223: left of ' ->prob' must point to struct/union sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(133) : error C2065: 'unigram' : undeclared identifier sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(133) : error C2223: left of ' ->prob' must point to struct/union sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(136) : error C2065: 'unigram' : undeclared identifier sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(136) : error C2223: left of ' ->bo' must point to struct/union sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(141) : error C2065: 'unigram' : undeclared identifier sphinxbase/src/libsphinxbase/lm\ngram_model_trie.c(141) : error C2223: left of ' ->bo' must point to struct/union error: command 'C:\Users\2018085\AppData\Local\Programs\Common\Microsoft\ \Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
Ok, I've just fixed this issue. Update sphinxbase or clone https://github.com/cmusphinx/pocketsphinx-python
I just updated sphinxbase via downloading master - there is still a problem
C:\Users\2018085\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9 .0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DHAVE_CONFIG_H -D_CRT_SECURE_NO_DEPRECATE -D_USRDLL -DS PHINXDLL -DWIN32 -D_WINDOWS -DYY_NO_UNISTD_H -Isphinxbase/include -Isphinxbase/i nclude/sphinxbase -Isphinxbase/include/win32 -IC:\Users\2018085\AppData\Local\Co ntinuum\Anaconda2\include -IC:\Users\2018085\AppData\Local\Continuum\Anaconda2\P C /Tcsphinxbase/swig/sphinxbase_wrap.c /Fobuild\temp.win-amd64-2.7\Release\sphin xbase/swig/sphinxbase_wrap.obj /wd4244 /wd4267 /wd4197 /wd4090 /wd4018 sphinxbase_wrap.c sphinxbase/swig/sphinxbase_wrap.c(14) : fatal error C1083: Cannot open include f ile: 'stdbool.h': No such file or directory error: command 'C:\Users\2018085\AppData\Local\Programs\Common\Microsoft\ \Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
I'm now updating via clone - will see if it works
via clone it gives same old bitarr.h error
sphinxbase/include\sphinxbase/bitarr.h(43) : fatal error C1083: Cannot open incl ude file: 'stdint.h': No such file or directory error: command 'C:\Users\2018085\AppData\Local\Programs\Common\Microsoft\ \Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
I fixed stdbool issue too, please update sphinxbase once again.
As for getting with git, you need to get cmusphinx/pocketsphinx-python, not bambocher/pocketsphinx-python.
Using new sphixbase with all the rest from bambocher doesn't work
C:\Users\2018085\AppData\Local\swigwin-3.0.8\swig.exe -python -modern -Isphinxba se/include -Isphinxbase/include/sphinxbase -Isphinxbase/include/win32 -Ipocketsp hinx/include -Isphinxbase/swig -outdir pocketsphinx/swig/python -o pocketsphinx/ swig/pocketsphinx_wrap.c pocketsphinx/swig/pocketsphinx.i pocketsphinx\swig\pocketsphinx.i(128) : Error: Syntax error in input(1). error: command 'C:\Users\2018085\AppData\Local\swigwin-3.0.8\swig.exe' fai led with exit status 1
Actually the only one i could build was version 0.0.5 (tested from 0.0.9 desc). But it this case my PyCharm complain ImportError: No module named pocketsphinx even if i have pocketshinx in the list of my packages in settings...
You need to update both sphinxbase or pocketsphinx or just clone from cmusphinx/pocketsphinx-python, I wrote you about that above.
Yes, after updating everything, it built :) Thank you very much for help!
Had the same error on windows. Fixed it by downloading stdint.h from https://code.google.com/archive/p/msinttypes/ and copied it into: C:\Users[Username]\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include
Hi guys, I have similar issue with bitarr.h cannot include as you just solved for sphinxbase (https://github.com/cmusphinx/sphinxbase/issues/18) appearing during installation using
git clone --recursive https://github.com/bambocher/pocketsphinx-python cd pocketsphinx-python python setup.py install
<..> sphinxbase/include\sphinxbase/bitarr.h(43) : fatal error C1083: Cannot open incl ude file: 'stdint.h': No such file or directory error: command 'C:\Users\2018085\AppData\Local\Programs\Common\Microsoft\ \Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
I've tried to replace sphinxbase with master one from cmusphinx, but it causes different issues... Could you please have a look.