+ -
当前位置:首页 → 问答吧 → 在LFS6.4下第一次编译glibc-2.8是出错

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

时间:2009-01-23

来源:互联网

在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

作者: wellxlx   发布时间: 2009-01-23

能提供更多信息吗?

作者: newper   发布时间: 2009-01-23

我也在进行,一个小时前刚过GLIBC第一次
以下是我的记录( LFS 6.4 Fedora 10)希望对你有用
其实就是完全照抄手册来的,不过你得检查下有没有输入错误
代码:
5.7. Glibc-2.8-20080929
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
time (make)
mkdir -v /tools/etc
make install
rm -vrf glibc-2.8-20080929
rm -vrf glibc-build

作者: 残剑饮血   发布时间: 2009-01-23

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的时候出现的错误!

作者: wellxlx   发布时间: 2009-01-23

还需要提供什么样的信息 马上去弄!

作者: wellxlx   发布时间: 2009-01-23

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

作者: 残剑饮血   发布时间: 2009-01-23

按照LFS手册,glibc-build应该在/mnt/lfs/sources下,而不在/mnt/lfs/tools下

作者: newper   发布时间: 2009-01-23

把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中也要这样做吗?删与不删,以什么为标准?

作者: wellxlx   发布时间: 2009-01-23

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

作者: 残剑饮血   发布时间: 2009-01-24

引用:
作者: 残剑饮血
回楼上:
我都是把全部源代码COPY到
$LFS/sources目录下面的
这样子是为了和手册中的路径兼容
我也不知道以什么标准,反正我全部删除了,到时候再解压
我是中午开始的,我现在已经进入CHROOT环境了
我编译GLIBC就是我上面给出的命令,和手册一样,完全没改
不是必需的.. 源码可以放在别的地方

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

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


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

换成glibc-2.9 就没有问题

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

作者: kimux   发布时间: 2009-01-24

链接过来和COPY过来对于解压来说是一样的效果吧?
只要名称和手册一样就行了.....
GLIBC有2.9了?
不过在跑之前我还是先慢慢走....

作者: 残剑饮血   发布时间: 2009-01-24

请问楼主用的是什么host?

作者: newper   发布时间: 2009-01-24

引用:
作者: newper
请问楼主用的是什么host?

引用:
作者: wellxlx
在LFS6.4下第一次编译glibc-2.8是出错,configure可以得到正确的结果,按我水平检验的,在make时 出现了下面的错误。很不理解,请大家帮帮忙,谢谢
用的是LFS6.3 LiveCD
CPU 赛扬D 内存 521M
**************************
make: *** [all] Error 2
宿主系统吗?
楼主不是已经说了吗?

作者: 残剑饮血   发布时间: 2009-01-24

引用:
作者: 残剑饮血
链接过来和COPY过来对于解压来说是一样的效果吧?
只要名称和手册一样就行了.....
GLIBC有2.9了?
不过在跑之前我还是先慢慢走....
...当然有区别,COPY过来也要占空间的..

作者: kimux   发布时间: 2009-01-24

谢谢大家的支持和帮助,昨天晚上和今天一整天都在弄LFS,上面说的GLIBC的错误解决了,把源代码从/tools目录下拷出来就好了,一路编译到现在,都没有什么问题。

谢谢大家!

作者: wellxlx   发布时间: 2009-01-25

我刚也遇到这个问题,搜了半天,和楼主的解决办法一样,说白了就是glibc-build目录不能出现在$LFS/tools这个目录下面,否则就有各种稀奇古怪问题。

作者: intricate   发布时间: 2009-01-30