LinuxSir.cn,穿越时空的Linuxsir!

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

在LFS6.4下第一次编译glibc-2.8是出错

[复制链接]
发表于 2009-1-23 16:53:51 | 显示全部楼层 |阅读模式
在LFS6.4下第一次编译glibc-2.8是出错,configure可以得到正确的结果,按我水平检验的,在make时 出现了下面的错误。很不理解,请大家帮帮忙,谢谢
用的是LFS6.3 LiveCD
CPU 赛扬D 内存 521M


make -r PARALLELMFLAGS="" CVSOPTS="" -C ../glibc-2.8-20080929 objdir=`pwd` all
make[1]: Entering directory `/mnt/lfs/tools/glibc-2.8-20080929'
make  subdir=csu -C csu ..=../ subdir_lib
make[2]: Entering directory `/mnt/lfs/tools/glibc-2.8-20080929/csu'
make[2]: Leaving directory `/mnt/lfs/tools/glibc-2.8-20080929/csu'
make[2]: Entering directory `/mnt/lfs/tools/glibc-2.8-20080929/csu'
make[2]: Nothing to be done for `subdir_lib'.
make[2]: Leaving directory `/mnt/lfs/tools/glibc-2.8-20080929/csu'
make  subdir=iconv -C iconv ..=../ subdir_lib
make[2]: Entering directory `/mnt/lfs/tools/glibc-2.8-20080929/iconv'
/usr/bin/install -c -m 644 /mnt/lfs/tools/glibc-build/../include/linux/limits.h /tools/include/linux/limits.h
/usr/bin/install: `/mnt/lfs/tools/glibc-build/../include/linux/limits.h' and `/tools/include/linux/limits.h' are the same file
make[2]: Leaving directory `/mnt/lfs/tools/glibc-2.8-20080929/iconv'
make[1]: *** [iconv/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/tools/glibc-2.8-20080929'
make: *** [all] Error 2
发表于 2009-1-23 16:59:38 | 显示全部楼层
能提供更多信息吗?
回复 支持 反对

使用道具 举报

发表于 2009-1-23 17:02:53 | 显示全部楼层
我也在进行,一个小时前刚过GLIBC第一次
以下是我的记录( LFS 6.4 Fedora 10)希望对你有用
其实就是完全照抄手册来的,不过你得检查下有没有输入错误
  1. 5.7. Glibc-2.8-20080929
  2. tar -vxf glibc-2.8-20080929.tar.bz2
  3. cd glibc-2.8-20080929
  4. sed -i 's@/etc/ld.so.preload@/tools/etc/ld.so.preload@' elf/rtld.c
  5. mkdir -v ../glibc-build
  6. cd ../glibc-build
  7. echo "CFLAGS += -march=i486 -mtune=native" > configparms
  8. ../glibc-2.8-20080929/configure --prefix=/tools \
  9.     --disable-profile --enable-add-ons \
  10.     --enable-kernel=2.6.0 --with-binutils=/tools/bin \
  11.     --without-gd --with-headers=/tools/include \
  12.     --without-selinux
  13. time (make)
  14. mkdir -v /tools/etc
  15. make install
  16. rm -vrf glibc-2.8-20080929
  17. rm -vrf glibc-build
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-23 17:05:38 | 显示全部楼层
tar -vxf glibc-2.8-20080929.tar.bz2
cd glibc-2.8-20080929
sed -i 's@/etc/ld.so.preload@/tools/etc/ld.so.preload@' elf/rtld.c
mkdir -v ../glibc-build
cd ../glibc-build
echo "CFLAGS += -march=i486 -mtune=native" > configparms

../glibc-2.8-20080929/configure --prefix=/tools \
    --disable-profile --enable-add-ons \
    --enable-kernel=2.6.0 --with-binutils=/tools/bin \
    --without-gd --with-headers=/tools/include \
    --without-selinux

以上都是这样执行的 已经两边了 在make的时候出现的错误!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-23 17:07:50 | 显示全部楼层
还需要提供什么样的信息 马上去弄!
回复 支持 反对

使用道具 举报

发表于 2009-1-23 17:20:39 | 显示全部楼层
Post by wellxlx;1940964
还需要提供什么样的信息 马上去弄!

能不能把你楼主位的信息的再上面几行弄出来
错误应该在那显示的,你给出的都只是最后的结果
我是在Fedora 10下面
是GCC4.3.2
也许是你的LIVECD的GCC4.1.2太老了?
不清楚,你前面编译GCC是否正常?
你现在已经把/tools/bin设置在PAT最前面
那么你运行一下
gcc --version
看显示的是4.1.2还是4.3.2
说不定你刚编译的GCC没有起作用....
期待你的结果
回复 支持 反对

使用道具 举报

发表于 2009-1-23 17:24:40 | 显示全部楼层
按照LFS手册,glibc-build应该在/mnt/lfs/sources下,而不在/mnt/lfs/tools下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-23 18:45:40 | 显示全部楼层
把glibc-build删除后,重新编译 得到如下提示
gcc -B/tools/bin/ ../nptl/sysdeps/pthread/sigprocmask.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -g -march=i486 -mtune=native -Wstrict-prototypes -mpreferred-stack-boundary=2     -I../include -I/mnt/lfs/tools/glibc-build/signal -I/mnt/lfs/tools/glibc-build -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386/i686 -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include -isystem /mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/4.3.2/include-fixed -isystem /tools/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -o /mnt/lfs/tools/glibc-build/signal/sigprocmask.o -MD -MP -MF /mnt/lfs/tools/glibc-build/signal/sigprocmask.o.dt -MT /mnt/lfs/tools/glibc-build/signal/sigprocmask.o
make[2]: *** No rule to make target `/mnt/lfs/tools/glibc-build/s-proto.d', needed by `/mnt/lfs/tools/glibc-build/signal/kill.o'.  Stop.
make[2]: Leaving directory `/mnt/lfs/tools/glibc-2.8-20080929/signal'
make[1]: *** [signal/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/lfs/tools/glibc-2.8-20080929'
make: *** [all] Error 2

当再运行make时,出现了第一帖的结果。
按上面的提示,好象在说没有生成文件/mnt/lfs/tools/glibc-build/s-proto.d的方法。

newper兄说,按照LFS手册,glibc-build应该在/mnt/lfs/sources下,而不在/mnt/lfs/tools下。我看了下手册,它是建议用独立的sources目录,没有说必需。
使用了一个目录产生make检验时发现两个文件是相同的,导致编译失败,是不是这个问题。

看前面置顶的帖子中说,保留第一次编译时的binutils-build,删除第一次编译的gcc-build,在6.4中也要这样做吗?删与不删,以什么为标准?
回复 支持 反对

使用道具 举报

发表于 2009-1-23 19:03:28 | 显示全部楼层
回楼上:
我都是把全部源代码COPY到
$LFS/sources目录下面的
这样子是为了和手册中的路径兼容
我也不知道以什么标准,反正我全部删除了,到时候再解压
我是中午开始的,我现在已经进入CHROOT环境了
我编译GLIBC就是我上面给出的命令,和手册一样,完全没改
回复 支持 反对

使用道具 举报

发表于 2009-1-23 19:17:07 | 显示全部楼层
Post by 残剑饮血;1940994
回楼上:
我都是把全部源代码COPY到
$LFS/sources目录下面的
这样子是为了和手册中的路径兼容
我也不知道以什么标准,反正我全部删除了,到时候再解压
我是中午开始的,我现在已经进入CHROOT环境了
我编译GLIBC就是我上面给出的命令,和手册一样,完全没改


不是必需的.. 源码可以放在别的地方

比如我,根分区只有2G,我在根目录下做了个链接到源码目录

目录名当然最好和手册一样


回楼主,我正在做CLFS,glibc2.8也是编译不过去,错误和你的差不多

换成glibc-2.9 就没有问题

这是我在LFS的IRC里,一个老外给的地址... 终于让我找到了手册上说的那个版本的glibc-2.9...
http://www.cross-lfs.org/~jciccone/
回复 支持 反对

使用道具 举报

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

本版积分规则

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