|
我用的是redhat8.0 安装时单独分了一个区为lfs ,/dev/hda3。
编译glibc时出现问题,我把所有的步骤写出,希望哪位能帮我看看。在此之前编译的软件都没有显示错误。
lfs软件为稳定版20021023-1707,使用的文档为20021030,文档中说按照文档说明可以安装20021023版。但其安装的软件的版本和文档中的不
一样,而且有的补丁不知该不该打。
#useradd lfs
#passwd lfs
密码lfs
#export LFS=/mnt/lfs
#mkdir -p $LFS
#mount /dev/hda3 $LFS
#mkdir $LFS/stage1 1(为数字)
#ln -s $LFS/stage1 /
#chown lfs.lfs $LFS/stage1
把lfs软件包解压缩,所属用户和组chown 为lfs。保存在/mnt/lfs/stage1目录中。
#su - lfs
$cat > ~/.bash_profile << "EOF"
>set +h
>umask 022
>LFS=/mnt/lfs
>LC_ALL=POSIX
> ATH=/stage1/bin PATH
>export LFS LC_ALL PATH
>EOF
$source ~/.bash_profile
$pwd
/mnt/lfs/stage1
$tar jxvf binutils-2.13.tar.bz2
$mv binutils-2.13 binutils-build
$cd binutils-build
$./configure --prefix=/stage1 --disable-nls
$make LDFLAGS="-all-static"
$make install
$make -C ld clean ld l(为字母)
$make -C ld LIB_PATH=/stage1/lib ld l(为字母)
$tar jxvf gcc-core-3.2.tar.bz2 软件的版本和文档中不一样
$cd gcc-3.2
$patch -Np1 -i ../gcc-3.2.patch
$patch -Np1 -i ../gcc-3.2-nofixincludes-2.patch
$mv gcc-3.2 gcc-build
$./configure --prefix=/stage1 --with-local-prefix=/stage1 --disable-nls --enable-shared --enable-languages=c
$make BOOT_LDFLAGS="-static" bootstrap
$make install
ln -sf gcc /stage1/bin/cc
$tar jxvf linux-2.4.19.tar.bz2
$cd linux-2.4.19
$make mrproper
$make include/linux/version.h
$make symlinks
$mkdir /stage1/include/asm
$cp include/asm/* /stage1/include/asm
$cp -R include/asm-generic /stage1/include
$cp -R include/linux /stage1/include
$touch /stage1/include/linux/autoconf.h
$tar jxvf glibc-2.2.5.tar.bz2 软件包中有一个补丁,文档中没写打补丁,所以没打。
$cp glibc-linuxthreads-2.2.5.tar.bz2 /mnt/lfs/stage1/glibc-2.2.5
$cd glibc-2.2.5
tar jxvf glibc-linuxthreads-2.2.5.tar.bz2
$mkdir /stage1/etc
$touch /stage1/etc/ld.so.conf ld.so.conf(中l为字母)
$mv glibc-2.2.5 glibc-build
$./configure --prefix=/stage1 --disable-profile --enable-add-ons --with-headers=/stage1/include --with-binutils=/stage1/bin
--without-gd
配置很快就结束了,用了不到一分钟。gcc编译时用了好几分钟。glibc也是一个大软件,不应该这么短吧。
$make make时出现错误。 |
|