LinuxSir.cn,穿越时空的Linuxsir!

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

安装 Binutils-2.14 - 第二遍 出现问题?帮忙看看

[复制链接]
发表于 2004-2-4 21:12:00 | 显示全部楼层 |阅读模式
安装 Binutils-2.14 - 第二遍
下一章还要再次调整工具链,这里要做一些准备:   make -C ld clean make -C ld LIB_PATH=/usr/lib:/lib


当运行make -C ld LIB_PATH=/usr/lib:/lib时 出现下面提示:

make: Entering directory `/home/lfs/binutils-build/ld'
make  all-recursive
make[1]: Entering directory `/home/lfs/binutils-build/ld'
Making all in po
make[2]: Entering directory `/home/lfs/binutils-build/ld/po'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/lfs/binutils-build/ld/po'
make[2]: Entering directory `/home/lfs/binutils-build/ld'
gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.14/ld -I. -D_GNU_SOURCE -I. -I../../binutils-2.14/ld -I../bfd -I../../binutils-2.14/ld/../bfd -I../../binutils-2.14/ld/../include -I../../binutils-2.14/ld/../intl -I../intl  -g -O2 -DLOCALEDIR="\"/tools/share/locale\""   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -c ../../binutils-2.14/ld/ldgram.c
/tools/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/bin/as: relocation error: /tools/lib/libc.so.6: symbol __libc_stack_end, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference
make[2]: *** [ldgram.o] Error 1
make[2]: Leaving directory `/home/lfs/binutils-build/ld'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lfs/binutils-build/ld'
make: *** [all-recursive-am] Error 2
make: Leaving directory `/home/lfs/binutils-build/ld'

这是什么错误!

接下来我安装 Gawk-3.1.3

运行./configure --prefix=/tools 时提示:

checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for egrep... grep -E
checking for bison... bison -y
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output... configure: error: C compiler cannot create executables
See `config.log' for more details.

这是不是由前面的错误引起的! 如何解决!

请高手指点!
发表于 2004-2-4 21:33:42 | 显示全部楼层
估计这是因为你在安装第二次的gcc的时候no_fixinclude的patch没有打,引起gcc引用了主系统的库文件。
然后你在gawk进行编译的时候当然也会有问题了。
还有一种可能就是你看看你现在所用的用户是lfs的吗?还有就是你的lfs用户的配置文件有问题。
总之就是怀疑可能跟主系统交叉了。
 楼主| 发表于 2004-2-5 07:55:01 | 显示全部楼层
我现在编译任何东西都会出错:

gcc temp.c

/tools/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/bin/as: relocation error: /tools/lib/libc.so.6: symbol __libc_stack_end, version GLIBC_PRIVATE not defined in file ld-linux.so.2 with link time reference

请帮忙看看具体是哪里的原因,如何解决?
发表于 2004-2-5 09:48:50 | 显示全部楼层
估计是真的引用了主系统的东西了。估计你得重新来过了。
要不你用ldd /tools/bin/* 看看引用的都是些什么东东。是/tool/lib/ld.***
还是/lib/ld.****呢?
如果是后者,那么可以肯定的是你引用了主系统的库,如果是前者,那么你还得看看别的。
 楼主| 发表于 2004-2-5 10:10:34 | 显示全部楼层
........
bin/strings:
        libbfd-2.14.so => /tools/lib/libbfd-2.14.so (0x40017000)
        libc.so.6 => /tools/lib/libc.so.6 (0x4008a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
bin/strip:
        libbfd-2.14.so => /tools/lib/libbfd-2.14.so (0x40017000)
        libc.so.6 => /tools/lib/libc.so.6 (0x4008a000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
.........

我看跟你说的一样吧,我应该重新来!!!!

希望你再回个帖!
 楼主| 发表于 2004-2-5 10:11:59 | 显示全部楼层
顺便问一下:  ldd 是干什默的??
发表于 2004-2-5 17:20:13 | 显示全部楼层
最初由 lin_lin13 发表
顺便问一下:  ldd 是干什默的??
  1. ldd - print shared library dependencies
复制代码
发表于 2004-2-5 19:20:49 | 显示全部楼层
最初由 lin_lin13 发表
顺便问一下:  ldd 是干什默的??

hoho,ldd 就是查看某一个,或者某几可执行文件使用的库文件是什么,或者是否静态编译。就是这样。
是不是很简单呢?兄弟继续努力!加油!:p :p
 楼主| 发表于 2004-2-5 20:06:53 | 显示全部楼层
谢谢,有了你这样的好兄弟,以后遇到什么样的问题我也不怕了!

我要向你学习!!!
发表于 2004-2-5 20:08:26 | 显示全部楼层
呵呵,相互学习啦。
我刚刚来这里的时候比你还菜。这里的兄弟都是很热情的。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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