安装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.

不过为了以防万一,我把整个文件贴出来:
...全文
33386 19 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
19 条回复
切换为时间正序
请发表友善的回复…
发表回复
微wx笑 2015-05-02
  • 打赏
  • 举报
回复
http://blog.csdn.net/testcs_dn/article/details/45437149
zhangxhappy 2014-11-28
  • 打赏
  • 举报
回复 2
需要将mpc、gmp和mpfr目录加入到环境变量中,在/etc/profile文件末尾加上:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-5.0.1/lib:/usr/local/mpfr-3.0.0/lib,注意修改目录,之后运行#source /etc/profile使其生效即可
拥剑公子 2014-08-20
  • 打赏
  • 举报
回复
楼上正解!!!
bighunter513 2013-05-24
  • 打赏
  • 举报
回复
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc/lib:/usr/local/gmp/lib:/usr/local/mpfr/lib/
竞天问 2012-09-24
  • 打赏
  • 举报
回复
[Quote=引用 13 楼 的回复:]

引用 12 楼 的回复:

引用 11 楼 的回复:

g++ -std=c++0x test.cpp -lpthread


为什么还需要特别注明这个选项,是因为线程特殊还是因为Linux对线程的支持问题?
对C++11的支持还需要有其它选项需要注意吗?

为什么在man g++里找不到关于-lpthread的介绍?


我也是才搜索了下,没有深入了解,你如果有深……
[/Quote]

无论如何,谢谢!
竞天问 2012-09-24
  • 打赏
  • 举报
回复
在make gcc时还会报错说没有autogen,用apt-get安装上后才算是正常了,要不然安装好的gcc没有设定的-4.7后缀。
当然,这不是问题了,只是放在这里,希望可以帮助别人。

冷月清晖 2012-09-24
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 的回复:]

引用 11 楼 的回复:

g++ -std=c++0x test.cpp -lpthread


为什么还需要特别注明这个选项,是因为线程特殊还是因为Linux对线程的支持问题?
对C++11的支持还需要有其它选项需要注意吗?

为什么在man g++里找不到关于-lpthread的介绍?
[/Quote]

我也是才搜索了下,没有深入了解,你如果有深入的研究结果,记得回来分享下。
竞天问 2012-09-24
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 的回复:]

g++ -std=c++0x test.cpp -lpthread
[/Quote]

为什么还需要特别注明这个选项,是因为线程特殊还是因为Linux对线程的支持问题?
对C++11的支持还需要有其它选项需要注意吗?

为什么在man g++里找不到关于-lpthread的介绍?
冷月清晖 2012-09-24
  • 打赏
  • 举报
回复
g++ -std=c++0x test.cpp -lpthread
冷月清晖 2012-09-24
  • 打赏
  • 举报
回复
[Quote=引用 7 楼 的回复:]

比如一面这段程序:
C/C++ code

#include <iostream>
#include<thread>
using namespace std;
void thread_fun()
{
for (int i = 0 ; i < 100 ; ++i)
{
cout<<i<<endl;
}
}
int main()
{
thread ……
[/Quote]

google了下,发现:What is wrong with this use of std::thread?
竞天问 2012-09-24
  • 打赏
  • 举报
回复
在使用g++里还需要LD_LIBRARY_PATH指明mpc库的位置?
竞天问 2012-09-24
  • 打赏
  • 举报
回复
顺便说一下,我是照着
http://www.oschina.net/question/12_49423
做的,只是红薯没说要export LD_LIBRARY_PATH
竞天问 2012-09-24
  • 打赏
  • 举报
回复
比如一面这段程序:

#include <iostream>
#include<thread>
using namespace std;
void thread_fun()
{
for (int i = 0 ; i < 100 ; ++i)
{
cout<<i<<endl;
}
}
int main()
{
thread t(thread_fun);
t.join();
return 0;
}


应该是没什么问题的吧?

在gcc-4.7.2下编译也没问题,在运行时出错:
terminate called after throwing an instance of 'std::system_error'
what(): Operation not permitted
我以前没怎么在LINUX下写过程序,不太清楚这是为什么,还请各位指教
redleaves 2012-09-23
  • 打赏
  • 举报
回复
运行不正常?是什么状况?
我分别编译了x86-linux/win32下针对4个不同target的版本,没见有什么问题啊
竞天问 2012-09-23
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 的回复:]

不用搞4.7.1了. 已经出4.7.2了....
现在编译gcc请准备gmp/mpc/mpfr/cloog/ppl这几个库.另外,还请注意版本,太新或太旧也不行.
/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/cc1: error while loading shared libraries: libmpc.so.3: ca……
[/Quote]

我刚编译了4.7.2了,只是运行还不太正常,不太清楚是哪儿的问题,还需要再深入一下
竞天问 2012-09-23
  • 打赏
  • 举报
回复
我知道是什么问题了,给LD_LIBRARY_PATH赋值时少了/lib段
竞天问 2012-09-23
  • 打赏
  • 举报
回复

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='ar'
AWK='gawk'
CC='/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 '
CFLAGS='-g -O2'
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='/usr/bin/install -c -m 644'
INSTALL_PROGRAM='/usr/bin/install -c'
INSTALL_SCRIPT='/usr/bin/install -c'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIPO='lipo'
LN_S='ln -s'
LTLIBOBJS=''
MAINT='#'
NM='/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/nm'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='GNU C Runtime Library'
PACKAGE_STRING='GNU C Runtime Library 1.0'
PACKAGE_TARNAME='libgcc'
PACKAGE_URL='http://www.gnu.org/software/libgcc/'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
PICFLAG='-fpic'
RANLIB='ranlib'
SHELL='/bin/bash'
STRIP='strip'
ac_ct_CC=''
asm_hidden_op=''
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias='x86_64-linux-gnu'
build_cpu='x86_64'
build_libsubdir='build-x86_64-linux-gnu'
build_os='linux-gnu'
build_subdir='build-x86_64-linux-gnu'
build_vendor='pc'
cpu_type=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
decimal_float=''
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
double_type_size=''
dvidir='${docdir}'
enable_decimal_float=''
enable_shared='yes'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
host='x86_64-pc-linux-gnu'
host_alias='x86_64-linux-gnu'
host_cpu='x86_64'
host_noncanonical='x86_64-linux-gnu'
host_os='linux-gnu'
host_subdir='host-x86_64-linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='../.././libgcc/..'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
long_double_type_size=''
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='/usr/gcc_4_7'
program_transform_name='s&$&-4.7&'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
set_use_emutls=''
sfp_machine_header=''
sharedstatedir='${prefix}/com'
slibdir='$(libdir)'
sysconfdir='${prefix}/etc'
target_alias='x86_64-linux-gnu'
target_noncanonical='x86_64-linux-gnu'
target_subdir='x86_64-linux-gnu'
tm_defines=''
tm_file=''
tmake_file=''
toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)'
toolexeclibdir='$(libdir)/../lib64'
vis_hide=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* 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/"

configure: exit 1
竞天问 2012-09-23
  • 打赏
  • 举报
回复
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.64. Invocation command line was

$ /home/binghe/gcc-4.7/gcc-4.7.1/libgcc/configure --cache-file=./config.cache --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 --disable-multilib --enable-languages=c,c++,lto --program-transform-name=s&$&-4.7& --disable-option-checking --with-target-subdir=x86_64-linux-gnu --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --srcdir=../.././libgcc --disable-intermodule --enable-checking=release,types --disable-coverage --enable-languages=c,c++,lto

## --------- ##
## Platform. ##
## --------- ##

hostname = binghe-virtual-machine
uname -m = x86_64
uname -r = 2.6.35-25-generic
uname -s = Linux
uname -v = #43-Ubuntu SMP Thu Jan 6 22:25:21 UTC 2011

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/gcc_4_7/bin
PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1976: creating cache ./config.cache
configure:2144: checking build system type
configure:2158: result: x86_64-pc-linux-gnu
configure:2178: checking host system type
configure:2191: result: x86_64-pc-linux-gnu
configure:2289: checking for --enable-version-specific-runtime-libs
configure:2302: result: no
configure:2350: checking for a BSD-compatible install
configure:2418: result: /usr/bin/install -c
configure:2434: checking for gawk
configure:2461: result: gawk
configure:2561: checking for x86_64-linux-gnu-ar
configure:2588: result: ar
configure:2653: checking for x86_64-linux-gnu-lipo
configure:2680: result: lipo
configure:2745: checking for x86_64-linux-gnu-nm
configure:2772: result: /home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/nm
configure:2837: checking for x86_64-linux-gnu-ranlib
configure:2864: result: ranlib
configure:2929: checking for x86_64-linux-gnu-strip
configure:2956: result: strip
configure:3018: checking whether ln -s works
configure:3022: result: yes
configure:3039: checking for x86_64-linux-gnu-gcc
configure:3066: result: /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
configure:3335: checking for C compiler version
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 --version >&5
xgcc (GCC) 4.7.1
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

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.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-pc-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/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 '
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-g -O2'
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=x86_64-linux-gnu
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=x86_64-linux-gnu
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_prog_AR=ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC='/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 '
ac_cv_prog_LIPO=lipo
ac_cv_prog_NM=/home/binghe/gcc-4.7/gcc-4.7.1/host-x86_64-linux-gnu/gcc/nm
ac_cv_prog_RANLIB=ranlib
ac_cv_prog_STRIP=strip
redleaves 2012-09-23
  • 打赏
  • 举报
回复
不用搞4.7.1了. 已经出4.7.2了....
现在编译gcc请准备gmp/mpc/mpfr/cloog/ppl这几个库.另外,还请注意版本,太新或太旧也不行.
/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
libmpc.so就是mpc这库.你看下版本,配置之类的吧.
现在的gcc已经很好编译了.不像以前.经常出问题...

24,860

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 工具平台和程序库
社区管理员
  • 工具平台和程序库社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧