Beaglebone:gcc在尝试使用'make'构建时包含路径错误 [英] Beaglebone: gcc include path error while trying to build using 'make'
问题描述
在src中创建所有
make [1] :进入目录`/home/root/Pocketsphinx/sphinxbase-0.8/src'
在libsphinxbase中创建所有文件
make [2]:进入目录`/home/root/Pocketsphinx/sphinxbase-0.8/src/ libsphinxbase'
使用util
make [3]:进入目录`/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
/ bin / sh ../ ../../libtool --tag = CC --mode =编译gcc -std = gnu99 -DHAVE_CONFIG_H -I。 -I ../../../ include -I ../../../ include / sphinxbase -I ../../../ include -I ../../../ include -I / usr / include / python2.7 -I / usr / include / python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps / bitvec.Tpo -c -o bitvec.lo bitvec.c
libtool:compile:gcc -std = gnu99 -DHAVE_CONFIG_H -I。 -I ../../../ include -I ../../../ include / sphinxbase -I ../../../ include -I ../../../ include -I / usr / include / python2.7-I / usr / include / python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps / bitvec.Tpo -c bitvec.c -fPIC -DPIC -o .libs / bitvec.o
gcc:error:-I / usr / include / python2.7:没有这样的文件或目录
make [ 3]:*** [bitvec.lo]错误1
make [3]:离开目录`/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
make [2] :*** [all-recursive]错误1
make [2]:离开目录`/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase'
make [1]:*** [all-recursive]错误1
make [1]:离开目录`/home/root/Pocketsphinx/sphinxbase-0.8/src'
make:*** [all-recursive]错误1
我在/ usr / include下查了一下,我可以看到python2.7文件夹。但是,在上面说,gcc无法找到python2.7目录。我有点失落。任何帮助将不胜感激。
谢谢 解决方案
该参数作为要编译的文件的名称,而不是 -I
选项。我觉得这是非常奇怪的,它是围绕其中一个论点引用引号。我怀疑这是因为该参数中的一个字符不是标准的ASCII字符。例如,也许你已经使用了不同的破折号字符(不是ASCII码45 /十六进制0x2d,而是一些其他字符代码,显示有点像破折号)。
I am trying to build cmu pocketsphinx on my beaglebone black for speech recognition. I have downloaded the source code for sphinxbase and ran ./configure. Now, when I run 'make' I get the following errors:
Making all in src
make[1]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src'
Making all in libsphinxbase
make[2]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase'
Making all in util
make[3]: Entering directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
/bin/sh ../../../libtool --tag=CC --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/sphinxbase -I../../../include -I../../../include -I/usr/include/python2.7 -I/usr/include/python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps/bitvec.Tpo -c -o bitvec.lo bitvec.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../../include -I../../../include/sphinxbase -I../../../include -I../../../include "-I/usr/include/python2.7" -I/usr/include/python2.7 -g -O2 -Wall -MT bitvec.lo -MD -MP -MF .deps/bitvec.Tpo -c bitvec.c -fPIC -DPIC -o .libs/bitvec.o
gcc: error: -I/usr/include/python2.7: No such file or directory
make[3]: *** [bitvec.lo] Error 1
make[3]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase/util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src/libsphinxbase'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/root/Pocketsphinx/sphinxbase-0.8/src'
make: *** [all-recursive] Error 1
I have checked under /usr/include and I can see python2.7 folder there. But, in the above it says that gcc can not find the python2.7 directory. I am kind of lost. Any help would be appreciated.
Thanks
GCC is interpreting that argument as the name of a file to be compiled, not a -I
option. I find it exceedingly odd that it's putting quotes around one of the arguments. My suspicion is that this is because one of the characters in that argument is not a standard ASCII character. For example maybe you've used a different dash character (not ASCII code 45 / hex 0x2d, but instead some other character code that shows up sort of like a dash).
这篇关于Beaglebone:gcc在尝试使用'make'构建时包含路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!