使用Linux也有很长的一段时间了,一直用的是RedHat的发行版(RedHat9/FC4/FC5/FC6),看到LFS之后计划着为何不自己尝试着一步一步搞一个?^_^ 第一遍binutils的ld部分 make -C ld LIB_PATH=/tools/lib 后提示: 估计是宿主系统(FC6)编译环境的问题,不想用VM(太慢了),又不想换系统,于是参考lfs Book后面的章节,所以利用现成的资源:(之前下载了LFS LiveCD) su
-_-||没想到一开始就遇到了问题。。。。
..............
/tools/bin/ld: unrecognized option '--hash-style=gnu'
/tools/bin/ld: use the --help option for usage information
collect2: ld returned 1 exit status
make[2]: *** [ld-new] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/binutils-build/ld'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build/ld'
make: *** [all-recursive-am] Error 2
make: Leaving directory `/mnt/lfs/sources/binutils-build/ld'
mount /file/to/lfslivecd-x86-6.2-3.iso /mnt/iso -o loop
mount /mnt/iso/root.ext2 /mnt/tmp -o loop
LFSISO=/mnt/tmp
mkdir $LFS/{dev,proc,sys}
mknod -m 600 $LFS/dev/console c 5 1
mknod -m 666 $LFS/dev/null c 1 3
mount --bind /dev $LFS/dev
mount -vt devpts devpts $LFS/dev/pts
mount -vt tmpfs shm $LFS/dev/shm
mount -vt proc proc $LFS/proc
mount -vt sysfs sysfs $LFS/sys
mkdir $LFS/{bin,sbin,lib,usr}
mount --bind $LFSISO/bin $LFS/bin
mount --bind $LFSISO/sbin $LFS/sbin
mount --bind $LFSISO/lib $LFS/lib
mount --bind $LFSISO/usr $LFS/usr
mkdir $LFS/root
/usr/sbin/chroot "$LFS" /usr/bin/env -i HOME=/root
TERM="$TERM" PS1='u:w $ '
PATH=/tools/bin:/bin:/sbin:/usr/bin:/usr/sbin
/bin/bash --login +h
如此,第一次binutils可以成功完成,之后这样继续下去我想应该也没问题(至少到现在也还没出什么问题),要不返回lfs帐号也可 :-)
//EOF
2006-11-20
我的LFS之旅[01]
lfs:/mnt/lfs/sources/binutils-build $ make -C ld LIB_PATH=/tools/lib
Posted by Davy Hawk at 11/20/2006 08:44:00 AM
Labels: LFS
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment