+ -
当前位置:首页 → 问答吧 → Binutils-2.16.1 - 第一遍

Binutils-2.16.1 - 第一遍

时间:2007-12-14

来源:互联网

好痛苦!排查 了很多原因,到最后怕自己输入错误,特地用PUTTY copy 进去,到Binutils-2.16.1 - 第一遍,也就是5.3的时候,就出现编译错误!
很多人说有两个原因:
如果你第一遍binutils都无法编译,那么基本上可以确定是你主系统的问题,这里有两个选择:可以使用LFS的LiveCD来做主系统,这样可以尽量避免因主系统造成的问题;也可以换用binutils-2.16.1这个版本来做,这个版本的编译成功率非常高。
可是我就是用LiveCD来做主系统的,而且硬盘全阁光了,请问是怎么回事啊!
和我一起的同学也是第一次,用的这个盘,同一个步骤,能编译成功!
我的已经尝试了不下10遍了,都是同样的问题(这里应该没问题的):
cfdisk
mke2fs -jv /dev/hda1
mkswap /dev/hda2
export LFS=/mnt/lfs
mkdir -pv $LFS
mkdir -pv $LFS
mount -v -t ext3 /dev/hda1 $LFS
/sbin/swapon -v /dev/hda2
export LFS=/mnt/lfs
mkdir -pv $LFS
mkdir -v $LFS/sources
chmod -v a+wt $LFS/sources
mkdir -v $LFS/tools
ln -sv $LFS/tools /
groupadd lfs
useradd -s /bin/bash -g lfs -m -k /dev/null lfs
passwd lfs
chown -v lfs $LFS/tools
chown -v lfs $LFS/sources
su - lfs

cat > ~/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
EOF

cat > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF

source ~/.bash_profile

cd $LFS/sources
tar xvf /lfs-sources/binutils-2.16.1.tar.bz2解压成功!
cd binutils-2.16.1
lfs:/mnt/lfs/sources/binutils-build$ ../binutils-2.16.1/configure --prefix=/tools --disable-nls
之后就有这样的结果 :
creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-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
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... bison
checking for bison... bison -y
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for i686-pc-linux-gnu-ar... no
checking for ar... ar
checking for i686-pc-linux-gnu-as... no
checking for as... as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... windres
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... objdump
checking for i686-pc-linux-gnu-ar... no
checking for ar... ar
checking for i686-pc-linux-gnu-as... no
checking for as... as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... windres
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... yes
updating cache ./config.cache
creating ./config.status
creating Makefile

有错误码?
然后make
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
running /bin/sh ../binutils-2.16.1/configure --prefix=/tools --disable-nls --no-create --no-recursion
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gnatbind... no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... (cached) bison
checking for bison... (cached) bison -y
checking for gm4... (cached) m4
checking for flex... (cached) flex
checking for flex... (cached) flex
checking for makeinfo... (cached) makeinfo
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... (cached) objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... (cached) objdump
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... (cached) yes
creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating Makefile
make: Warning: File `../binutils-2.16.1/Makefile.in' has modification time 1.4e+08 s in the future
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
running /bin/sh ../binutils-2.16.1/configure --prefix=/tools --disable-nls --no-create --no-recursion
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... (cached) /usr/bin/install -c
checking whether ln works... (cached) yes
checking whether ln -s works... (cached) yes
checking for gcc... (cached) gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gnatbind... no
checking whether compiler driver understands Ada... (cached) no
checking how to compare bootstrapped objects... (cached) cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
checking for bison... (cached) bison
checking for bison... (cached) bison -y
checking for gm4... (cached) m4
checking for flex... (cached) flex
checking for flex... (cached) flex
checking for makeinfo... (cached) makeinfo
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... (cached) objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... (cached) objdump
checking for i686-pc-linux-gnu-ar... no
checking for ar... (cached) ar
checking for i686-pc-linux-gnu-as... no
checking for as... (cached) as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... (cached) dlltool
checking for i686-pc-linux-gnu-ld... no
checking for ld... (cached) ld
checking for i686-pc-linux-gnu-nm... no
checking for nm... (cached) nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... (cached) ranlib
checking for i686-pc-linux-gnu-windres... no
checking for windres... (cached) windres
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... (cached) yes
creating ./config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
creating Makefile
make: Warning: File `../binutils-2.16.1/Makefile.in' has modification time 1.4e+08 s in the future
CONFIG_SHELL="/bin/sh" /bin/sh ./config.status --recheck
一直在这样的死循环????
求救阿!

作者: daist   发布时间: 2007-12-14

我的宿主系统:
bash, version 3.1.17(1)-release
Binutils: version 2.16.1
bzip2, Version 1.0.3, 15-Feb-2005.
Coreutils: 5.96
diff (GNU diffutils) 2.8.1
GNU find version 4.2.27
GNU Awk 3.1.5
gcc (GCC) 4.0.3
GNU C Library stable release version 2.3.6,
grep (GNU grep) 2.5.1
gzip 1.3.5
Linux version 2.6.16.38 (gcc version 4.0.3)
GNU Make 3.80
patch 2.5.4
GNU sed version 4.1.5
tar (GNU tar) 1.15.1

作者: daist   发布时间: 2007-12-14

看起来好像是系统时间没有设置好,用date命令查看一下

作者: wybmk   发布时间: 2007-12-14

我也这样,郁闷,第一次过去了,好象没多长时间,但第二次,第三次。。。都过不去了,怎么回事呢?

作者: shengfanly   发布时间: 2007-12-15

手册不是建议你们另建工作目录才进行的吗?

作者: d00m3d   发布时间: 2007-12-15

我有cd ../binutils-build这句啊

作者: shengfanly   发布时间: 2007-12-15

似乎三楼说得对,时间设置好像有点问题

作者: d00m3d   发布时间: 2007-12-15

date之后
bash : /bin/date:cannot execute binary file

作者: shengfanly   发布时间: 2007-12-15

date 我改成现在的时间吗?为什么别人用同一张LIVECD\做的可以,我却不可以呢?

作者: daist   发布时间: 2007-12-15

我好奇怪,就是用wybmk的方法 ,成功了?
但是有个问题:为什么别人同样的cd做却不用修改DATE啊,而且他两次都对!

作者: daist   发布时间: 2007-12-15

楼主成功了吗?

作者: shengfanly   发布时间: 2007-12-15

成功了,哈哈

作者: daist   发布时间: 2007-12-15

怎么过去的呀,我现在还不行

作者: shengfanly   发布时间: 2007-12-15

make[1]:***[floatformat.0] error 1
make[1]:Leaving directory '/mnt/fls/sources/binutils-build/libiberty'
make: *** [all-libierty] error2

作者: shengfanly   发布时间: 2007-12-15

就修改了DATE

作者: daist   发布时间: 2007-12-16

引用:
作者: daist
date 我改成现在的时间吗?为什么别人用同一张LIVECD\做的可以,我却不可以呢?
也许是你跟你的同学在启动时所选的时区不同?

作者: d00m3d   发布时间: 2007-12-16

详细些,我的也遇到了这个问题,启动时怎么选时区啊,我选的是"asia shanghai "不对吗?应该怎么选啊,跳过行吗?

作者: betty_qi   发布时间: 2007-12-17

应该不是时区问题.好象是你的电脑硬件比较特殊,LINUX启动时无法获取系统时间,只好把时间设为1970年1月1日(或1969年12月31日),看一下修改日期前的时间就可知道,还有就是仔细查看系统启动时的信息,如果没看清楚,用命令dmesg|more

作者: ghenglin   发布时间: 2007-12-17

我用的命令是date -s "20071217"
date -s "12:37:00"

作者: daist   发布时间: 2007-12-17

引用:
作者: ghenglin
应该不是时区问题.好象是你的电脑硬件比较特殊,LINUX启动时无法获取系统时间,只好把时间设为1970年1月1日(或1969年12月31日),看一下修改日期前的时间就可知道,还有就是仔细查看系统启动时的信息,如果没看清楚,用命令dmesg|more
我显示的是2000年的时间

作者: daist   发布时间: 2007-12-17

d00m3d,启动时间可以在BIOS里改 ,还是哪里改啊?
我该怎么操作的,我不是很清楚 !

作者: daist   发布时间: 2007-12-17

指完成後的系统?

作者: d00m3d   发布时间: 2007-12-18

没完成之前 !

作者: daist   发布时间: 2007-12-18