免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: Jass
打印 上一主题 下一主题

紧急求救 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2007-12-26 13:29 |只看该作者
原帖由 熏红猴 于 2007-12-26 13:16 发表
我也不懂,也是才碰到,可能跟编译器的编译选项有关吧,gcc -v输出什么?
还有,用的什么c库?

[root@as4-oracle ~]# gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --disable-libgcj --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47.3)





[root@as4-oracle ~]# g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --disable-libgcj --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-47.3)
g++32: no input files



实际编译用的是g++

[ 本帖最后由 Jass 于 2007-12-26 13:31 编辑 ]

论坛徽章:
0
12 [报告]
发表于 2007-12-26 13:37 |只看该作者
什么环境下运行的?
用的什么C库?

论坛徽章:
0
13 [报告]
发表于 2007-12-26 13:41 |只看该作者
原帖由 熏红猴 于 2007-12-26 13:37 发表
什么环境下运行的?
用的什么C库?


怎样能查看C库?

论坛徽章:
0
14 [报告]
发表于 2007-12-26 13:51 |只看该作者
是glibc吗?

运行/lib/libc.so.6

论坛徽章:
0
15 [报告]
发表于 2007-12-26 13:53 |只看该作者
原帖由 熏红猴 于 2007-12-26 13:51 发表
是glibc吗?

运行/lib/libc.so.6

[root@as4-oracle ~]# /lib/libc.so.6
GNU C Library stable release version 2.3.4, by Roland McGrath et al.
Copyright (C) 2005 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.4.4 20050721 (Red Hat 3.4.4-2).
Compiled on a Linux 2.4.20 system on 2005-08-19.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        linuxthreads-0.10 by Xavier Leroy
        The C stubs add-on version 2.1.2.
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        Glibc-2.0 compatibility add-on by Cristian Gafton
        GNU Libidn by Simon Josefsson
        libthread_db work sponsored by Alpha Processor Inc
Thread-local storage support included.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.


请指教,说明什么?

论坛徽章:
0
16 [报告]
发表于 2007-12-26 13:58 |只看该作者
那应该是的,linuxthreads是把线程当进程的。
不过,redhat9已经支持nptl了。

  1. /lib/libc.so.6
  2. GNU C Library stable release version 2.5, by Roland McGrath et al.
  3. Copyright (C) 2006 Free Software Foundation, Inc.
  4. This is free software; see the source for copying conditions.
  5. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
  6. PARTICULAR PURPOSE.
  7. Compiled by GNU CC version 4.1.1 20060928 (Red Hat 4.1.1-28).
  8. Compiled on a Linux 2.6.9 system on 2006-10-08.
  9. Available extensions:
  10.         The C stubs add-on version 2.1.2.
  11.         crypt add-on version 2.1 by Michael Glad and others
  12.         GNU Libidn by Simon Josefsson
  13.         GNU libio by Per Bothner
  14.         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk

  15.         Native POSIX Threads Library by Ulrich Drepper et al  //这里表示用的nptl线程库

  16.         BIND-8.2.3-T5B
  17.         RT using linux kernel aio
  18. Thread-local storage support included.
  19. For bug reporting instructions, please see:
复制代码

[ 本帖最后由 熏红猴 于 2007-12-26 14:00 编辑 ]

论坛徽章:
0
17 [报告]
发表于 2007-12-26 14:11 |只看该作者
原帖由 熏红猴 于 2007-12-26 13:58 发表
那应该是的,linuxthreads是把线程当进程的。
不过,redhat9已经支持nptl了。

/lib/libc.so.6
GNU C Library stable release version 2.5, by Roland McGrath et al.
Copyright (C) 2006 Free Software F ...


你是说这句?:
linuxthreads-0.10 by Xavier Leroy

但是运行正常的机器的/lib/libc.so.6也是这一句呀。要怎样才能不把线程当进程呢?

[ 本帖最后由 Jass 于 2007-12-26 14:13 编辑 ]

论坛徽章:
0
18 [报告]
发表于 2007-12-26 14:15 |只看该作者
嗯,这个我就不知道了,pc机上还用linuxthreads应该已经很少了。

论坛徽章:
0
19 [报告]
发表于 2007-12-26 14:18 |只看该作者
原帖由 熏红猴 于 2007-12-26 14:15 发表
嗯,这个我就不知道了,pc机上还用linuxthreads应该已经很少了。


好,那借问一下,能不能把没有问题的/lib/libc.so.6的结果贴出来看一下呢?
还有一个问题不明白:libc.so.6的6代表版本了,为什么版本都是6,结果会不一样呢?

论坛徽章:
0
20 [报告]
发表于 2007-12-26 14:23 |只看该作者
原帖由 熏红猴 于 2007-12-26 14:21 发表
好像以前的c lib是叫做libc4,libc5的
那个我贴的就是没有问题的


哦,我没细看。多谢了。送分了。多谢指点!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP