Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for autoconf-2.71 #30668

Closed
orlitzky opened this issue Sep 26, 2020 · 62 comments
Closed

Prepare for autoconf-2.71 #30668

orlitzky opened this issue Sep 26, 2020 · 62 comments

Comments

@orlitzky
Copy link
Contributor

Autoconf is finally getting an update after 8 years, and there are some breaking changes. A beta version has been released for testing:

https://lists.gnu.org/archive/html/autoconf/2020-09/msg00006.html

We should try to bootstrap sage with the new version to make sure everything works before any end-users get a chance to.

This ticket also unbreaks make targets such as distclean, which rely on normal return from ./bootstrap, for these on autoconf 2.71

Upstream: Not yet reported upstream; Will do shortly.

CC: @mkoeppe @kiwifb @dimpase @vbraun

Component: build

Author: Dima Pasechnik, Michael Orlitzky

Branch: 9bfbc41

Reviewer: Dima Pasechnik, Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/30668

@orlitzky orlitzky added this to the sage-9.2 milestone Sep 26, 2020
@mkoeppe
Copy link
Member

mkoeppe commented Sep 26, 2020

comment:1

Well, fortunately end users do not run autoconf.

@orlitzky
Copy link
Contributor Author

comment:2

Lots of people clone the git repo and run ./bootstrap. They're who I had in mind.

@dimpase
Copy link
Member

dimpase commented Sep 27, 2020

comment:3

I think it's a good idea to check whether we can point out some issued, before the release is final.

@orlitzky
Copy link
Contributor Author

comment:4

Bootstrap output (cleaned up):

configure.ac:392: warning: back quotes and double quotes must not be escaped in: multiple installation records for $SPKG_NAME: m4_newline($(ls -l "$SAGE_SPKG_INST/$SPKG_NAME"-*)) m4_newline([only one should exist, so please delete some or all of these files and re-run \"$srcdir/configure\"])
m4/sage_spkg_configures.m4:191: warning: The macro `AC_FOREACH' is obsolete.
m4/sage_spkg_configures.m4:191: warning: The macro `AC_PROG_CC_C99' is obsolete.
m4/sage_spkg_configures.m4:204: warning: The macro `AC_FOREACH' is obsolete.
m4/sage_spkg_configures.m4:261: warning: The macro `AC_TRY_LINK' is obsolete.
m4/sage_spkg_configures.m4:261: warning: The macro `AC_TRY_RUN' is obsolete.

@orlitzky
Copy link
Contributor Author

comment:5

AC_TRY_LINK comes from ppl.m4, and has an easy replacement. Reported upstream at https://www.cs.unipr.it/mantis/view.php?id=2751

@orlitzky
Copy link
Contributor Author

comment:6

AC_TRY_RUN, too: https://www.cs.unipr.it/mantis/view.php?id=2752

@orlitzky
Copy link
Contributor Author

comment:7

AC_FOREACH: http://savannah.gnu.org/patch/index.php?9983

@mkoeppe mkoeppe modified the milestones: sage-9.2, sage-9.3 Oct 24, 2020
@orlitzky
Copy link
Contributor Author

comment:9

Dropping the backslashes that it complains about in m4/sage_spkg_collect.m4 doesn't seem to hurt anything (output does not change):

diff --git a/m4/sage_spkg_collect.m4 b/m4/sage_spkg_collect.m4
index 7cba7252c4..3867bc16c9 100644
--- a/m4/sage_spkg_collect.m4
+++ b/m4/sage_spkg_collect.m4
@@ -183,7 +183,7 @@ for DIR in $SAGE_ROOT/build/pkgs/*; do
                         multiple installation records for $SPKG_NAME:
                         m4_newline($(ls -l "$SAGE_SPKG_INST/$SPKG_NAME"-*))
                         m4_newline([only one should exist, so please delete some or all
-                        of these files and re-run \"$srcdir/configure\"])
+                        of these files and re-run "$srcdir/configure"])
                     ]))
                 ])
                 stampfile=yes

@mkoeppe
Copy link
Member

mkoeppe commented Feb 13, 2021

comment:10

Setting new milestone based on a cursory review of ticket status, priority, and last modification date.

@mkoeppe mkoeppe modified the milestones: sage-9.3, sage-9.4 Feb 13, 2021
@dimpase
Copy link
Member

dimpase commented Mar 15, 2021

comment:11

on Gentoo, autoconf is now version 2.71. Running autoupdate m4/* produces mostly backward-compatible changes.

@dimpase dimpase changed the title Prepare for autoconf-2.70 Prepare for autoconf-2.71 Mar 15, 2021
@dimpase
Copy link
Member

dimpase commented Mar 15, 2021

Commit: ce12b5f

@dimpase
Copy link
Member

dimpase commented Mar 15, 2021

New commits:

ce12b5fmostly autupdate's results

@dimpase
Copy link
Member

dimpase commented Mar 15, 2021

Branch: u/dimpase/configure/autoconf271

@orlitzky
Copy link
Contributor Author

comment:13

I think that leaves only the obsolete AC_PROG_CC_C99 in build/pkgs/gcc/spkg-configure.m4. The new autoconf docs say that we can replace

    AC_LANG_PUSH(C)
    if test -z "$CC"; then
        SAGE_MUST_INSTALL_GCC([a C compiler is missing])
    fi

    # Save compiler before checking for C99 support                             
    save_CC=$CC
    # Check that we can compile C99 code                                        
    AC_PROG_CC_C99()
    if test "x$ac_cv_prog_cc_c99" = xno; then
        SAGE_MUST_INSTALL_GCC([your C compiler cannot compile C99 code])
    fi
    # restore original CC                                                       
    CC=$save_CC
    AC_LANG_POP()

with

    if test -z "$CC"; then
        SAGE_MUST_INSTALL_GCC([a C compiler is missing])
    fi

    if test "x$ac_cv_prog_cc_c99" = xno; then
        SAGE_MUST_INSTALL_GCC([your C compiler cannot compile C99 code])
    fi

since we already call AC_PROG_CC(), and it now sets $ac_cv_prog_cc_c99.

But that would skip the C99 check for people using older autoconf. Should we...

  1. ignore that problem, or
  2. set the minimum version of autoconf required to 2.70, or
  3. just leave the AC_PROG_CC_C99() alone for now and fix it in the future?

@mkoeppe
Copy link
Member

mkoeppe commented Mar 15, 2021

comment:14

Replying to @orlitzky:

Should we[...]
2. set the minimum version of autoconf required to 2.70, or
[...]

No, that would be too disruptive

@orlitzky
Copy link
Contributor Author

Author: ​Dima Pasechnik, Michael Orlitzky

@orlitzky
Copy link
Contributor Author

comment:15

This looks sufficient for both autoconf-2.69 and autoconf-2.71.


New commits:

b717a71Trac #30668: don't run obsolete AC_PROG_CC_C99 macro in GCC check.

@orlitzky
Copy link
Contributor Author

Changed branch from u/dimpase/configure/autoconf271 to u/mjo/ticket/30668

@orlitzky
Copy link
Contributor Author

Changed commit from ce12b5f to b717a71

@dimpase
Copy link
Member

dimpase commented Mar 16, 2021

comment:16

As you could check,

     if test "x$ac_cv_prog_cc_c99" = xno; then
         SAGE_MUST_INSTALL_GCC([your C compiler cannot compile C99 code])
     fi

can be removed, as nothing sets ac_cv_prog_cc_c99 any more.

@orlitzky
Copy link
Contributor Author

comment:17

Replying to @dimpase:

as nothing sets ac_cv_prog_cc_c99 any more.

Of course I haven't tested on a system with a brand-new autoconf and a twenty-year-old gcc, but the documentation for >=autoconf-2.70 says that AC_PROG_CC can now set it:

https://www.gnu.org/software/autoconf/manual/autoconf-2.70/html_node/C-Compiler.html

@orlitzky
Copy link
Contributor Author

comment:42

You can unmask autoconf-2.71 on Gentoo by adding the line sys-devel/autoconf:2.71 to /etc/portage/package.unmask.

I am sceptical of the unreported race condition, but have too many other things to worry about at the moment.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 20, 2021

Changed commit from 826df39 to 9bfbc41

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented May 20, 2021

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

9bfbc41update for autoconf 2.71

@dimpase
Copy link
Member

dimpase commented May 20, 2021

comment:44

I've removed all the changes to ax_* files - except the one that was updated upstream, so I included this update here.

@dimpase
Copy link
Member

dimpase commented May 28, 2021

comment:46

weirdly, SAGE_SPKG_CONFIGURE_BOOST creeps up in a warning, even though full boost package is gone.

configure.ac:43: installing 'config/missing'
m4/sage_spkg_configures.m4:500: warning: SAGE_SPKG_CONFIGURE_BOOST is m4_require'd but not m4_defun'd
m4/sage_spkg_configure.m4:159: SAGE_SPKG_DEPCHECK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:500: the top level

feels like wrong quoting somewhere?

As well:

% ./configure --help | grep boost
  --with-system-boost_cropped={no|yes (default)|force (exit with an error if no usable version is found)}
                          detect and use an existing system boost_cropped
  --with-boost[=ARG]      use Boost library from a standard location
  --with-boost-libdir=LIB_DIR
                          Force given directory for boost libraries. Note that
                          fails and you know exactly where your boost

@dimpase
Copy link
Member

dimpase commented May 28, 2021

comment:47

the latter is fixed by
#31575 comment:19

I'll open another ticket for this.

@dimpase
Copy link
Member

dimpase commented May 28, 2021

comment:48

Replying to @dimpase:

the latter is fixed by
#31575 comment:19

I'll open another ticket for this.

fixed by #31871

@dimpase
Copy link
Member

dimpase commented Jun 27, 2021

comment:49

please merge this soon, a number of distros use autoconf 2.70+ now, and it breaks CI stuff not to support it properly.

@dimpase
Copy link
Member

dimpase commented Jul 7, 2021

comment:50

Made it a blocker, as I am tired of seeing

configure.ac:43: installing 'config/missing'
m4/sage_spkg_configures.m4:515: warning: The macro `AC_PROG_CC_C99' is obsolete.
m4/sage_spkg_configures.m4:515: You should run autoupdate.
./lib/autoconf/c.m4:1659: AC_PROG_CC_C99 is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:515: the top level
m4/sage_spkg_configures.m4:515: warning: The macro `AC_FOREACH' is obsolete.
m4/sage_spkg_configures.m4:515: You should run autoupdate.
./lib/autoconf/general.m4:191: AC_FOREACH is expanded from...
m4/ax_absolute_header.m4:41: AX_ABSOLUTE_HEADER is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_configure.m4:159: SAGE_SPKG_DEPCHECK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:515: the top level
m4/sage_spkg_configures.m4:515: warning: The macro `AC_TRY_LINK' is obsolete.
m4/sage_spkg_configures.m4:515: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_configure.m4:159: SAGE_SPKG_DEPCHECK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:515: the top level
m4/sage_spkg_configures.m4:517: warning: The macro `AC_FOREACH' is obsolete.
m4/sage_spkg_configures.m4:517: You should run autoupdate.
./lib/autoconf/general.m4:191: AC_FOREACH is expanded from...
m4/ax_absolute_header.m4:41: AX_ABSOLUTE_HEADER is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:517: the top level
m4/sage_spkg_configures.m4:531: warning: The macro `AC_FOREACH' is obsolete.
m4/sage_spkg_configures.m4:531: You should run autoupdate.
./lib/autoconf/general.m4:191: AC_FOREACH is expanded from...
m4/ax_absolute_header.m4:41: AX_ABSOLUTE_HEADER is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
./lib/autoconf/headers.m4:89: _AC_CHECK_HEADER_COMPILE is expanded from...
./lib/autoconf/headers.m4:56: AC_CHECK_HEADER is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:531: the top level
m4/sage_spkg_configures.m4:595: warning: The macro `AC_TRY_RUN' is obsolete.
m4/sage_spkg_configures.m4:595: You should run autoupdate.
./lib/autoconf/general.m4:2997: AC_TRY_RUN is expanded from...
m4/ppl.m4:29: AM_PATH_PPL is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_configure.m4:159: SAGE_SPKG_DEPCHECK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:595: the top level
m4/sage_spkg_configures.m4:595: warning: The macro `AC_TRY_LINK' is obsolete.
m4/sage_spkg_configures.m4:595: You should run autoupdate.
./lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/ppl.m4:29: AM_PATH_PPL is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_configure.m4:159: SAGE_SPKG_DEPCHECK is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:692: _AS_IF_ELSE is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
m4/sage_spkg_configures.m4:595: the top level
configure.ac:447: warning: back quotes and double quotes must not be escaped in: multiple installation records for $SPKG_NAME: m4_newline($(ls -l "$SAGE_SPKG_INST/$SPKG_NAME"-*)) m4_newline([only one should exist, so please delete some or all of these files and re-run \"$srcdir/configure\"])
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
lib/m4sugar/m4sh.m4:699: AS_IF is expanded from...
m4/sage_spkg_collect.m4:69: SAGE_SPKG_COLLECT is expanded from...
configure.ac:447: the top level

every time I run ./bootstrap

also, make distclean is broken for me without this branch.

@dimpase

This comment has been minimized.

@vbraun
Copy link
Member

vbraun commented Jul 25, 2021

Changed author from ​Dima Pasechnik, Michael Orlitzky to Dima Pasechnik, Michael Orlitzky

@vbraun
Copy link
Member

vbraun commented Jul 25, 2021

Changed branch from u/dimpase/ticket/30668 to 9bfbc41

@dimpase
Copy link
Member

dimpase commented Jul 27, 2021

comment:54

Thanks, Volker.

Were "typos" (well, unprintable chars - thanks Michael for spotting these) in the list of authors tripping up your scripts?

@dimpase
Copy link
Member

dimpase commented Jul 27, 2021

Changed commit from 9bfbc41 to none

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants