mainAutoconf - Support: sr #110283, 2.69b on OpenIndiana: many...

 
 

sr #110283: 2.69b on OpenIndiana: many testsuite failures without GNU utilities in $PATH

Submitter:  Zack Weinberg <zackw>
Submitted:  Mon 27 Jul 2020 01:55:03 PM UTC
   
 
Priority:  * 5 - Unprioritized Severity:  3 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Operating System:  Solaris
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 04 Aug 2020 05:18:44 PM UTC, comment #5: 

The patch I posted here earlier was necessary but not sufficient to fix all the spurious testsuite failures due to _AST_FEATURES.  I have now pushed a complete fix.

As of revision 2cb0ab81, I get a completely successful testsuite on weerd with all three of these $PATH settings:

 - /usr/gnu/bin:/usr/bin:/usr/sbin:/sbin
 - /usr/bin:/usr/sbin:/sbin
 - /usr/xpg4/bin:/usr/bin:/usr/sbin:/usr/sbin

In the latter two cases I used "gmake check" instead of "make check" because of #110289 -- further discussion of that problem should happen in that ticket.

With /usr/xpg4/bin first in the path, I needed to set ACCEPT_INFERIOR_RM_PROGRAM=yes in the environment before running 'configure', but having done that, there were no additional problems.  Any change to the behavior of AM_INIT_AUTOMAKE needs to happen in automake first, and the workaround of setting this environment variable is suggested in the error message that prints when 'rm -f' with no arguments exits unsuccessfully, so I don't think we need to make any additional changes on our side, yet.

Zack Weinberg <zackw>
Group administrator
Tue 04 Aug 2020 02:54:01 PM UTC, comment #4: 

I have been able to reproduce the _AST_FEATURES problem on weerd when $PATH is set to /usr/xpg4/bin:/usr/bin:/usr/sbin:/sbin.  I'm testing my patch now and I will push it after verifying it fixes the issue.

Zack Weinberg <zackw>
Group administrator
Mon 03 Aug 2020 01:08:31 AM UTC, comment #3: 

I did not observe the _AST_FEATURES problem in any of my builds on OpenIndiana. However, Zack's patch looks good to fix those problems, whatever happens to cause them.

Paul Eggert <eggert>
Group administrator
Mon 03 Aug 2020 12:49:16 AM UTC, comment #2: 

The ksh93 'rm -f' problem comes from this code introduced in Automake 1.14 (2013):

https://git.savannah.gnu.org/cgit/automake.git/commit/?id=f78b0f0b2741fcdd4e21151758a8a75ddaa8aa17

This causes AM_INIT_AUTOMAKE to error-out immediately if 'rm -f' (with no arguments) fails. An error-out occurs on OpenIndiana if /usr/xpg4/bin precedes /usr/bin in your PATH:

eggert@weerd:~/build$ PATH=/usr/bin:/usr/xpg4/bin sh -c 'rm -f'
eggert@weerd:~/build$ PATH=/usr/xpg4/bin:/usr/bin sh -c 'rm -f'
Usage: rm [-cFdfirRuv] file ...

and this occurs because OpenIndiana sh (which is a symlink /bin/i86/ksh93 and where $KSH_VERSION is "Version JM 93t+ 2010-03-05") has an optimization that screws up: if /usr/xpg4/bin is early in your PATH the shell optimizes away the fork/exec to rm and does the rm itself, but the shell does so incorrectly.

I observed a similar problem with ksh93 printf. I worked around the printf bug here:

https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=3ba414b2c4f599de1a3834b7074c3d47ff746341

However, the OpenIndiana 'rm -f' bug is not so easy to work around, as the 'rm -f' stuff came from Automake and we'd need to generate a new version of Automake to work around it. And anyway, tons of packages have used Automake 1.14 or later, and those packages won't build on OpenIndiana anyway if /usr/xpg4/bin is early in the PATH. I assume OmniOS has similar problems.

I don't know what the OpenIndiana/OmniOS bug-reporting processes is, but I suggest filing bug reports against their shells, as they have significant portability problems and they don't conform to current POSIX if /usr/xgp4/bin is early in the PATH (which is just the opposite of the intent of /usr/xgp4/bin).

A simple workaround is to build Autoconf with PATH='/usr/bin' (and nothing else) and use plain 'configure' without messing with CONFIG_SHELL. This avoids the ksh93 'rm -f' bug. I have done this with Autoconf master and verified that all tests pass on OpenIndiana and on OmniOS (thanks to Bob Friesenhahn giving me guest accounts on these platforms).

This should be good enough for OpenIndiana, so I suggest marking this bug report as Done and closing it.

Paul Eggert <eggert>
Group administrator
Mon 27 Jul 2020 03:32:19 PM UTC, comment #1: 

It appears that many of the failures are spurious, caused by ksh93's _AST_FEATURES shell variable varying from invocation to invocation.  The test suite already filters out many other shell variables with this property.  Could you please apply the following patch and report how many failures remain?

diff --git a/tests/local.at b/tests/local.at
index 308eae32..e8302273 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -326,6 +326,7 @@ m4_define([AT_CHECK_CONFIGURE],
 # - AC_SUBST'ed variables
 #   (FIXME: Generate a list of these automatically.)
 # - _|@|.[*#?$].|argv|ARGC|LINENO|OLDPWD|PIPESTATUS|RANDOM|SECONDS
+#   |_AST_FEATURES
 #   Some variables some shells use and change.
 #   `.[*#?$].' catches `$#' etc. which are displayed like this:
 #      | '!'=18186
@@ -375,7 +376,8 @@ if test -f state-env.before && test -f state-env.after; then
       [AWK|LEX|LEXLIB|LEX_OUTPUT_ROOT|LN_S|M4|MKDIR_P|RANLIB|SET_MAKE|YACC],
       [GREP|[EF]GREP|SED],
       [[_@]|.[*#?$].],
-      [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM|SECONDS]))=' \
+      [argv|ARGC|LINENO|BASH_ARGC|BASH_ARGV|OLDPWD|PIPESTATUS|RANDOM],
+      [SECONDS|_AST_FEATURES]))=' \
      $act_file ||
        test $? -eq 1 || echo failed >&2
     ) 2>stderr-$act_file |

It would also be helpful if you could file a separate bug report explaining what is wrong with ksh93's 'rm -f' and how it makes configure fail.  We ought to be detecting the problem and working around it; CONFIG_SHELL=/usr/bin/bash shouldn't be necessary.

Zack Weinberg <zackw>
Group administrator
Mon 27 Jul 2020 01:55:03 PM UTC, original submission:  

Reported to bug-autoconf by Bob Friesenhahn:

On OpenIndiana, Autoconf 2.69b fairs very poorly without the GNU utilities in the path.

## ------------------------ ##
## Summary of the failures. ##
## ------------------------ ##
Failed tests:
GNU Autoconf 2.69b test suite test groups:

 NUM: FILE-NAME:LINE     TEST-GROUP-NAME
      KEYWORDS

 221: autotest.at:1893   C unit tests
      ac_config_testdir at_tested autotest
 246: torture.at:186     AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS
 279: compile.at:390     AC_TRY_LINK_FUNC
 282: aclang.at:14       AC_REQUIRE_CPP
 286: c.at:94            AC_PROG_CPP requires AC_PROG_CC
 287: c.at:109           AC_PROG_CPP with warnings
 288: c.at:145           AC_PROG_CPP without warnings
 289: c.at:189           AC_PROG_CPP via CC
 292: c.at:255           AC_USE_SYSTEM_EXTENSIONS
 297: acc.at:14          AC_C_BIGENDIAN
 303: acc.at:20          AC_C_STRINGIZE
 305: acc.at:22          AC_C_VARARRAYS
 307: acc.at:24          AC_OPENMP
 309: acc.at:26          AC_PROG_CPP_WERROR
 310: acc.at:27          AC_PROG_GCC_TRADITIONAL
 315: fortran.at:61      GNU Fortran
 329: fortran.at:962     AC_FC_FIXEDFORM with AC_FC_SRCEXT
 333: acfortran.at:13    AC_F77_IMPLICIT_NONE
 334: acfortran.at:14    AC_F77_MAIN
 335: acfortran.at:15    AC_F77_WRAPPERS
 338: acfortran.at:18    AC_FC_FREEFORM
 339: acfortran.at:19    AC_FC_IMPLICIT_NONE
 340: acfortran.at:20    AC_FC_LINE_LENGTH
 341: acfortran.at:21    AC_FC_MAIN
 343: acfortran.at:23    AC_FC_MODULE_FLAG
 344: acfortran.at:24    AC_FC_MODULE_OUTPUT_FLAG
 345: acfortran.at:25    AC_FC_PP_DEFINE
 346: acfortran.at:26    AC_FC_WRAPPERS
 360: semantics.at:33    AC_CHECK_LIB
 361: semantics.at:81    AC_SEARCH_LIBS
 362: semantics.at:94    AC_SEARCH_LIBS (none needed)
 363: semantics.at:110   AC_CHECK_DECLS
 364: semantics.at:171   AC_CHECK_FUNCS
 365: semantics.at:184   AC_REPLACE_FUNCS
 366: semantics.at:247   AC_CHECK_HEADERS
 367: semantics.at:282   AC_CHECK_HEADERS (preprocessor test)
 368: semantics.at:320   AC_CHECK_HEADERS (compiler test)
 369: semantics.at:356   AC_CHECK_MEMBER
 370: semantics.at:382   AC_CHECK_MEMBERS
 372: semantics.at:397   AC_CHECK_ALIGNOF (cross compile)
      cross
 374: semantics.at:414   AC_CHECK_ALIGNOF struct (cross compile)
      cross
 376: semantics.at:426   AC_CHECK_SIZEOF (cross compile)
      cross
 378: semantics.at:442   AC_CHECK_SIZEOF struct (cross compile)
      cross
 379: semantics.at:467   AC_CHECK_TYPES
 383: semantics.at:609   AC_C_BIGENDIAN
      cross
 386: semantics.at:792   AC_PATH_XTRA
 404: acgeneral.at:16    AC_CHECK_DECLS_ONCE
 405: acgeneral.at:17    AC_EGREP_CPP
 406: acgeneral.at:18    AC_EGREP_HEADER
 416: acgeneral.at:30    AC_TRY_CPP
      autoupdate
 423: acspecific.at:14   AC_SYS_LARGEFILE
 426: acspecific.at:19   AC_AIX
      autoupdate
 428: acspecific.at:21   AC_DECL_SYS_SIGLIST
      autoupdate
 431: acspecific.at:24   AC_IRIX_SUN
      autoupdate
 433: acspecific.at:26   AC_MINIX
      autoupdate
 434: acspecific.at:27   AC_SCO_INTL
      autoupdate
 435: acspecific.at:28   AC_XENIX_DIR
      autoupdate
 439: acprograms.at:16   AC_PROG_LEX
 447: acprograms.at:26   AC_DECL_YYTEXT
      autoupdate
 450: acheaders.at:14    AC_CHECK_HEADER_STDBOOL
 455: acheaders.at:19    AC_HEADER_STDBOOL
 456: acheaders.at:20    AC_HEADER_TIOCGWINSZ
 464: actypes.at:14      AC_STRUCT_DIRENT_D_TYPE
 466: actypes.at:16      AC_STRUCT_TIMEZONE
 467: actypes.at:17      AC_TYPE_INT16_T
 468: actypes.at:18      AC_TYPE_INT32_T
 469: actypes.at:19      AC_TYPE_INT64_T
 470: actypes.at:20      AC_TYPE_INT8_T
 471: actypes.at:21      AC_TYPE_INTMAX_T
 472: actypes.at:22      AC_TYPE_INTPTR_T
 475: actypes.at:25      AC_TYPE_MODE_T
 476: actypes.at:26      AC_TYPE_OFF_T
 477: actypes.at:27      AC_TYPE_SSIZE_T
 482: actypes.at:32      AC_TYPE_UINTMAX_T
 483: actypes.at:33      AC_TYPE_UINTPTR_T
 489: actypes.at:41      AC_TYPE_SIGNAL
      autoupdate
 490: actypes.at:42      AM_TYPE_PTRDIFF_T
      autoupdate
 492: acfunctions.at:14  AC_FUNC_CHOWN
 494: acfunctions.at:16  AC_FUNC_ERROR_AT_LINE
 496: acfunctions.at:18  AC_FUNC_FORK
 498: acfunctions.at:20  AC_FUNC_GETGROUPS
 500: acfunctions.at:22  AC_FUNC_GETPGRP
 507: acfunctions.at:29  AC_FUNC_OBSTACK
 510: acfunctions.at:32  AC_FUNC_SETPGRP
 513: acfunctions.at:35  AC_FUNC_STRERROR_R
 514: acfunctions.at:36  AC_FUNC_STRFTIME
 515: acfunctions.at:37  AC_FUNC_STRNLEN
 519: acfunctions.at:41  AC_FUNC_VPRINTF
 520: aclibs.at:15       AC_HAVE_LIBRARY
      autoupdate

Skipped tests:
GNU Autoconf 2.69b test suite test groups:

 NUM: FILE-NAME:LINE     TEST-GROUP-NAME
      KEYWORDS

 260: torture.at:1201    VPATH
 351: erlang.at:30       Erlang
      erlang
 352: erlang.at:52       AC_ERLANG_CHECK_LIB
      erlang
 353: erlang.at:72       AC_ERLANG_SUBST_ROOT_DIR
      erlang
 354: erlang.at:89       AC_ERLANG_SUBST_LIB_DIR
      erlang
 357: erlang.at:128      AC_ERLANG_SUBST_ERTS_VER
      erlang
 358: go.at:30           Go
 521: foreign.at:26      Libtool

---

% echo $PATH
/usr/openwin/bin:/usr/xpg4/bin:/usr/bin:/usr/sbin

I executed configure like:

CONFIG_SHELL=/usr/bin/bash /home/bfriesen/src/gnu/autoconf-2.69b/configure

because otherwise configure failed almost immediately due to ksh93's 'rm -f' being broken.


I have attached the testsuite.log file.

Zack Weinberg <zackw>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #49553:  testsuite.log.gz added by zackw (127KiB - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by eggert (Posted a comment)
  • -email is unavailable- added by zackw (Submitted the item)
  • -email is unavailable- added by zackw
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-08-04 zackw StatusReady For Test Done
        Open/ClosedOpen Closed
    2020-07-27 zackw StatusNone Ready For Test
    2020-07-27 zackw Attached File- Added testsuite.log.gz, #49553
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code