安装gcc-4.6.1出错

nanjtony 2011-08-26 09:13:24
我的linux系统是red hat enterprise linux 5,系统自带的一个gcc版本是4.1.1
现在安装gcc4.6.1
我先安装了gmp5.0.2,mpfr3.0.1和mpc0.9
最后安装gcc4.6.1
../gcc-4.4.3/configure --prefix=/usr/local/gcc-4.6.1 --with-gmp=/usr/gmp-5.0.2 --with-mpfr=/usr/local/mpfr-3.0.1 --with-mpc=/usr/local/mpc-0.9

没有问题

到make时,大概过了10分钟左右出现如下的问题(错误最后的显示)
mv tmp2-tm.texi tmp-tm.texi
/bin/sh /usr/local/src/gcc-4.6.1/gcc/../move-if-change tmp-tm.texi tm.texi
make[3]: Leaving directory `/usr/local/gcc-4.6.1/gcc'
Checking multilib configuration for libgcc...
Configuring stage 1 in i686-pc-linux-gnu/libgcc
configure: loading cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... gawk
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-ar... ar
checking for i686-pc-linux-gnu-lipo... lipo
checking for i686-pc-linux-gnu-nm... /usr/local/gcc-4.6.1/./gcc/nm
checking for i686-pc-linux-gnu-ranlib... ranlib
checking for i686-pc-linux-gnu-strip... strip
checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc... /usr/local/gcc-4.6.1/./gcc/xgcc -B/usr/local/gcc-4.6.1/./gcc/ -B/usr/local/gcc-4.6.1/i686-pc-linux-gnu/bin/ -B/usr/local/gcc-4.6.1/i686-pc-linux-gnu/lib/ -isystem /usr/local/gcc-4.6.1/i686-pc-linux-gnu/include -isystem /usr/local/gcc-4.6.1/i686-pc-linux-gnu/sys-include
checking for suffix of object files... configure: error: in `/usr/local/gcc-4.6.1/i686-pc-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] Error 1
make[2]: Leaving directory `/usr/local/gcc-4.6.1'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/usr/local/gcc-4.6.1'
make: *** [all] Error 2

请问什么原因,致谢。
...全文
1533 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
lxadccs 2013-09-01
  • 打赏
  • 举报
回复
分享下解决办法 :安装目录下有错误日志的/usr/local/gcc-4.6.1/i686-pc-linux-gnu/libgcc/config.log; 打开config.log 查找下error会发现很多错误,大部分是库没找到,如果不想做细分析的话,试下下面这句,再重新make下看还有没问题 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpc-0.8.1/lib:/usr/local/gmp-4.3.2/lib:/usr/local/mpfr-2.4.2/lib
pli0825 2012-05-29
  • 打赏
  • 举报
回复
应该是没有指定: LD_LIBRARY_PATH,将它指向mpc等那个lib目录。
red-fly 2012-05-04
  • 打赏
  • 举报
回复
LZ,你的这个问题解决了吗?我现在安装gcc4.7.0,结果也碰到了一样的问题。
你的留言板上无法留言,可能是csdn的bug
jier 2012-03-05
  • 打赏
  • 举报
回复
## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define LT_OBJDIR ".libs/"

configure: exit 0

我的出错在这
帅得不敢出门 2011-08-27
  • 打赏
  • 举报
回复
config.log 贴出来吧. 估计是某个依赖条件没有通过导致的.
如果太长,可以贴后面 出错那部分.

影月之伤 2011-08-27
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 zmlovelx 的回复:]
config.log 贴出来吧. 估计是某个依赖条件没有通过导致的.
如果太长,可以贴后面 出错那部分.
[/Quote]
这就是源码包啊 依赖问题 配置问题 编译问题 稍微出点错就完活了
jackyjkchen 2011-08-26
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 ch_984326013 的回复:]

gcc前天我刚安装好了。呵呵。你一个一个安装了
[/Quote]
gcc编译依赖这几个包的,做lfs的时候还记得
ch_984326013 2011-08-26
  • 打赏
  • 举报
回复
gcc前天我刚安装好了。呵呵。你一个一个安装了
xunxun 2011-08-26
  • 打赏
  • 举报
回复
configure: error: cannot compute suffix of object files: cannot compile
这种错误很难讲

你需要把相关的config.log贴一下

ps:lz没有ppl和cloog,那么编译出来的gcc没有新循环优化

18,777

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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