免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7239 | 回复: 2
打印 上一主题 下一主题

关于linux下Glibc and the undefined reference to __ctype_b error的问题求教 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-12 09:40 |只看该作者 |倒序浏览
最近使用rrdtool这个工具,我借用它的源代码,里面有个rrd_diff.c编译得到的rrd_diff.o,在我的源代码编译时出现错误如下:
[root@networkmonitor rrdcode]# make
g++ -I/usr/local/src/snmp++/include -I/usr/local/src/libdes  -I/usr/include/mysql -I/usr/local/src/rrdtool/src -I/usr/local/rrdtool-1.0.48/lib -o 45Rrd 45Rrd.o -lsnmp++ -ldes -lrrd -lmysqlclient
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../librrd.a(rrd_diff.o)(.text+0x14): In function `rrd_diff':
/usr/local/src/rrdtool/src/rrd_diff.c:36: undefined reference to `__ctype_b'
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../librrd.a(rrd_diff.o)(.text+0x67):/usr/local/src/rrdtool/src/rrd_diff.c:45: undefined reference to `__ctype_b'
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../librrd.a(rrd_diff.o)(.text+0xa3):/usr/local/src/rrdtool/src/rrd_diff.c:51: undefined reference to `__ctype_b'
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../librrd.a(rrd_diff.o)(.text+0xc3):/usr/local/src/rrdtool/src/rrd_diff.c:54: undefined reference to `__ctype_b'
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../librrd.a(rrd_diff.o)(.text+0x340):/usr/local/src/rrdtool/src/rrd_diff.c:87: undefined reference to `__ctype_b'
/usr/lib/gcc/i386-redhat-linux/3.4.3/../../../librrd.a(rrd_diff.o)(.text+0x379):/usr/local/src/rrdtool/src/rrd_diff.c:87: more undefined references to `__ctype_b' follow
/usr/local/lib/libsnmp++.so: undefined reference to `pthread_create'
/usr/local/lib/libsnmp++.so: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make: *** [45Rrd] Error 1

我的系统是redhat as4.
编译器是 [root@networkmonitor rrdcode]# g++ -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.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 --disable-libunwind-exceptions --enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.3 20050227 (Red Hat 3.4.3-22.1)

我找了网上的资料,比较详细的如下:
Question: After installing Redhat 9.0 some older libraries (part of Talarian Smartsockets if you are interested) are no longer working for us.
While linking, the error message "undefined reference to __ctype_b" appears - this is a feature of glibc no longer avaiable in glibc-2.3.2-11.9, but avaiable in glibc-2.2.

To gain a better understanding of the problem you can also read
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=91290

I will give points for a detailed description of a solution, those come to mind:

1. Install older version of glibc, i.e. 2.3.2-5, the last version that seems to work. Questions: Will Redhat still work, how to downgrade an installation of glibc
   (parameters to force rpm to install older version?)

2. Parallel install of two glibc versions? Is this even possible?

3. A patch/compatibility addon for the newer version of glibc, I haven't found one but perhaps I have not looked hard enough?

Please try to give a detailed description of the solution, I'm still a bit shaky when it comes to managing libraries and dependencies in Linux.

好像没有好的解决方法,我现在想请教大家,有没有解决的方法。
谢谢

论坛徽章:
0
2 [报告]
发表于 2007-11-12 11:46 |只看该作者
需要换glibc得版本。

看看这个,可以解决得。

http://www.puschitz.com/Installi ... ngOracle9iR2OnRHAS4

问题类似。

论坛徽章:
0
3 [报告]
发表于 2007-11-12 14:41 |只看该作者
谢谢ChinaOK兄。我研读之后如有问题,再请大家赐教。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP