有人可以说明我在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
这里的'error'一词出现在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
但我不知道这是不是致命。
建议?
答案 0 :(得分:0)
这可能已经过时,但我遇到了同样的问题,可以通过安装libstdc
来修复它。