LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 947|回复: 8

GCC安装问题

[复制链接]
发表于 2007-2-24 12:04:50 | 显示全部楼层 |阅读模式
我用的是Ubuntu 6.10 alternate i386系统......
系统安装好后软件更新过一次....Gcc的版本是.4.1.1-6ubuntu3吧...
但是我要安装GAIM....可是GAIM要求GCC要4.1.2以上..
我下了个4.1.2的源码包....
./configure的时候出现这样.
这是configure.log的内容::
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:600: checking host system type
configure:621: checking target system type
configure:639: checking build system type
configure:694: checking for a BSD compatible install
configure:747: checking whether ln works
configure:771: checking whether ln -s works
configure:1825: checking for gcc
configure:1938: checking whether the C compiler (gcc  ) works
configure:1954: gcc -o conftest    conftest.c  1>&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure: failed program was:

#line 1949 "configure"
#include "confdefs.h"

main(){return(0);}


请问这是咋回事呢....
高手请回答一下..
解决了这样还有一个GRUB的问题..郁闷啊..
发表于 2007-2-24 23:07:16 | 显示全部楼层
你试试加上--disable-multilib

./configure --disable-multilib
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-25 11:18:00 | 显示全部楼层
今天我安装了一些包....
现在用"./configure"或"./configure --disable-multilib"
都是出现这个了:
root@ccode:/home/ccode/soft/gcc-4.2-20060715# ./configure --disable-multilib
loading cache ./config.cache
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking build system type... i686-pc-linux-gnulibc1
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
root@ccode:/home/ccode/soft/gcc-4.2-20060715# ./configure
loading cache ./config.cache
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking build system type... i686-pc-linux-gnulibc1
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
root@ccode:/home/ccode/soft/gcc-4.2-20060715#
不过现在用的是GCC 4.2.这应该不是这个的问题..
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-2-25 11:20:08 | 显示全部楼层
一checking到gcc那里就有问题.
checking whether the C compiler (gcc ) works... no
C compiler cannot create executables.
这两个是什么关系?/.
回复 支持 反对

使用道具 举报

发表于 2007-2-25 13:37:38 | 显示全部楼层
楼主自己写一个最简单的程序,手工编译一下,看能不能通过
回复 支持 反对

使用道具 举报

发表于 2007-2-26 18:47:16 | 显示全部楼层
打gcc -v可以看当前GCC的编译配置
按着这个进行configure试试
回复 支持 反对

使用道具 举报

发表于 2007-2-28 12:57:20 | 显示全部楼层
请注意,编译 gcc 不能在源码树的目录下来 configure 的!

详细方法应參考 gcc 的文档或者 LFS 手册

另,楼主的系统可能是缺少了某些开发包
回复 支持 反对

使用道具 举报

发表于 2007-2-28 20:43:48 | 显示全部楼层
楼主的系统似乎缺少/usr/bin/ld

我有一个懒的建议, 因为我这样做成功过.

用apt-get 来安装gcc.
我用了一下就成功了.
回复 支持 反对

使用道具 举报

发表于 2007-2-28 20:53:06 | 显示全部楼层
ld 是属於 binutils 的,而 gcc 又依赖於 binutils,若系统上有 gcc,那麽 ld 应该是存在的,估计还是有什麽东西不全
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表