Subject: Re: bug#15734: libtool 2.4.2.418 in UnixWare

From: "Gary V. Vaughan" <[email-masked]>
Date: Mon, 28 Oct 2013 11:14:06 +1300

Hi Tim,

Thanks for the report.

On Oct 28, 2013, at 9:06 AM, Tim Rice <[email-masked]> wrote:

> On Sun, 27 Oct 2013, Tim Rice wrote:
> 
> | On Sun, 27 Oct 2013, Tim Rice wrote:
> | 
> | > 
> | > UnixWare 7.1.4
> | > 
> | > Things don't look so good on the alpha release.
> | > ......
> | >    To: <[email-masked]>
> | >    Subject: [GNU Libtool 2.4.2.418] testsuite: 9 10 11 15 16 18 21 122 123 124 125 129 failed
> | > ......
> | 
> | Saw this in the build log.
> | ------
> |   GEN      libtoolize
> | UX:sed: ERROR: Command garbled:           s|^m4trace: -1- AC_CONFIG_AUX_DIR[([]*||
> |   GEN      libltdl/argz.h
> | ------
> 
> This patch helps some.
> 
> .........
> --- libtool-2.4.2.418/Makefile.am.old	2013-01-25 20:19:11.000000000 -0800
> +++ libtool-2.4.2.418/Makefile.am	2013-10-27 12:13:43.776276925 -0700
> @@ -248,7 +248,7 @@
> ## ---------------- ##
> 
> abs_aux_dir = `$(lt__cd) '$(srcdir)/$(aux_dir)' && pwd`
> -ltdl_ac_aux_dir = `$(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac`
> +ltdl_ac_aux_dir = `SED=$(SED) $(extract_trace) AC_CONFIG_AUX_DIR $(srcdir)/libltdl/configure.ac`
> 
> configure_edit = $(bootstrap_edit) \
> 	-e '/^\. /s|@auxscriptsdir\@|'$(abs_aux_dir)'|g' \
> .........
> 
>   To: <[email-masked]>
>   Subject: [GNU Libtool 2.4.2.418] testsuite: 21 122 123 124 125 129 failed
> 

Most of the remaining failures seem to be caused by the unset variable in the testsuite
getting set to ‘no’ rather than ‘unset’ or ‘:’ as was originally intended on your host.
However, Autotest already provides as_unset, so the following patch switches to that:

diff --git a/tests/demo.at b/tests/demo.at
index f1fd9a8..c0a1486 100644
--- a/tests/demo.at
+++ b/tests/demo.at
@@ -796,7 +796,7 @@ rm -f libhello.la "hell$EXEEXT"

 # If this check fails (i.e. the make succeeds), then the installed library
 # was used, which is wrong.
-AT_CHECK([$unset LIBTOOL LIBTOOLIZE; $MAKE hell$EXEEXT libhello_la_OBJECTS=hello.lo || (exit 1)],
+AT_CHECK([$as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE hell$EXEEXT libhello_la_OBJECTS=hello.lo || (exit 1)],
          [1], [ignore], [ignore])

 AT_CLEANUP
diff --git a/tests/testsuite.at b/tests/testsuite.at
index ecbdfc2..99122be 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -51,11 +51,6 @@ fi
 if test -n "$to_tool_file_cmd"; then
   configure_options="$configure_options lt_cv_to_tool_file_cmd=$to_tool_file_cmd"
 fi
-if (FOO=bar; unset FOO) >/dev/null 2>&1; then
-  unset=unset
-else
-  unset=false
-fi
 : ${mkdir_p="$abs_top_srcdir/build-aux/install-sh -d"}
 # Fix relative paths in $lt_INSTALL
 case $lt_INSTALL in
@@ -193,7 +188,7 @@ m4_define([LT_AT_CONFIGURE],
 m4_define([LT_AT_MAKE],
 [for target in m4_default([$1], [all])
 do
-  AT_CHECK([$unset LIBTOOL LIBTOOLIZE; $MAKE $target $2], [0], [ignore], [ignore])
+  AT_CHECK([$as_unset LIBTOOL; $as_unset LIBTOOLIZE; $MAKE $target $2], [0], [ignore], [ignore])
 done
 ])

I’ve pushed this patch already.

The remaining failure looks to be a similar problem to the sed issue you discovered but with
grep.  Since extract-trace is supposed to work standalone, I’ll find a way to have funclib.sh
find a suitable sed and grep, which will fix not only the problems your patch works on, but
also the remaining test failure, and no doubt similar latent bugs in other funclib.sh clients
(bootstrap and libtoolize).

Please, let me know if your still having issues after that.

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)