-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to SciFi on 12/5/2009 11:18 AM: > gcc-4.2 -std=gnu99 -fast -mtune=core2 -march=core2 > -force_cpusubtype_ALL -arch i386 -fast -mtune=core2 -march=core2 > -force_cpusubtype_ALL -arch i386 -o test-xalloc-die test-xalloc-die.o > libtests.a ../lib/libcoreutils.a libtests.a > Undefined symbols: > "_libintl_gettext", referenced from: > _xalloc_die in libcoreutils.a(xalloc-die.o) > _error_tail in libcoreutils.a(error.o)
> I have not seen any patches in the gnulib maillist [thru gmane] dealing with > this particular problem, either. That was patched Nov 19, commit b5104eb4ff3. http://lists.gnu.org/archive/html/bug-gnulib/2009-11/msg00294.html > > For me, I “repaired” this by somehow forcing coureutils-8.1/gnulib-tests to > bring-in some different dependencies for @LIBINTL@ that were totally missing: > > --- ../../coreutils-8.1(prev)/gnulib-tests/gnulib.mk 2009-11-18 09:03:22 > -0600 > +++ ./gnulib.mk 2009-11-22 05:43:10 -0600 > @@ -1633,6 +1633,7 @@ > TESTS += test-xalloc-die.sh > TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' > check_PROGRAMS += test-xalloc-die > +test_xalloc_die_LDADD = $(LDADD) @LIBINTL@ That's the correct fix. But coreutils missed it by one day, since 8.1 came out on Nov 18. > Now finally I can run make-check completely, and we are still seeing the > same–old low–core crashes in some ‘conftest’s and the FAILs I had reported > here often in times past (during the 7.x series and with MacOSX-10.4 “Tiger” > even) which as I recall Jim Meyering does not want to spend time on, and I > wish I had the expertise to help. It is rather glaring that Apple certainly > has not changed anything to help despite my sending them some detailed > crashreports over all this time. Would you mind posting a bit more details, such as the actual crash reports, or a link to your prior postings? Meanwhile, I'm committing this today, to help test-xalloc-die on mingw (where it was still failing due to argv[0] including a trailing .exe); along with another mingw failure for fseeko. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksayxsACgkQ84KuGfSFAYDUtwCgxFPGzHnedMKQ5O7tZ0D1/dXx SVQAmweuI66/Cf/dJuWnN4+ya4WskWpF =jyd9 -----END PGP SIGNATURE-----
From e4488f1827bff93fe4c251a202f47e715ca1ed9e Mon Sep 17 00:00:00 2001 From: Eric Blake <e...@byu.net> Date: Sat, 5 Dec 2009 09:07:28 -0700 Subject: [PATCH 1/2] test-fseeko: fix test for mingw Undefining fseek made test-fseeko.sh fail when testing on pipes. * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather than undefining fseek, so test will pass on mingw. Signed-off-by: Eric Blake <e...@byu.net> --- ChangeLog | 6 ++++++ tests/test-fseeko.c | 25 +++++++++++++------------ 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3c01809..5328a68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-12-05 Eric Blake <e...@byu.net> + + test-fseeko: fix test for mingw + * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather + than undefining fseek, so test will pass on mingw. + 2009-12-05 Bruno Haible <br...@clisp.org> * lib/progname.h (set_program_name): Clarify specification. diff --git a/tests/test-fseeko.c b/tests/test-fseeko.c index 93b0adc..4006e1e 100644 --- a/tests/test-fseeko.c +++ b/tests/test-fseeko.c @@ -18,25 +18,26 @@ #include <config.h> -#include <stdio.h> -#include <stdlib.h> - /* None of the files accessed by this test are large, so disable the fseek link warning if we are not using the gnulib fseek module. */ #if !GNULIB_FSEEK -# undef fseek +# undef GL_LINK_WARNING +# define GL_LINK_WARNING(ignored) ((void) 0) #endif +#include <stdio.h> +#include <stdlib.h> + #define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ + do \ + { \ + if (!(expr)) \ + { \ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ + fflush (stderr); \ + abort (); \ + } \ + } \ while (0) #ifndef FUNC_UNGETC_BROKEN -- 1.6.5.rc1 From a4cfedb07defccd91a1b8290ab57be337bfd04b4 Mon Sep 17 00:00:00 2001 From: Eric Blake <e...@byu.net> Date: Sat, 5 Dec 2009 09:24:54 -0700 Subject: [PATCH 2/2] test-xalloc-die: fix test for mingw When cross-compiling on mingw to target mingw, argv[0] still includes a .exe suffix. Rather than worry about ${EXEEXT}, just add a sed post-process. Also, simplify the script by using tests/init.sh. * modules/xalloc-die-tests (Files): Add tests/init.sh. * tests/test-xalloc-die.sh: Rewrite to use init.sh. Strip directory and .exe suffix off argv[0] output. Signed-off-by: Eric Blake <e...@byu.net> --- ChangeLog | 5 +++++ modules/xalloc-die-tests | 1 + tests/test-xalloc-die.sh | 33 ++++++++------------------------- 3 files changed, 14 insertions(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5328a68..c3d6d73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-12-05 Eric Blake <e...@byu.net> + test-xalloc-die: fix test for mingw + * modules/xalloc-die-tests (Files): Add tests/init.sh. + * tests/test-xalloc-die.sh: Rewrite to use init.sh. Strip + directory and .exe suffix off argv[0] output. + test-fseeko: fix test for mingw * tests/test-fseeko.c (fseek): Redefine GL_LINK_WARNING, rather than undefining fseek, so test will pass on mingw. diff --git a/modules/xalloc-die-tests b/modules/xalloc-die-tests index d28c95f..30dc302 100644 --- a/modules/xalloc-die-tests +++ b/modules/xalloc-die-tests @@ -1,6 +1,7 @@ Files: tests/test-xalloc-die.c tests/test-xalloc-die.sh +tests/init.sh Depends-on: progname diff --git a/tests/test-xalloc-die.sh b/tests/test-xalloc-die.sh index 8a30022..28cce6d 100755 --- a/tests/test-xalloc-die.sh +++ b/tests/test-xalloc-die.sh @@ -16,38 +16,21 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -tmpfiles="" -trap '__st=$?; rm -fr $tmpfiles; exit $__st' 0 -trap '__st=$?; (exit $__st); exit $__st' 1 2 3 15 +. "${srcdir=.}/init.sh" --set-path=. -if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then - compare() { diff -u "$@"; } -elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then - compare() { cmp -s "$@"; } -else - compare() { cmp "$@"; } -fi - -tmpout=t-xalloc-die.tmp-stderr -tmperr=t-xalloc-die.tmp-stdout -tmpfiles="$tmpout $tmperr ${tmperr}2" - -PATH=".:$PATH" -export PATH -test-xalloc-die 2> ${tmperr} > ${tmpout} +test-xalloc-die 2> err > out case $? in 1) ;; - *) (exit 1); exit 1 ;; + *) Exit 1;; esac -tr -d '\015' < $tmperr > ${tmperr}2 || { (exit 1); exit 1; } +tr -d '\015' < err \ + | sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,' > err2 || Exit 1 -compare - ${tmperr}2 <<\EOF || { (exit 1); exit 1; } +compare - err2 <<\EOF || Exit 1 test-xalloc-die: memory exhausted EOF -test -s $tmpout && { (exit 1); exit 1; } - -rm -fr $tmpfiles +test -s out && Exit 1 -exit 0 +Exit $fail -- 1.6.5.rc1