Problem with glibc test

Bill Mason billmason_sp2 at
Wed Oct 8 13:36:45 PDT 2008

Hi there,
I'm working through LFS right now.  It's really well written, it's a lot of fun, and everything worked really well up till now.  I am having a problem with the glibc test.  Here's the details:

Version of the book: LFS 6.3
Host system: Debian 4.0 (etch) with kernel 2.6.24
Package: Glibc-2.5.1, section 6.9 of the book
I have not deviated from the book

This error happens when I run make -k check:

GCONV_PATH=/sources/glibc-build/iconvdata LC_ALL=C LOCPATH=/sources/glibc-build/localedata  /sources/glibc-build/elf/ --library-path /sources/glibc-build:/sources/glibc-build/math:/sources/glibc-build/elf:/sources/glibc-build/dlfcn:/sources/glibc-build/nss:/sources/glibc-build/nis:/sources/glibc-build/rt:/sources/glibc-build/resolv:/sources/glibc-build/crypt:/sources/glibc-build/nptl /sources/glibc-build/stdio-common/test-vfprintf  > /sources/glibc-build/stdio-common/test-vfprintf.out
make[2]: *** [/sources/glibc-build/stdio-common/test-vfprintf.out] Error 1

Here is the contents of test-vfprintf.out:

file size incorrect for locale C: 99999 instead of 100004
file size incorrect for locale de_DE.ISO-8859-1: 99999 instead of 100004
file size incorrect for locale de_DE.UTF-8: 99999 instead of 100004
file size incorrect for locale ja_JP.EUC-JP: 99999 instead of 100004

After looking at test-vfprintf.c, I see that it prints a few different things using fprintf, and then validates that the output matches what it printed.  The last line is simply "hello" but with a precision format string, -1.300000000.  This doesn't print, although ferror still returns 0.

I validated this by making a little program that does nothing but prints this using printf:

#include <stdio.h>

int main() {
    printf ("%-1.300000000s", "hello");

Same thing, no output.  But if I decrease the number of zeros in the precision string by one (7 zeros rather than 8), it works fine.  Any number of zeros greater than 7 causes the problem.  I tried the same experiments on my host system, and the same is true there as well.

So, I suspect that I'm not doing anything wrong, and that this is a bug in glibc.  I can report it if this it's not already reported.  Before I do, is there anything I'm missing, or does anyone have any tips about what is going on here, other than an as-yet-undiscovered bug in glibc?




More information about the lfs-support mailing list