libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Libtool head test status


From: Ralf Wildenhues
Subject: Re: Libtool head test status
Date: Sat, 8 Mar 2008 09:51:12 +0100 (CET)
User-agent: SquirrelMail/1.4.9a

Hello Bob,

Thanks for testing.

* Bob Friesenhahn wrote on Sun, Mar 02, 2008 at 05:59:13PM CET:
> Right.  I was not terribly alarmed when some tests failed for MinGW/MSYS

> since I have previously observed that there can be test suite issues with
> line termination.  Also, some Windows provided tools don't work properly

> with a SMB mount.

I went back to my w32 (XP home edition) system now and fixed most of the
issues that I found.  With the patch below, the only failures I'm left at
are 21 (link order of deplibs) and 64 (stresstest) on both Cygwin and
MinGW
(and 65 as followup failure).

It seems that on your system, there is some corruption at work that causes
the shell to eat a Makefile.  This doesn't happen for me.  Note however
that I have experienced several times that Cygwin or MinGW can somehow
mess up their state in such a way that only rebooting helps to avoid
totally bogus results.  If that doesn't help, then I'm afraid you might
have to debug this failure yourself, as I can't reproduce it.

OK to apply?  Apologies if the patch is mangled.

Thanks,
Ralf

2008-03-07  Ralf Wildenhues  <address@hidden>

        * tests/nonrecursive.at: Use -no-undefined for foo.la.
        * tests/recursive.at: Likewise.
        * tests/subproject.at: Likewise.
        * tests/lt_dladvise.at: For systems where undefined symbols are
        not allowed, to not try to load the module libdepend.
        [ mingw ]: Add to list of such systems.
        * tests/testsuite.at (_LT_AT_TRANSLATE_TEXT_OUTPUT): New macro,
        to translate line ending of expout and experr files suitable for
        host executables.
        (LT_AT_CHECK, LT_AT_NOINST_EXEC_CHECK): Use it.
        Report by Bob Friesenhahn.

Index: tests/lt_dladvise.at
=================================================================== RCS
file: /sources/libtool/libtool/tests/lt_dladvise.at,v
retrieving revision 1.5
diff -u -r1.5 lt_dladvise.at
--- tests/lt_dladvise.at        1 Mar 2008 22:43:04 -0000       1.5
+++ tests/lt_dladvise.at        8 Mar 2008 08:28:18 -0000
@@ -173,8 +173,9 @@
       printf ("global: %d\n", moduletest (handle, "f", "i"));

       /* Don't attempt to load moddepend unless modglobal was successfully
-         loaded and the symglobal hint was taken.  */
-      if (info && info->is_symglobal)
+         loaded and the symglobal hint was taken, and the system allows to
+        to have undefined symbols.  */
+      if (info && info->is_symglobal && HAVE_UNDEFINED_SYMBOLS)
         {
           hint_ext ();
         }
@@ -285,10 +286,12 @@
 #
------------------------------------------------------------------------- #

 case $host_os in
-cygwin*)
+cygwin* | mingw*)
   # These hosts do not support linking without -no-undefined
+  CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=0"
   ;;
 *)
+  CPPFLAGS="$CPPFLAGS -DHAVE_UNDEFINED_SYMBOLS=1"
   dlopenable="$dlopen depend"
   $LIBTOOL --mode=compile $CC $CPPFLAGS $CFLAGS -c moddepend.c
   AT_CHECK([$LIBTOOL --mode=link $CC -module $CFLAGS $LDFLAGS -o
libdepend.la \
@@ -317,8 +320,8 @@
     modules="${modules+$modules }$dlopen lib$module.la"
   done

-  AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main
main.$OBJEXT \
-           $modules $LIBLTDL], [], [ignore], [ignore])
+  AT_CHECK([$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main
main.$OBJEXT $modules $LIBLTDL],
+          [], [ignore], [ignore])
   LT_AT_NOINST_EXEC_CHECK([./main], [$modules], [], [expout], [])
 done

Index: tests/nonrecursive.at
=================================================================== RCS
file: /sources/libtool/libtool/tests/nonrecursive.at,v
retrieving revision 1.11
diff -u -r1.11 nonrecursive.at
--- tests/nonrecursive.at       8 Jan 2008 05:07:41 -0000       1.11
+++ tests/nonrecursive.at       8 Mar 2008 08:28:19 -0000
@@ -64,7 +64,7 @@

 include ltdl/Makefile.inc

-foo_la_LDFLAGS         = -module -avoid-version
+foo_la_LDFLAGS         = -module -avoid-version -no-undefined
 foo_la_SOURCES         = foo.c
 ]])

Index: tests/recursive.at
=================================================================== RCS
file: /sources/libtool/libtool/tests/recursive.at,v
retrieving revision 1.9
diff -u -r1.9 recursive.at
--- tests/recursive.at  8 Jan 2008 06:56:03 -0000       1.9
+++ tests/recursive.at  8 Mar 2008 08:28:19 -0000
@@ -46,7 +46,7 @@
 AUTOMAKE_OPTIONS = 1.7
 SUBDIRS = ltdl
 lib_LTLIBRARIES = foo.la
-foo_la_LDFLAGS = -module -avoid-version
+foo_la_LDFLAGS = -module -avoid-version -no-undefined
 foo_la_SOURCES = foo.c
 ]])

Index: tests/subproject.at
=================================================================== RCS
file: /sources/libtool/libtool/tests/subproject.at,v
retrieving revision 1.14
diff -u -r1.14 subproject.at
--- tests/subproject.at 17 Jan 2008 04:47:41 -0000      1.14
+++ tests/subproject.at 8 Mar 2008 08:28:19 -0000
@@ -1,6 +1,6 @@
 # subproject.at -- test subproject Libltdl builds             -*-
Autotest -*-
 #
-#   Copyright (C) 2005 Free Software Foundation, Inc.
+#   Copyright (C) 2005, 2008 Free Software Foundation, Inc.
 #   Written by Gary V. Vaughan, 2005
 #
 #   This file is part of GNU Libtool.
@@ -44,7 +44,7 @@
 AUTOMAKE_OPTIONS = 1.9
 SUBDIRS = sub/ltdl
 lib_LTLIBRARIES = foo.la
-foo_la_LDFLAGS = -module -avoid-version
+foo_la_LDFLAGS = -module -avoid-version -no-undefined
 ]])

 echo 'int dummy = 0;' > foo.c
Index: tests/testsuite.at
=================================================================== RCS
file: /sources/libtool/libtool/tests/testsuite.at,v
retrieving revision 1.51
diff -u -r1.51 testsuite.at
--- tests/testsuite.at  1 Feb 2008 19:06:42 -0000       1.51
+++ tests/testsuite.at  8 Mar 2008 08:28:19 -0000
@@ -161,10 +161,23 @@
 m4_define([LT_AT_CHECK],
 [echo "LT_ESCAPE([$1])"; AT_CHECK($@)])

+
+# _LT_AT_TRANSLATE_TEXT_OUTPUT(FILE)
+# ----------------------------------
+# Ensure correct line ending for expected output of host executables.
+m4_define([_LT_AT_TRANSLATE_TEXT_OUTPUT],
+[case $host_os in mingw*)
+  while read -r l; do printf "%s\r\n" "$l"; done < $1 > $1.t
+  mv -f $1.t $1 ;;
+esac])
+
+
 # LT_AT_EXEC_CHECK(EXECUTABLE, [STATUS = 0], [STDOUT], [STDERR])
 # --------------------------------------------------------------
 m4_define([LT_AT_EXEC_CHECK],
-[AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
+[m4_if([$3], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$3])])
+m4_if([$4], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
+AT_CHECK([$1; lt_status=$?; if test $lt_status -eq 0; then :;
           elif test "X$host" != "X$build" && \
                { test -x "$1" || test -x "$1"$EXEEXT; }
           then (exit 77); else (exit $lt_status); fi],[$2],[$3],[$4])
@@ -175,7 +188,9 @@
 #                        [STATUS = 0], [STDOUT], [STDERR])
 # ---------------------------------------------------------
 m4_define([LT_AT_NOINST_EXEC_CHECK],
-[AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
+[m4_if([$4], [expout], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$4])])
+m4_if([$5], [experr], [_LT_AT_TRANSLATE_TEXT_OUTPUT([$5])])
+AT_CHECK([$LIBTOOL --mode=execute $2 $1; lt_status=$?;
           if test $lt_status -eq 0; then :;
           elif test "X$host" != "X$build" && \
                { test -x "$1" || test -x "$1"$EXEEXT; }








reply via email to

[Prev in Thread] Current Thread [Next in Thread]