Re: printf failure on darwin with coreutils-6.9.91
Peter Fales [EMAIL PROTECTED] wrote: I'm trying to build coreutils-6.9.91 for Mac OS/X (Darwin 10.3) and getting test failures from misc/printf. The output of make check is attached below. I believe the problem occurs around line 345 of src/printf.c which has: 342 switch (conversion) 343{ 344case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': 345 length_modifier = PRIdMAX; 346 length_modifier_len = sizeof PRIdMAX - 2; 347 break; On linux PRIdMAX is defined as lld but on darwin it is defined as qd. Later on in the block of code around line 331 in lib/parse-printf.c, the 'q' case is not handled. Here's the test log: make check-TESTS make[1]: Entering directory `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' make[2]: Entering directory `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' FAIL: printf.log Based on your diagnosis, maybe this patch solves the problem? [beware: I haven't investigated enough to know if 'qd' goes where this patch puts it, or if it goes with the 'l' a few lines above] diff --git a/lib/printf-parse.c b/lib/printf-parse.c index e3aa95a..4b95cb9 100644 --- a/lib/printf-parse.c +++ b/lib/printf-parse.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 1999-2000, 2002-2003, 2006-2008 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -347,7 +347,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) flags += 8; cp++; } - else if (*cp == 'j') + else if (*cp == 'j' || *cp == 'q') { if (sizeof (intmax_t) sizeof (long)) { ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
printf failure on darwin with coreutils-6.9.91
I'm trying to build coreutils-6.9.91 for Mac OS/X (Darwin 10.3) and getting test failures from misc/printf. The output of make check is attached below. I believe the problem occurs around line 345 of src/printf.c which has: 342 switch (conversion) 343{ 344case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': 345 length_modifier = PRIdMAX; 346 length_modifier_len = sizeof PRIdMAX - 2; 347 break; On linux PRIdMAX is defined as lld but on darwin it is defined as qd. Later on in the block of code around line 331 in lib/parse-printf.c, the 'q' case is not handled. Here's the test log: make check-TESTS make[1]: Entering directory `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' make[2]: Entering directory `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' FAIL: printf.log === 1 of 1 tests failed See tests/misc/test-suite.log Please report it to bug-coreutils@gnu.org === = GNU coreutils 6.9.91: tests/misc/test-suite.log = 1 of 1 tests failed. .. contents:: :depth: 2 FAIL: printf.log (exit: 1) == + /Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/src/printf --version printf (GNU coreutils) 6.9.91 Copyright (C) 2007 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by David MacKenzie. + . ./../test-lib.sh ++ unset function_test ++ eval 'function_test() { return 11; }; function_test' +++ function_test +++ return 11 ++ test 11 '!=' 11 +++ pwd ++ test_dir_=/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc +++ this_test_ +++ echo ././printf +++ sed 's,.*/,,' ++ this_test=printf ++ . ./../envvar-check +++ as_unset=unset +++ envvar_check_failed=0 +++ vars= _POSIX2_VERSION BLOCKSIZE BLOCK_SIZE CDPATH COLUMNS DF_BLOCK_SIZE DU_BLOCK_SIZE LS_BLOCK_SIZE LS_COLORS POSIXLY_CORRECT QUOTING_STYLE SIMPLE_BACKUP_SUFFIX TABSIZE TERM TIME_STYLE TMPDIR VERSION_CONTROL +++ unset _POSIX2_VERSION +++ eval test '${_POSIX2_VERSION+set}' = set test '' = set +++ unset BLOCKSIZE +++ eval test '${BLOCKSIZE+set}' = set test '' = set +++ unset BLOCK_SIZE +++ eval test '${BLOCK_SIZE+set}' = set test '' = set +++ unset CDPATH +++ eval test '${CDPATH+set}' = set test '' = set +++ unset COLUMNS +++ eval test '${COLUMNS+set}' = set test '' = set +++ unset DF_BLOCK_SIZE +++ eval test '${DF_BLOCK_SIZE+set}' = set test '' = set +++ unset DU_BLOCK_SIZE +++ eval test '${DU_BLOCK_SIZE+set}' = set test '' = set +++ unset LS_BLOCK_SIZE +++ eval test '${LS_BLOCK_SIZE+set}' = set test '' = set +++ unset LS_COLORS +++ eval test '${LS_COLORS+set}' = set test '' = set +++ unset POSIXLY_CORRECT +++ eval test '${POSIXLY_CORRECT+set}' = set test '' = set +++ unset QUOTING_STYLE +++ eval test '${QUOTING_STYLE+set}' = set test '' = set +++ unset SIMPLE_BACKUP_SUFFIX +++ eval test '${SIMPLE_BACKUP_SUFFIX+set}' = set test '' = set +++ unset TABSIZE +++ eval test '${TABSIZE+set}' = set test '' = set +++ unset TERM +++ eval test '${TERM+set}' = set test '' = set +++ unset TIME_STYLE +++ eval test '${TIME_STYLE+set}' = set test '' = set +++ unset TMPDIR +++ eval test '${TMPDIR+set}' = set test '' = set +++ unset VERSION_CONTROL +++ eval test '${VERSION_CONTROL+set}' = set test '' = set +++ test '' = 1 +++ /Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/src/mktemp -d --tmp=/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc cu-printf.XX ++ t_=/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc/cu-printf.BxLOnoeLaT ++ trap 'st=$?; cleanup_; d=/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc/cu-printf.BxLOnoeLaT; cd /Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc chmod -R u+rwx $d rm -rf $d exit $st' 0 ++ trap '(exit $?); exit $?' 1 2 13 15 ++ cd /Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc/cu-printf.BxLOnoeLaT ++ diff --version ++ grep GNU + fail=0 + /Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/src/printf -- 'foo\n' + cat + compare out exp + diff -u out exp + rm -f out exp + /Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/src/printf '1 %*sy\n' -3 x + POSIXLY_CORRECT=1 + /Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/src/printf '2 \x' + echo '2 failed, as expected' +
Re: printf failure on darwin with coreutils-6.9.91
Peter Fales [EMAIL PROTECTED] wrote: I'm trying to build coreutils-6.9.91 for Mac OS/X (Darwin 10.3) and getting test failures from misc/printf. The output of make check is attached below. I believe the problem occurs around line 345 of src/printf.c which has: 342 switch (conversion) 343{ 344case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': 345 length_modifier = PRIdMAX; 346 length_modifier_len = sizeof PRIdMAX - 2; 347 break; On linux PRIdMAX is defined as lld but on darwin it is defined as qd. Later on in the block of code around line 331 in lib/parse-printf.c, the 'q' case is not handled. Here's the test log: make check-TESTS make[1]: Entering directory `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' make[2]: Entering directory `/Volumes/UFS_exp2/exptools/expmake/build/gnucoresrc/build/coreutils/tests/misc' FAIL: printf.log Hi Peter, Thanks for the report! Would you please post the lib/config.h file that was generated for that system? ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: printf failure on darwin with coreutils-6.9.91
Peter Fales [EMAIL PROTECTED] wrote: On Fri, Dec 21, 2007 at 05:06:11PM +0100, Jim Meyering wrote: Peter Fales [EMAIL PROTECTED] wrote: I'm trying to build coreutils-6.9.91 for Mac OS/X (Darwin 10.3) and getting test failures from misc/printf. The output of make check is attached below. I believe the problem occurs around line 345 of src/printf.c which has: 342 switch (conversion) 343{ 344case 'd': case 'i': case 'o': case 'u': case 'x': case 'X': 345 length_modifier = PRIdMAX; 346 length_modifier_len = sizeof PRIdMAX - 2; 347 break; On linux PRIdMAX is defined as lld but on darwin it is defined as qd. Later on in the block of code around line 331 in lib/parse-printf.c, the 'q' case is not handled. I've attached lib/config.h as requested. Hi Peter, This line in config.h, /* #undef HAVE_LONG_DOUBLE */ shows that the configure-time test for long double support failed. Can you look in config.log (or send it) to see why? ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils