- 论坛徽章:
- 0
|
最近使用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.
好像没有好的解决方法,我现在想请教大家,有没有解决的方法。
谢谢 |
|