LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: awnun

第一次编译binutils-2.17出现的错误,求救

[复制链接]
发表于 2008-8-12 11:41:56 | 显示全部楼层

结果一样,但问题不一样。

我第一次编译的时候使用的命令是:
使用lfs用户登陆:
cd $LFS/source

tar -jxvf binutils-2.17.tar.bz2

mkdir -v ../binutils-build

cd ../binutils-build

CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
    --prefix=/tools --disable-nls --disable-werror

creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
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 -B/usr/bin/
checking whether the C compiler (gcc -B/usr/bin/  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.


vi ./config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:611: checking host system type
configure:632: checking target system type
configure:650: checking build system type
configure:705: checking for a BSD compatible install
configure:758: checking whether ln works
configure:782: checking whether ln -s works
configure:1867: checking for gcc
configure:1980: checking whether the C compiler (gcc -B/usr/bin  ) works
configure:1996: gcc -B/usr/bin -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 1991 "configure"
#include "confdefs.h"

main(){return(0);}
回复 支持 反对

使用道具 举报

发表于 2008-8-12 16:14:32 | 显示全部楼层
Post by dusks;1885049
我第一次编译的时候使用的命令是:
使用lfs用户登陆:
cd $LFS/source

tar -jxvf binutils-2.17.tar.bz2

mkdir -v ../binutils-build

cd ../binutils-build

CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
    --prefix=/tools --disable-nls --disable-werror

creating cache ./config.cache
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
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 -B/usr/bin/
checking whether the C compiler (gcc -B/usr/bin/  ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.


vi ./config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:611: checking host system type
configure:632: checking target system type
configure:650: checking build system type
configure:705: checking for a BSD compatible install
configure:758: checking whether ln works
configure:782: checking whether ln -s works
configure:1867: checking for gcc
configure:1980: checking whether the C compiler (gcc -B/usr/bin  ) works
configure:1996: gcc -B/usr/bin -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 1991 "configure"
#include "confdefs.h"

main(){return(0);}


问题解决!方法如下:

是这个文件缺失:crt1.o

使用下例的方法找到并安装上,即可解决问题。
On Ubuntu:
apt-get install libc6-dev

On debian:
apt-get install libc6-dev

On Fedora:

$ locate crt1.o
/usr/lib/crt1.o


$ rpm -qf /usr/lib/crt1.o
glibc-devel-X.X.X-XX


Then install the package glibc-devel-X.X.X-XX using yum, rpm, etc
回复 支持 反对

使用道具 举报

发表于 2008-10-17 22:38:31 | 显示全部楼层
我也碰上了和楼主一样的问题
正愁着不知如何解决呢
回复 支持 反对

使用道具 举报

发表于 2008-10-18 10:46:06 | 显示全部楼层
Post by lofeng410;1895380
我也碰上了和楼主一样的问题
正愁着不知如何解决呢


楼主用的是vmware,怎能不出错?

用虚拟机的就应该明白虚拟机下一切皆有可能。

LFS的光盘和手册都是针对不用虚拟机的情况进行的测试。
回复 支持 反对

使用道具 举报

发表于 2008-10-18 11:04:04 | 显示全部楼层
Post by ti8er;1895495
楼主用的是vmware,怎能不出错?

用虚拟机的就应该明白虚拟机下一切皆有可能。

LFS的光盘和手册都是针对不用虚拟机的情况进行的测试。

现在我没有用虚拟机了
但是跟楼主的问题一样 make的时候陷入死循环
现在发现可能是binutils-2.17中的很多文件的time stamp比系统时间还要新(系统时间是GMT 2002.12.31),在我这可能是这个原因造成死循环的。
我正在尝试用touch命令更改binutils-2.17中文件的time stamp,但是这个方式不是很好,因为后面还会出现这个问题。我想问下,可有直接更新系统时间的命令(通过网络更新)?这样才能彻底的解决问题
回复 支持 反对

使用道具 举报

发表于 2008-10-18 11:15:38 | 显示全部楼层
好像不是这个原因  touch后问题依旧
回复 支持 反对

使用道具 举报

发表于 2008-10-18 11:47:30 | 显示全部楼层
Post by lofeng410;1895504
现在我没有用虚拟机了
但是跟楼主的问题一样 make的时候陷入死循环
现在发现可能是binutils-2.17中的很多文件的time stamp比系统时间还要新(系统时间是GMT 2002.12.31),在我这可能是这个原因造成死循环的。
我正在尝试用touch命令更改binutils-2.17中文件的time stamp,但是这个方式不是很好,因为后面还会出现这个问题。我想问下,可有直接更新系统时间的命令(通过网络更新)?这样才能彻底的解决问题


你现在的系统时间是多少?
回复 支持 反对

使用道具 举报

发表于 2008-10-18 11:53:00 | 显示全部楼层
1、检查你的时区:
echo TZ
2、用date命令直接改你的系统时间
date 101811402008
回复 支持 反对

使用道具 举报

发表于 2008-10-18 11:58:19 | 显示全部楼层
Post by ti8er;1895536
你现在的系统时间是多少?

进入系统后date后的时间是GMT 2002.12.31
我已经date -s 081018了
但是错误依旧 在config.log文件中依然提示找不到:
-----------------------------------------------------------------------------------------------
configure:2324: error: 'choke' undeclared (first use in this function)
configure:2324: error: (Each undeclared identifier is reported only once
configure:2324: error: for each function it appears in.)
configure:2324: error: expected ';' before 'me'
configure: failed program was:
#line 2319 "configure"
#include "confdefs.h"
#include "gmp.h"
int main() {

#if __GNU_MP_VERSION < 3
choke me
#endif

; return 0; }
回复 支持 反对

使用道具 举报

发表于 2008-10-18 11:59:55 | 显示全部楼层
目前这样make就是死循环
一直循环显示的包含下面的内容:
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... host tool
checking where to find the target c++... host tool
checking where to find the target c++ for libstdc++... host tool
checking where to find the target dlltool... host tool
checking where to find the target gcc... host tool
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking where to find the target windmc... host tool
回复 支持 反对

使用道具 举报

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

本版积分规则

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