LinuxSir.cn,穿越时空的Linuxsir!

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

求教:lfs 2.0 第六章:glibc-2.3.6 make install 出错!!

[复制链接]
发表于 2006-11-20 11:10:26 | 显示全部楼层 |阅读模式
宿主系统:redhat 9.0
kernel: 2.4.20-8 升级的 2.6.15

前面均已正常完成,
第六章编译glibc-2.3.6时,make 没问题
   make -k check 2>&1 | tee glibc-check-log
    grep Error glibc-check-log
只有一个posix/annexc 预料的错误(可以忽略)。

make install出现如下错误:
CC="gcc" /usr/bin/perl scripts/test-installation.pl /sources/glibc-build/
/tools/lib/gcc/i686-pc-linux-gnu/4.0.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lcidn

collect2: ld returned 1 exit status

Execution of gcc failed!

The script has found some problems with your installation!

Please read the FAQ and the README file and check the following:

- Did you change the gcc specs file (necessary after upgrading from
  Linux libc5)?

- Are there any symbolic links of the form libXXX.so to old libraries?

  Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,

  libm.so should point to the newly installed glibc file - and there should be

  only one such link (check e.g. /lib and /usr/lib)

You should restart this script from your build directory after you've
fixed all problems!
Btw. the script doesn't work if you're installing GNU libc not as your
primary library!

make[1]: *** [install] Error 1

make[1]: Leaving directory `/sources/glibc-2.3.6'

make: *** [install] Error 2
发表于 2006-11-20 19:33:40 | 显示全部楼层
别浪费时间了,请仔细阅读 LFS 手册关於主系统的最低要求再动手!
回复 支持 反对

使用道具 举报

发表于 2006-11-20 19:51:29 | 显示全部楼层
Post by d00m3d
别浪费时间了,请仔细阅读 LFS 手册关於主系统的最低要求再动手!


对的. 不符合要求.为什么不用livecd呢.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-23 09:58:04 | 显示全部楼层
Post by xtra2000
对的. 不符合要求.为什么不用livecd呢.


今天终于完工了,上面的错误可能是调整工具链时我用手工录入命令造成的,
重新做了一遍,这次采用了推荐的复制粘贴的方式,非常顺利.

不用livecd的原因:
没有刻录光驱
windows下的vmwave没用过,也不喜欢用
我理解的LFS应该是在宿主主机上做的,只要宿主主机的核心版本够高
感觉使用livecd 做,象是在练习键盘录入
回复 支持 反对

使用道具 举报

发表于 2006-11-23 20:50:06 | 显示全部楼层
晕~~复制粘贴的方式是不推荐的!另外也不是单单"宿主主机的核心版本够高"就足够的。。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-11-24 08:34:46 | 显示全部楼层
下面要做的是修正 GCC 的"specs"文件,使它指向新的动态连接器。一个简单的 sed 命令就能做到:

SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &&
gcc -dumpspecs > $SPECFILE &&
sed 's@^/lib/ld-linux.so.2@/tools&@g' $SPECFILE > tempspecfile &&
mv -vf tempspecfile $SPECFILE &&
unset SPECFILE
推荐你拷贝和粘贴上面的命令,而不是手动输入。当然你也可以手动编辑 specs 文件,只要把所有的"/lib/ld-linux.so.2"都替换成"/tools/lib/ld-linux.so.2"就行了。

请用你的眼睛亲自仔细检查一下 specs 文件,以确保上述修改的的确确生效了。




以上引自lfs6.2文档
呵呵,当然不止是核心版本,我升级到2.6.15后,核对了宿主系统软件包,符合以下要求:
Bash-2.05a

Binutils-2.12 (不推荐使用大于 2.16.1 的版本,因为尚未经过测试)

Bzip2-1.0.2

Coreutils-5.0 (或者 Sh-Utils-2.0, Textutils-2.0, 和 Fileutils-4.1)

Diffutils-2.8

Findutils-4.1.20

Gawk-3.0

Gcc-2.95.3 (不推荐使用大于 4.0.3 的版本,因为尚未经过测试)

Glibc-2.2.5 (不推荐使用大于 2.3.6 的版本,因为尚未经过测试)

Grep-2.5

Gzip-1.2.4

Linux Kernel-2.6.x (必须是 GCC-3.0 以上版本编译的)

所以没有理由做不过去,redhat 只是发行版本,不应该影响LFS软件的编译
回复 支持 反对

使用道具 举报

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

本版积分规则

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