Beaglebone:gcc在尝试使用'make'构建时包含路径错误 [英] Beaglebone: gcc include path error while trying to build using 'make'

查看:239
本文介绍了Beaglebone:gcc在尝试使用'make'构建时包含路径错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在我的beaglebone黑色上构建用于语音识别的cmu pocketsphinx。我已经下载了sphinxbase的源代码并运行了./configure。现在,当我运行'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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆