LinuxSir.cn,穿越时空的Linuxsir!

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

请高手一定帮我:如何让glibc-2.3.3支持NPTL

[复制链接]
发表于 2004-12-16 20:51:21 | 显示全部楼层 |阅读模式
root@elssann:~# /lib/libc.so.6
GNU C Library stable release version 2.3.3, by Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 3.3.4.
Compiled on a Linux 2.4.27 system on 2004-10-11.
Available extensions:
GNU libio by Per Bothner
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
linuxthreads-0.10 by Xavier Leroy
BIND-8.2.3-T5B
libthread_db work sponsored by Alpha Processor Inc
NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
root@elssann:~#



我开始装的是slackware 10,内核是2.42,把内核升级到2.6.9,然后又下了Slackware站点上编译过的的glibc-2.3.3包,安装后,发现glibc-2.3.3已经成功被安装上,但是Slackware的维护者没有把NPTL编译进他发布的glibc-2.3.3包中,现在我的一个程序急需要在NPTL下测试,请各位高手帮忙告诉我我现在该怎么办才能让我的gligc-2.3.3支持NPTL?万分感谢!!!

我个人看法是:这个glibc-2.3.3是在 2.4.27上编译的。如果要让glibc-2.3.3支持NPTL,只有自己编译安装glibc了,如果要这样,怎么卸载我目前已经安装的glibc-2.3.3?
 楼主| 发表于 2004-12-16 21:25:10 | 显示全部楼层
我编译glibc-2.3.3
root@elssann:/usr/src/glibc-2.3.3/glibc-2.3.3# ./configure
configure: error: you must configure in a separate build directory
root@elssann:/usr/src/glibc-2.3.3/glibc-2.3.3#

为什么说我必须要在一个分离的build目录啊
发表于 2004-12-16 23:17:00 | 显示全部楼层
你可以看看/usr/share/doc/glibc-2.3.3/下的说明呀。

  1. Configuring and compiling GNU Libc
  2. ==================================
  3.                                                                                                                               
  4.    GNU libc can be compiled in the source directory, but we strongly
  5. advise building it in a separate build directory.  For example, if you
  6. have  unpacked the glibc sources in `/src/gnu/glibc-2.3', create a
  7. directory `/src/gnu/glibc-build' to put the object files in.  This
  8. allows removing the whole build directory in case an error occurs,
  9. which is the safest way to get a fresh start and should always be done.
  10.                                                                                                                               
  11.    From your object directory, run the shell script `configure' located
  12. at the top level of the source tree.  In the scenario above, you'd type
  13.                                                                                                                               
  14.      $ ../glibc-2.3/configure ARGS...
  15.                                                                                                                               
  16.    Please note that even if you're building in a separate build
  17. directory, the compilation needs to modify a few files in the source
  18. directory, especially some files in the manual subdirectory.
  19.                                                                                                                               
  20. `configure' takes many options, but you can get away with knowing only
  21. two: `--prefix' and `--enable-add-ons'.  The `--prefix' option tells
  22. `configure' where you want glibc installed. This defaults to
  23. `/usr/local'.  The `--enable-add-ons' option tells `configure' to use
  24. all the add-on bundles it finds in the source directory.  Since
  25. important functionality is provided in add-ons, you should always
  26. specify this option.
  27.                                                                                                                               
  28.    It may also be useful to set the CC and CFLAGS variables in the
  29. environment when running `configure'.  CC selects the C compiler that
  30. will be used, and CFLAGS sets optimization options for the compiler.
复制代码
发表于 2004-12-16 23:19:42 | 显示全部楼层
glibc要在一个单独的bulid目录来configure,make。
你可以建立一个build目录,在里面执行../glibc目录/configure ....相应参数--enable-add-ons=nptl --with-tls --with-__thread :开启nptl用的;make也在这个目录里面进行。
 楼主| 发表于 2004-12-17 09:34:25 | 显示全部楼层
谢谢大家,昨天我看了INSTALL后编译是会了,但是make到最后还是出现了2个error,郁闷
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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