我想安装gcc 4.9.1。 所以我下载了tar球,安装了依赖项,然后运行config –
./configure --program-suffix=-4.9.1 --disable-multilib
这工作得很好。
但是,当我采取下一步,并解雇了,我得到了以下错误:
configure: error: no usable dependency style found make[2]: *** [configure-stage1-gcc] Error 1
当make
试图checking dependency style of /usr/bin
并且它找不到none
东西的时候出错。
任何人都可以解释checking dependency style of /usr/bin
什么意思?
任何想法,当这个问题来了,如何解决它。 我做了一些search,找不到任何东西。
我在64位RHEL 6.x机器上编译。
编辑1:
正如arm所build议的那样,我在个别的config.log里面写错了。 终于find了一个。 这里有一些内容
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/ext/hash_map:60, from conftest.cpp:74: /usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/backward/backward_warning.h:28:2: warning: #warning This file includes at least one deprecated or antiquated header which may be removed without further notice at a future date. Please use a non-deprecated interface with equivalent functionality instead. For a listing of replacement headers and interfaces, consult the file backward_warning.h. To disable this warning use -Wno-deprecated. configure:8747: $? = 0 configure:8747: result: yes configure:8794: checking dependency style of /usr/bin configure:8825: trying gcc3 | depmode=gcc3 source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 115: /usr/bin: is a directory configure:8825: trying gcc | depmode=gcc source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 138: /usr/bin: is a directory configure:8825: trying hp | depmode=hp source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 138: /usr/bin: is a directory configure:8825: trying sgi | depmode=sgi source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 179: /usr/bin: is a directory configure:8825: trying aix | depmode=aix source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 237: /usr/bin: is a directory configure:8825: trying icc | depmode=icc source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 285: /usr/bin: is a directory configure:8825: trying hp2 | depmode=hp2 source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 322: /usr/bin: is a directory configure:8825: trying tru64 | depmode=tru64 source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 384: /usr/bin: is a directory configure:8825: trying dashmstdout | depmode=dashmstdout source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 415: /usr/bin: is a directory configure:8825: trying dashXmstdout | depmode=dashXmstdout source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 415: /usr/bin: is a directory configure:8825: trying makedepend | depmode=tru64 source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 384: /usr/bin: is a directory configure:8825: trying dashmstdout | depmode=dashmstdout source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 415: /usr/bin: is a directory configure:8825: trying dashXmstdout | depmode=dashXmstdout source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 415: /usr/bin: is a directory configure:8825: trying makedepend | depmode=makedepend source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 467: /usr/bin: is a directory configure:8825: trying cpp | depmode=cpp source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 518: /usr/bin: is a directory configure:8825: trying msvisualcpp | depmode=msvisualcpp source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 561: /usr/bin: is a directory configure:8825: trying msvcmsys | depmode=msvcmsys source=sub/conftest.c object=sub/conftest.o depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo /bin/sh ./depcomp /usr/bin -c -o sub/conftest.o sub/conftest.c configure:8868: failure, diagnostics are: | ./depcomp: line 561: /usr/bin: is a directory configure:8879: result: none configure:8882: error: no usable dependency style found
两件事情:
您不应该在源代码树中构建GCC; 它没有明确禁用,但不支持。 再次尝试使用外部构建目录。 这是在HTML安装手册。
检查config.log
文件。 每个目录将有一个,其中一个将包含“找不到可用的依赖样式”消息。 你应该能够找到更多的细节。
编辑下面的额外信息:
看起来您已经在您的环境中设置了CXX=/usr/bin
。 它应该是CXX=/usr/bin/g++
。
在CentOS/RedHat
,很可能是因为你没有安装g ++
$ which g++ // not found
安装Development Tools
将解决这个问题:
$ yum groupinstall 'Development Tools' $ which g++ /usr/bin/g++