【问题标题】:Error building g++ 4.8.1 on CentOS在 CentOS 上构建 g++ 4.8.1 时出错
【发布时间】:2013-09-22 14:23:22
【问题描述】:

谁能建议我在 CentOS 6 上尝试的 g++ 4.8.1 安装出了什么问题?

安装的编译器是g++ 4.4.7。

make 步骤在此之后不久结束:

checking for suffix of object files... configure: error: in `/mxhome/charrison/gcc-4.8.1/gcc-4.8.1/build-gcc/x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

config.log 包含以下关于目标文件后缀的看似无害的评论:

configure:4390: checking for suffix of object files
configure:4412: gcc -c   conftest.c >&5
configure:4416: $? = 0
configure:4437: result: o

此处的 config.log 文件中出现“错误”一词(我的 g++4.4 肯定会通过测试):

configure:4936: checking whether g++ accepts -static-libstdc++ -static-libgcc
configure:4953: g++ -o conftest -g -O2   -static-libstdc++ -static-libgcc conftest.cpp  >&5
g++: unrecognized option '-static-libstdc++'
conftest.cpp:11:2: error: #error -static-libstdc++ not implemented
configure:4953: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| #if (__GNUC__ < 4) || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
| #error -static-libstdc++ not implemented
| #endif

但我不知道这是否致命。

建议?

【问题讨论】:

    标签: centos6 failed-installation g++4.8


    【解决方案1】:

    这可能已经过时了,但我遇到了同样的问题,可以通过安装 libstdc 来解决它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-25
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多