安装gcc-4.7.1时遇到据说是很常见的make错误
竞天问 2012-09-23 09:15:19 make时遇到:
checking for suffix of object files... configure: error: in `/home/binghe/gcc-4.7/gcc-4.7.1/x86_64-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] 错误 1
make[2]:正在离开目录 `/home/binghe/gcc-4.7/gcc-4.7.1'
make[1]: *** [stage1-bubble] 错误 2
make[1]:正在离开目录 `/home/binghe/gcc-4.7/gcc-4.7.1'
make: *** [all] 错误 2
然后就停下了
在论坛里搜索时看有人要config.log文件信息的,我估计下面的部分是错误信息:
configure:3355: $? = 0
configure:3344: /home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/xgcc -B/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/ -B/usr/gcc_4_7/x86_64-linux-gnu/bin/ -B/usr/gcc_4_7/x86_64-linux-gnu/lib/ -isystem /usr/gcc_4_7/x86_64-linux-gnu/include -isystem /usr/gcc_4_7/x86_64-linux-gnu/sys-include -v >&5
Reading specs from /home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/specs
COLLECT_GCC=/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/xgcc
COLLECT_LTO_WRAPPER=/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../gcc-4.7.1/configure --build=x86_64-linux-gnu --prefix=/usr/gcc_4_7 --with-gmp=/usr/gcc_4_7 --with-mpfr=/usr/gcc_4_7 --with-mpc=/usr/gcc_4_7 --enable-checking=release --enable-languages=c,c++ --disable-multilib -program-suffix=-4.7
Thread model: posix
gcc version 4.7.1 (GCC)
configure:3355: $? = 0
configure:3344: /home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/xgcc -B/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/ -B/usr/gcc_4_7/x86_64-linux-gnu/bin/ -B/usr/gcc_4_7/x86_64-linux-gnu/lib/ -isystem /usr/gcc_4_7/x86_64-linux-gnu/include -isystem /usr/gcc_4_7/x86_64-linux-gnu/sys-include -V >&5
xgcc: error: unrecognized command line option '-V'
xgcc: fatal error: no input files
compilation terminated.
configure:3355: $? = 1
configure:3344: /home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/xgcc -B/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/ -B/usr/gcc_4_7/x86_64-linux-gnu/bin/ -B/usr/gcc_4_7/x86_64-linux-gnu/lib/ -isystem /usr/gcc_4_7/x86_64-linux-gnu/include -isystem /usr/gcc_4_7/x86_64-linux-gnu/sys-include -qversion >&5
xgcc: error: unrecognized command line option '-qversion'
xgcc: fatal error: no input files
compilation terminated.
configure:3355: $? = 1
configure:3371: /home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/xgcc -B/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/ -B/usr/gcc_4_7/x86_64-linux-gnu/bin/ -B/usr/gcc_4_7/x86_64-linux-gnu/lib/ -isystem /usr/gcc_4_7/x86_64-linux-gnu/include -isystem /usr/gcc_4_7/x86_64-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5
/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
configure:3374: $? = 1
configure:3562: checking for suffix of object files
configure:3584: /home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/xgcc -B/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/ -B/usr/gcc_4_7/x86_64-linux-gnu/bin/ -B/usr/gcc_4_7/x86_64-linux-gnu/lib/ -isystem /usr/gcc_4_7/x86_64-linux-gnu/include -isystem /usr/gcc_4_7/x86_64-linux-gnu/sys-include -c -g -O2 conftest.c >&5
/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.3: cannot open shared object file: No such file or directory
configure:3588: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL "http://www.gnu.org/software/libgcc/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3602: error: in `/home/binghe/gcc-4.7/gcc-4.7.1/x86_64-linux-gnu/libgcc':
configure:3605: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
不过为了以防万一,我把整个文件贴出来: