Opened 3 years ago

Closed 15 months ago

#21196 closed enhancement (wontfix)

Upgrade autotools

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: experimental Keywords:
Cc: jdemeyer, leif, embray Merged in:
Authors: Matthias Koeppe, Julian Rüth Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: u/mkoeppe/upgrade-autotools (Commits) Commit: d794672e1236ec5c3a149d5e944222d3a295ac99
Dependencies: #21047, #24903 Stopgaps:

Description

Upgrade autotools to the latest upstream versions, for no particular reason.

Change History (27)

comment:1 Changed 3 years ago by mkoeppe

  • Branch set to u/mkoeppe/upgrade-autotools

comment:2 Changed 3 years ago by mkoeppe

  • Commit set to d794672e1236ec5c3a149d5e944222d3a295ac99

The branch attempts to upgrade the autotools versions. Building currently fails because libtool 2.4.3's patches against gnulib stuff do not apply cleanly when gnulib is too new.


New commits:

da4a28fUse Sage m4 to build libtool
d70e858Add xz as dependency
b2095e1Merge tag '7.3.beta9' into t/21047/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz
e09aaf3Expand discussion about M4
ff3f2b3Merge tag '7.3' into t/21047/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz
59fb410Install symlinks bin/{aclocal,automake}-AM_API_VERSION
72269ccspkg-write-makefile: Remove dependency on GNU sed
ce2b490spkg-write-makefile: Fix wrong prereq in automake 1.10
ba06f0eSupply .serial file for libtool
d794672Upgrade autotools versions

comment:3 Changed 3 years ago by mkoeppe

(Branch is on top of #21047.)

comment:4 Changed 3 years ago by mkoeppe

  • Cc jdemeyer added

comment:5 Changed 3 years ago by leif

  • Cc leif added

comment:6 Changed 3 years ago by mkoeppe

  • Authors set to Matthias Koeppe

comment:7 Changed 3 years ago by mkoeppe

  • Cc embray added

comment:8 Changed 3 years ago by embray

Ah, I was just in the process of trying to do this myself (as I guess you saw on the ML). Thanks for adding me.

comment:9 Changed 3 years ago by embray

Did you ever find a workaround to the issue of libtool 2.4.3 and gnulib? I have an idea for that that I'm testing now.

comment:10 Changed 3 years ago by embray

Here's my idea--it worked for me. The idea is that there is an optional gnulib version appended to the libtool version (with a +). If given, it will check out that tag from the gnulib repo before building (otherwise it defaults to the master branch, which worked for all but libtool 2.4.3 anyways).

I admit the syntax is a bit awkward and am open to other ideas. I just didn't want to hard-code a special case just for this version (though that might be acceptable as well given that it ended up being the only one affected AFAICT).

  • build/pkgs/autotools/spkg-install

    diff --git a/build/pkgs/autotools/spkg-install b/build/pkgs/autotools/spkg-install
    index c373e84..a514674 100755
    a b rm -f m4 makeinfo help2man autoconf autoheader autom4te autoreconf \ 
    6464source "$SRC/../version-list"
    6565for x in $autoconf_versions; do autoconf_latest=$x ; done
    6666for x in $automake_versions; do automake_latest=$x ; done
    67 for x in $libtool_versions; do libtool_latest=$x ; done
     67for x in $libtool_versions; do
     68    x=${x%+*}
     69    libtool_latest=$x ;
     70done
    6871
    6972# We install scripts for autoconf,... based on the generic "autofoo" script
    7073cd "$SAGE_LOCAL/bin"
  • build/pkgs/autotools/spkg-write-makefile

    diff --git a/build/pkgs/autotools/spkg-write-makefile b/build/pkgs/autotools/spkg-write-makefile
    index 56e6040..4288eb2 100755
    a b write_make_rules() { 
    9090    all="$p-all:"
    9191    for v in $*
    9292    do
     93        # Split the version into the package version and the required gnulib version
     94        # if any; by default just use the master branch of gnulib
     95        gnulib_ver="master"
     96        if [[ "$v" == *+* ]]; then
     97            gnulib_ver=${v#*+}
     98            v=${v%+*}
     99        fi
     100
    93101        echo >&2 "Processing $p-$v"
    94102        cd $p
    95103
    write_make_rules() { 
    115123            if [ ! -f configure ]; then
    116124                # libtool-2.4.3 requires some gnulib files
    117125                if [ -d gnulib ]; then
     126                    echo >&2 "Preparing gnulib ${gnulib_ver}"
     127                    cd ../gnulib
     128                    git checkout "${gnulib_ver}"
     129                    cd ../$p
     130
    118131                    cp -a ../gnulib/build-aux .
    119132                fi
    120133                # Run aclocal, such that AM_INIT_AUTOMAKE is available.
    write_make_rules() { 
    201214        [ -z "$lt_ver" ] || echo -e "\texport LIBTOOL_VERSION=$lt_ver ; \\\\"
    202215        [ -z "$ac_ver" ] || echo -e "\texport AUTOCONF_VERSION=$ac_ver ; \\\\"
    203216        [ -z "$am_ver" ] || echo -e "\texport AUTOMAKE_VERSION=$am_ver ; \\\\"
    204        echo -e "\tcd $p-$v && ${bootstrap}\\\\"
    205        echo -e "\t    ./configure --prefix=\"\$(SAGE_LOCAL)/$p-$v\" && \\\\"
    206        echo -e "\t    \$\$MAKE && \$\$MAKE install"
    207        echo -e "\t# Remove all files except for the .* files"
    208        echo -e "\t[ \"\$\$SAGE_KEEP_BUILT_SPKGS\" = yes ] || rm -rf $p-$v/*"
     217
     218    if [ $p = libtool -a -d gnulib ]; then
     219        echo -e "\t(cd \$(SRC)/gnulib && git checkout ${gnulib_ver}) 1>&2 && \\\\"
     220    fi
     221    echo -e "\tcd $p-$v && ${bootstrap}\\\\"
     222    echo -e "\t    ./configure --prefix=\"\$(SAGE_LOCAL)/$p-$v\" && \\\\"
     223    echo -e "\t    \$\$MAKE && \$\$MAKE install"
     224    echo -e "\t# Remove all files except for the .* files"
     225    echo -e "\t[ \"\$\$SAGE_KEEP_BUILT_SPKGS\" = yes ] || rm -rf $p-$v/*"
    209226        echo
    210227
    211228        prevextract="$p-$v/.tarball-version"
  • build/pkgs/autotools/version-list

    diff --git a/build/pkgs/autotools/version-list b/build/pkgs/autotools/version-list
    index c4a2f2e..0edf2ad 100644
    a b automake_versions=" 
    1515    1.9 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.10 1.10.1 1.10.2 1.10.3
    1616    1.11 1.11.1 1.11.2 1.11.3 1.11.4 1.11.5 1.11.6 1.12 1.12.1 1.12.2
    1717    1.12.3 1.12.4 1.12.5 1.12.6 1.13 1.13.1 1.13.2 1.13.3 1.13.4
    18     1.14 1.14.1"
     18    1.14 1.14.1 1.15"
    1919
    2020libtool_versions="
    2121    1.5.20 1.5.22 1.5.24 1.5.26
    2222    2.2.4 2.2.6 2.2.6b 2.2.8 2.2.10
    23     2.4 2.4.2 2.4.3"
     23    2.4 2.4.2 2.4.3+v0.1-253-ge28a0f7
     24    2.4.4 2.4.5 2.4.6"
     25
     26m4_version=1.4.17
     27
     28help2man_version=1.47.4
     29
     30texinfo_version=4.13
Last edited 3 years ago by embray (previous) (diff)

comment:11 follow-up: Changed 3 years ago by embray

Turns out I was wrong--gnulib master does not work some of the later libtool versions as well. A simpler solution looks like it might be to just use the same gnulib version across all of them.

comment:12 follow-up: Changed 3 years ago by embray

BTW, a more general bug--when I tried the spkg-src it failed at source version-list since it cds to a different directory before the source command, which should come earlier.

comment:13 in reply to: ↑ 12 ; follow-up: Changed 3 years ago by mkoeppe

Replying to embray:

BTW, a more general bug--when I tried the spkg-src it failed at source version-list since it cds to a different directory before the source command, which should come earlier.

Do you mean spkg-write-makefile instead of spkg-src?

comment:14 in reply to: ↑ 11 ; follow-up: Changed 3 years ago by mkoeppe

Replying to embray:

Turns out I was wrong--gnulib master does not work some of the later libtool versions as well. A simpler solution looks like it might be to just use the same gnulib version across all of them.

"all of them" = all versions or all currently failing versions?

which gnullib version would you want to use?

comment:15 follow-up: Changed 3 years ago by mkoeppe

I think there's also a similar problem with texinfo. Old autotools versions break with texinfo >= 5; and IIRC, some newer autotools versions I think need texinfo >= 5.

comment:16 in reply to: ↑ 13 Changed 3 years ago by embray

Replying to mkoeppe:

Replying to embray:

BTW, a more general bug--when I tried the spkg-src it failed at source version-list since it cds to a different directory before the source command, which should come earlier.

Do you mean spkg-write-makefile instead of spkg-src?

No: https://git.sagemath.org/sage.git/diff/build/pkgs/autotools/spkg-src?id=527d09f4cf53eb2f9972aff4b9451823bda76fd9

comment:17 in reply to: ↑ 14 Changed 3 years ago by embray

Replying to mkoeppe:

Replying to embray:

Turns out I was wrong--gnulib master does not work some of the later libtool versions as well. A simpler solution looks like it might be to just use the same gnulib version across all of them.

"all of them" = all versions or all currently failing versions?

which gnullib version would you want to use?

I found git checkout v0.1-253-ge28a0f7 on gnulib to work on all the versions of libtool both before this ticket, and the ones added by this ticket.

comment:18 in reply to: ↑ 15 Changed 3 years ago by embray

Replying to mkoeppe:

I think there's also a similar problem with texinfo. Old autotools versions break with texinfo >= 5; and IIRC, some newer autotools versions I think need texinfo >= 5.

I didn't run into this particular problem but maybe I didn't try it on any packages that use texinfo. Can you point to a specific example?

comment:19 Changed 3 years ago by embray

  • Status changed from new to needs_info

comment:20 Changed 20 months ago by dimpase

ping?

comment:21 Changed 17 months ago by saraedum

What should we do about this ticket? Should we try to upgrade? (I could try to work on this…)

comment:22 Changed 17 months ago by mkoeppe

See also - #24903 optional package autotools fail to build

comment:23 Changed 17 months ago by saraedum

  • Dependencies changed from #21047 to #21047, #24903

comment:24 Changed 17 months ago by saraedum

If we decide to drop autotools in #24903, then this can be closed.

comment:25 Changed 16 months ago by saraedum

  • Authors changed from Matthias Koeppe to Matthias Koeppe, Julian Rüth
  • Milestone set to sage-duplicate/invalid/wontfix
  • Status changed from needs_info to needs_review

I propose to make autotools experimental and drop it some day. I don't think we should put too much effort into upgrading this.

If somebody else wants to take over with the upgrade (and has a system where this actually builds) they should feel free to take over of course :)

comment:26 Changed 16 months ago by dimpase

  • Reviewers set to Dima Pasechnik
  • Status changed from needs_review to positive_review

comment:27 Changed 15 months ago by vdelecroix

  • Resolution set to wontfix
  • Status changed from positive_review to closed

closing positively reviewed duplicates

Note: See TracTickets for help on using tickets.