如何在制作GCC 4.9.1时解决“找不到可用的依赖样式”错误

时间:2014-07-31 09:23:00

标签: linux gcc

我想安装gcc 4.9.1。所以我下载了tar ball,安装了依赖项,并使用 -

运行config

./configure --program-suffix=-4.9.1 --disable-multilib

工作得很好。

但是当我采取下一步并解雇make时,我收到以下错误:

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的含义吗?

知道何时出现此问题以及如何解决此问题。我做了一些搜索,找不到任何东西。

我正在使用64位RHEL 6.x机器进行编译。

  

编辑1:

正如胳膊所建议的那样,我在个人config.log中遇到了错误。终于找到了它。这是一些内容

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

2 个答案:

答案 0 :(得分:5)

CentOS/RedHat上,很可能是因为您没有安装 g ++

$ which g++
// not found

安装 Development Tools 将解决此问题:

$ yum groupinstall 'Development Tools'
$ which g++
/usr/bin/g++

答案 1 :(得分:4)

两件事:

  1. 您不应在源树中构建GCC;它未明确禁用,但不受支持。再次尝试使用外部构建目录。它位于HTML安装手册中。

  2. 检查config.log个文件。每个目录将有一个,其中一个将包含“找不到可用的依赖样式”消息。你应该能够在那里找到更多细节。

  3. 编辑以下额外信息:

    您的环境中似乎已设置CXX=/usr/bin。它应该是CXX=/usr/bin/g++