LinuxSir.cn,穿越时空的Linuxsir!

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

glibc编译又出问题!大家来看看

[复制链接]
发表于 2005-8-11 13:11:29 | 显示全部楼层 |阅读模式
我使用rh9做LFS6.0,编译chapter 6的glibc时出现了问题,如下:
#../glibc-2.3.4-20040701/configure --prefix=/usr --disable-profile --enable-add-ons --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc

...
configure:error:working compiler support for visibility attribute is required


主系统:
RH9 ,在glibc第一次编译的时候,我出现了kernel too old的提示,于是我重新编译了2.6的内核,但是没有对内核进行配置(为了节省时间),全部按默认.顺利通过一直到chaptor 6 ,在chroot下编译glibc出现了上述错误.查了相关文章,说是gcc的问题,和nptl有关,
在RH9下:
$/lib/libc.so.6
....
linuxthreads-0.10...
..

在LFS 6.0 chroot下:
#/tools/lib/libc.so.6
....
Native Posix Thread Library..
...
#gcc -v
Reading specs from /tools/lib/gcc/i686-pc-linux-gnu/3.4.1/specs
Configured with: ../gcc-3.4.1/configure --prefix=/tools --libexecdir=/tools/lib --with-local-prefix=/tools --enable-clocale=gnu --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch
Thread model:posix
gcc version 3.4.1

按理说在chapter 5后调整工具链了应该是使用了最新的gcc-3.4.1,为什么仍然会出现这样一来的错误呢.
 楼主| 发表于 2005-8-11 13:16:13 | 显示全部楼层
在google上看到:
you get a broken gcc if you compile gcc on a system with a nptl glibc. Too broken to compile any glibc.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-12 12:29:34 | 显示全部楼层
为什么没有人给我点提示啊??????
回复 支持 反对

使用道具 举报

发表于 2005-8-12 19:17:25 | 显示全部楼层
没有遇到过,帮你顶一下。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-8-16 10:14:45 | 显示全部楼层
just try to compile glibc-2.3.4 pass1 with " linuxthreads" ,not "nptl", then when entering chroot env, recompile glibc with "nptl" ,ok done.
回复 支持 反对

使用道具 举报

发表于 2005-8-19 23:43:54 | 显示全部楼层
nice job. thanks for the solution.
回复 支持 反对

使用道具 举报

发表于 2006-3-1 23:45:00 | 显示全部楼层
呵呵--------
回复 支持 反对

使用道具 举报

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

本版积分规则

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