Bug#197668: Bug#197673: Acknowledgement (libc6: __ctype_b_loc is not properly exported)
My apologies for the duped entry this is the first debian bug I have
run into so I am clumsy at using the tools. The bug script picked up the wrong
email address by default and I did not realize it...
Hmm. I have manually reinstalled binutils-2.14.90.0.4-0.1 and multiarch-binutils-2.14.90.0.4-0.1
and the problem went away...
So I guess this looks like a linker bug. But why uninstalling and reinstalling
the same package fixed the problem I don't know.
A minimal test program is:
#include <stdio.h>
#include <ctype.h>
int main(int argc, char **argv)
{
const char str[] = "hello world";
if (!isspace(str[0])) {
printf("not a space\n");
}
else {
printf("a space\n");
}
return 0;
}
The compile time error is:
$ gcc test5.c -o test5
/tmp/ccOu9wAx.o(.text+0x29): In function `main':
: undefined reference to `__ctype_b_loc'
collect2: ld returned 1 exit status
And it occurs with gcc 3.3 3.2 3.0 and 2.95
The relevant part of the preprocessed C program is:
int main(int argc, char **argv)
{
const char str[] = "hello world";
if (! ((*__ctype_b_loc ())[(int) ( ( str[0] ) )] & (unsigned short int) _ISspace ) ) {
printf("not a space\n");
}
else {
printf("a space\n");
}
return 0;
}
The only mention of __ctype_b_loc in glibc from readelf -a is:
1717: 000214c8 105 FUNC GLOBAL DEFAULT 11 __ctype_b_loc@@GLIBC_2.3
Reply to: