LinuxSir.cn,穿越时空的Linuxsir!

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

GCC求助!

[复制链接]
发表于 2006-11-4 01:38:07 | 显示全部楼层 |阅读模式
lfs@ubuntu-dp:/mnt/lfs/sources/binutils-build$ ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
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.
lfs@ubuntu-dp:/mnt/lfs/sources/binutils-build$ gcc
gcc: no input files
?????
GCC是3.4。4.0我也试过,同样的问题。
gcc的权限是755。这也没问题阿。

所以查看了config.log文件,发现这个问题:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:595: checking host system type
configure:616: checking target system type
configure:634: checking build system type
configure:689: checking for a BSD compatible install
configure:742: checking whether ln works
configure:766: checking whether ln -s works
configure:1798: checking for gcc
configure:1911: checking whether the C compiler (gcc  ) works
configure:1927: 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 1922 "configure"
#include "confdefs.h"

main(){return(0);}
找不到 crt1.o,


接着又找到提示
On Feb 28, 2001, Richard Dybowski <rdybowski@btinternet.com> wrote:

>       /usr/bin/ld: cannot open crt1.o: No such file or directory

Install glibc-devel

> added the flag -L/usr/i386-glibc20-linux/lib so that the linker could
> locate the files

-L is for libraries, not object files.  In the case of crt files,
-B/usr/i386-glibc20-linux/lib/ (note the trailing slash) helps.

怎么找到crt1.o文件
网上glibc-devel皆为rpm。
怎么办?
发表于 2006-11-4 10:45:48 | 显示全部楼层

不知你是第几遍编译,建议你lfs-book操作,gcc-4.11很好通过

我是从clfs做起的
具体参见:
http://cross-lfs.org/view/clfs-2.0/x86/



Post by pilgrim_dp
lfs@ubuntu-dp:/mnt/lfs/sources/binutils-build$ ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
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.
lfs@ubuntu-dp:/mnt/lfs/sources/binutils-build$ gcc
gcc: no input files
?????
GCC是3.4。4.0我也试过,同样的问题。
gcc的权限是755。这也没问题阿。

所以查看了config.log文件,发现这个问题:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:595: checking host system type
configure:616: checking target system type
configure:634: checking build system type
configure:689: checking for a BSD compatible install
configure:742: checking whether ln works
configure:766: checking whether ln -s works
configure:1798: checking for gcc
configure:1911: checking whether the C compiler (gcc  ) works
configure:1927: 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 1922 "configure"
#include "confdefs.h"

main(){return(0);}
找不到 crt1.o,


接着又找到提示
On Feb 28, 2001, Richard Dybowski <rdybowski@btinternet.com> wrote:

>       /usr/bin/ld: cannot open crt1.o: No such file or directory

Install glibc-devel

> added the flag -L/usr/i386-glibc20-linux/lib so that the linker could
> locate the files

-L is for libraries, not object files.  In the case of crt files,
-B/usr/i386-glibc20-linux/lib/ (note the trailing slash) helps.

怎么找到crt1.o文件
网上glibc-devel皆为rpm。
怎么办?
回复 支持 反对

使用道具 举报

发表于 2006-11-4 15:53:06 | 显示全部楼层
宿主系统环境的问题吧
楼主真胆大,第一次做不用livecd
回复 支持 反对

使用道具 举报

发表于 2006-11-4 17:07:10 | 显示全部楼层
呵呵,俺第一次做 LFS 时也没用(有) LiveCD。。。
回复 支持 反对

使用道具 举报

发表于 2006-11-4 20:25:16 | 显示全部楼层
我做的时候也没有livecd
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-13 19:52:59 | 显示全部楼层
拜托各位大虾说正题先。
怎么ubuntu5.1存在这样的问题,装gcc还存在缺少lib?
回复 支持 反对

使用道具 举报

发表于 2006-11-15 07:39:52 | 显示全部楼层
记得新版 gcc 编译旧版 binutils 要打特别补丁,你换个新版的 binutils 试试吧
回复 支持 反对

使用道具 举报

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

本版积分规则

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