This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Discrepency between configure.ac and configure
Type: Stage: resolved
Components: Build Versions: Python 3.10
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Michael.Felt
Priority: normal Keywords:

Created on 2020-12-21 13:07 by Michael.Felt, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg383515 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-12-21 13:07
While working on a PR for issue42323 I get an error with the generated ./configure even without my patch.

Working from commit 37a6d5f8027f969418fe53d0a73a21003a8e370d

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]git log --oneline | head
37a6d5f (HEAD -> master, upstream/master, upstream/HEAD, bpo-42323) [WIP/RFC] bpo-15872: tests: remove oddity from test_rmtree_errors (GH-22967)
ab74c01 bpo-31904: Fix site and sysconfig modules for VxWorks RTOS (GH-21821)
c95f8bc bpo-42669: Document that `except` rejects nested tuples (GH-23822)
b0398a4 bpo-42572:  Improve argparse docs for the type parameter. (GH-23849)
a44ce6c bpo-42604: always set EXT_SUFFIX=${SOABI}${SHLIB_SUFFIX} when using configure (GH-23708)

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]rpm -qa autoconf
autoconf-2.69-2.noarch

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]autoreconf -v
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /opt/freeware/bin/autoconf
autoreconf: running: /opt/freeware/bin/autoheader
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `.'

Your branch is up-to-date with 'upstream/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   aclocal.m4
        modified:   configure
        modified:   pyconfig.h.in

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]git diff configure
diff --git a/configure b/configure
index f07edff..6f0d51f 100755
--- a/configure
+++ b/configure
@@ -6471,44 +6471,10 @@ if test "$Py_OPT" = 'true' ; then
   DEF_MAKE_RULE="build_all"
   case $CC in
     *gcc*)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -fno-semantic-interposition" >&5
-$as_echo_n "checking whether C compiler accepts -fno-semantic-interposition... " >&6; }
-if ${ax_cv_check_cflags___fno_semantic_interposition+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-  ax_check_save_flags=$CFLAGS
-  CFLAGS="$CFLAGS  -fno-semantic-interposition"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ax_cv_check_cflags___fno_semantic_interposition=yes
-else
-  ax_cv_check_cflags___fno_semantic_interposition=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  CFLAGS=$ax_check_save_flags
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_semantic_interposition" >&5
-$as_echo "$ax_cv_check_cflags___fno_semantic_interposition" >&6; }
-if test "x$ax_cv_check_cflags___fno_semantic_interposition" = xyes; then :
-
+      AX_CHECK_COMPILE_FLAG(-fno-semantic-interposition,
       CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition"

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]./configure
checking for git... found
checking build system type... powerpc-ibm-aix7.2.4.0
checking host system type... powerpc-ibm-aix7.2.4.0
checking for python3.10... no
checking for python3... python3
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... "aix"
checking for gcc... gcc
checking whether the C compiler works... yes
...
checking for --with-pydebug... no
checking for --with-trace-refs... no
checking for --with-assertions... no
checking for --enable-optimizations... no
./configure[6464]: syntax error at line 6475 : `(' unexpected
aixtools@gcc119:[/home/aixtools/cpython/cpython-master]

Unclear - to me - what is wrong with configure.ac or autoconf that is installed.

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.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 J. MacKenzie and Akim Demaille.
msg383519 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-12-21 13:45
This is what I find via bisect:

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]git checkout . && git bisect bad
c6d7e82d19c091af698d4e4b3623648e259843e3 is the first bad commit
commit c6d7e82d19c091af698d4e4b3623648e259843e3
Author: Petr Viktorin <encukou@gmail.com>
Date:   Thu Oct 22 18:11:53 2020 +0200

    bpo-38980: Only apply -fno-semantic-interposition if available (GH-22892)

:100644 100644 b5f9cb0e8da44fb378e7e082f23025901cb06c6c 99913e7f3b85cf9ebba261073883c50b3f9a9ecd M      aclocal.m4
:100755 100755 df7118f68d3bb484148f8b719b1550676c029493 29f33b543ecc02c8eaae7cfd66c442a4bd60d44a M      configure
:100644 100644 c63c1e88a2302f7a60e9c2319f9965c1d7830d47 9698c3c888a6b7f74f2458df94bf21e51b6793d7 M      configure.ac
msg383522 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-12-21 13:58
This is beginning to look like it is an issue with the version of automake installed: 

aixtools@gcc119:[/home/aixtools/cpython/cpython-master]automake --version
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /usr/bin/automake line 3936.
automake (GNU automake) 1.15
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.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 Tom Tromey <tromey@redhat.com>
       and Alexandre Duret-Lutz <adl@gnu.org>.


Will test on a system where I can install the latest automake.

Assuming an updated version of automake fixes that - but not knowing autotools well enough - is there a simple addition to ensure that automake-1.16 is used?
msg383526 - (view) Author: Michael Felt (Michael.Felt) * Date: 2020-12-21 14:38
The 'issue' is that a package known as autoconf-archive must ALSO be installed - so that aclocal has a definition for ax_check_compile_flag.

Guessing that resolution is `third_party` - If not, please explain what the resolution flag is used for.
History
Date User Action Args
2022-04-11 14:59:39adminsetgithub: 86867
2020-12-21 16:12:16ned.deilysetstatus: open -> closed
stage: resolved
2020-12-21 14:38:29Michael.Feltsetresolution: third party
messages: + msg383526
2020-12-21 13:58:45Michael.Feltsetmessages: + msg383522
2020-12-21 13:45:46Michael.Feltsetmessages: + msg383519
2020-12-21 13:07:57Michael.Feltcreate