Opened 3 years ago

Closed 3 years ago

#21047 closed defect (fixed)

"sage -i autotools" fails because libtool 2.4.3 requires xz

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-7.4
Component: packages: experimental Keywords:
Cc: jpflori, jdemeyer, vbraun, felixs, leif, dimpase Merged in:
Authors: Matthias Koeppe Reviewers: Jeroen Demeyer, Volker Braun
Report Upstream: N/A Work issues:
Branch: 7894375 (Commits) Commit: 789437568284ba3dfe3f9e4d4526eaeb8a186f9f
Dependencies: #21063 Stopgaps:

Description

sage -i autotools results in this error. In a parallel build, one is left with a nondeterministic collection of installed autotools versions.

export MAKE='make -j12 -j1' ; \
	export AUTOCONF_VERSION=2.62 ; \
	export AUTOMAKE_VERSION=1.11.1 ; \
	cd libtool-2.4.3 && bash bootstrap --skip-git --skip-po --gnulib-srcdir=../../src/gnulib && \
	    ./configure --prefix="/Users/mkoeppe/cvs/sage/local/libtool-2.4.3" && \
	    $MAKE && $MAKE install
bootstrap:   error: Prerequisite 'xz' not found. Please install it, or
bootstrap:          'export XZ=/path/to/xz'.
bootstrap:   error: HACKING explains how to obtain these prerequisite programs:
bootstrap:          Program    Min_version Homepage                            
bootstrap:          -----------------------------------------------------------
bootstrap:          help2man   1.29        http://www.gnu.org/s/help2man       
bootstrap:          make       3.81        http://www.gnu.org/s/make           
bootstrap:          makeinfo   4.8         http://www.gnu.org/s/texinfo        
bootstrap:          xz         4.999.8beta http://tukaani.org/xz               
bootstrap:          autoconf   2.62        http://www.gnu.org/s/autoconf       
bootstrap:          automake   1.11.1      http://www.gnu.org/s/automake       
bootstrap:          -----------------------------------------------------------
make: *** [/Users/mkoeppe/cvs/sage/local/libtool-2.4.3] Error 1

Change History (34)

comment:1 Changed 3 years ago by jondo

  • Cc jondo removed

comment:2 Changed 3 years ago by mkoeppe

  • Dependencies set to #21063

#21063 adds the required xz package. But next it runs into a problem with the old gm4 on Mac OS X.

bootstrap: running: autoreconf --symlink --install
main::scan_file() called too early to check prototype at /Users/mkoeppe/cvs/sage/local/automake-1.11.1/bin/aclocal line 617.
m4/ltversion.m4:12: warning: ill-formed serial number `ltversion.m4', expecting a version string with only digits and dots
/Library/Developer/CommandLineTools/usr/bin/gm4: unrecognized option `--debugfile=autom4te.cache/traces.0t'
Try `/Library/Developer/CommandLineTools/usr/bin/gm4 --help' for more information.
autom4te: gm4 failed with exit status: 1

comment:3 Changed 3 years ago by mkoeppe

  • Branch set to u/mkoeppe/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz

comment:4 Changed 3 years ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to d70e85813f155bae6c1f0d9c37af8bd0b8c4c386
  • Status changed from new to needs_review

Now it works. Needs review.


New commits:

d356c75Add xz package
da4a28fUse Sage m4 to build libtool
d70e858Add xz as dependency

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

An unrelated issue with autotools that should be fixed as well. The package should actually install links "aclocal-VERSION" and "automake-VERSION" (actually am__api_version) to $SAGE_LOCAL/bin. For example, 1.14.1 and 1.14 have the same am__api_version (1.14). So we need to pick the better one I guess.

(This is so that maintainer-mode Makefile targets which call automake work. )

comment:6 follow-up: Changed 3 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to needs_work

What's this???

# System m4 from Mac OS X 10.11.5 is too old to bootstrap libtool 1.4.3
export M4="$SAGE_LOCAL/bin/m4"

That m4 should be the first one found in the $PATH, so I really do not see the point.

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

Replying to jdemeyer:

What's this???

# System m4 from Mac OS X 10.11.5 is too old to bootstrap libtool 1.4.3
export M4="$SAGE_LOCAL/bin/m4"

That m4 should be the first one found in the $PATH, so I really do not see the point.

The configure script prefers "gm4" to "m4". That's why this is necessary.

comment:8 in reply to: ↑ 7 Changed 3 years ago by jdemeyer

Replying to mkoeppe:

The configure script prefers "gm4" to "m4".

Please add this sentence to a comment in the patch (possibly with some more explanation) and refer to this ticket.

Last edited 3 years ago by jdemeyer (previous) (diff)

comment:9 Changed 3 years ago by git

  • Commit changed from d70e85813f155bae6c1f0d9c37af8bd0b8c4c386 to e09aaf37390699e318442506e0262a88a9266896

Branch pushed to git repo; I updated commit sha1. New commits:

b2095e1Merge tag '7.3.beta9' into t/21047/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz
e09aaf3Expand discussion about M4

comment:10 Changed 3 years ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:11 Changed 3 years ago by git

  • Commit changed from e09aaf37390699e318442506e0262a88a9266896 to ff3f2b31d0bf071ee8828a8038d74082789d2e01

Branch pushed to git repo; I updated commit sha1. New commits:

ff3f2b3Merge tag '7.3' into t/21047/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz

comment:12 Changed 3 years ago by git

  • Commit changed from ff3f2b31d0bf071ee8828a8038d74082789d2e01 to ba06f0e03ce2e7ba03d37c9ad450eee77535d107

Branch pushed to git repo; I updated commit sha1. New commits:

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

comment:13 in reply to: ↑ 5 Changed 3 years ago by mkoeppe

Replying to mkoeppe:

An unrelated issue with autotools that should be fixed as well. The package should actually install links "aclocal-VERSION" and "automake-VERSION" (actually am__api_version) to $SAGE_LOCAL/bin. For example, 1.14.1 and 1.14 have the same am__api_version (1.14). So we need to pick the better one I guess.

(This is so that maintainer-mode Makefile targets which call automake work. )

This is done now.

comment:14 Changed 3 years ago by mkoeppe

I have also fixed the installation of libtool's ltversion.m4, which was missing the serial number (.serial), causing the following warning.

m4/ltversion.m4:12: warning: ill-formed serial number 'ltversion.m4', expecting a version string with only digits and dots

comment:15 Changed 3 years ago by mkoeppe

It now works fine for me. Needs review.

Follow-up ticket: #21196 - Upgrade autotools

comment:16 Changed 3 years ago by leif

  • Cc leif added

comment:17 follow-up: Changed 3 years ago by jdemeyer

  • Status changed from needs_review to needs_work

Style question: why did you change this part?

sed 's/^/\t/;' <<EOF
cd $p-$v && ${bootstrap}\\
    ./configure --prefix="\$(SAGE_LOCAL)/$p-$v" && \\
    \$\$MAKE && \$\$MAKE install
# Remove all files except for the .* files
[ "\$\$SAGE_KEEP_BUILT_SPKGS" = yes ] || rm -rf $p-$v/*
EOF

I thought it was a very nice way to not have to write too many backslashes....

I think that spkg-write-makefile needs more documentation. All the changes that you did are non-trivial and should be documented better. What does # Fix up for wrong prereq. mean for example?

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

Replying to jdemeyer:

Style question: why did you change this part?

sed 's/^/\t/;' <<EOF
cd $p-$v && ${bootstrap}\\
    ./configure --prefix="\$(SAGE_LOCAL)/$p-$v" && \\
    \$\$MAKE && \$\$MAKE install
# Remove all files except for the .* files
[ "\$\$SAGE_KEEP_BUILT_SPKGS" = yes ] || rm -rf $p-$v/*
EOF

I thought it was a very nice way to not have to write too many backslashes....

Unfortunately using '\t' only works with GNU sed, not with the traditional sed that is available on Mac OS X. (See commit message).

I think that spkg-write-makefile needs more documentation. All the changes that you did are non-trivial and should be documented better.

OK, I'll add some.

What does # Fix up for wrong prereq. mean for example?

It's a fix for an automake version that has a too low autoconf requirement listed in its source. I believe in the current spkg, someone must have fixed this by hand-editing the Makefile.build.

comment:19 Changed 3 years ago by git

  • Commit changed from ba06f0e03ce2e7ba03d37c9ad450eee77535d107 to afe7062c48cbb75a0e871efa8002eec132837d39

Branch pushed to git repo; I updated commit sha1. New commits:

afe7062add more comments

comment:20 in reply to: ↑ 18 Changed 3 years ago by jdemeyer

Also: please remove this:

+	    # Could instead compute the .serial at "make" time:
+	    #echo -e "\tif test ! -f \"$p-$v/.serial\"; then ( cd \$(SRC)/$p && git log --pretty=oneline $tag ) |wc -l | sed 's|[\t ]||g ' > $p-$v/.serial ; fi"

It's only confusing...

comment:21 Changed 3 years ago by git

  • Commit changed from afe7062c48cbb75a0e871efa8002eec132837d39 to c60f495f900f6082a231003e5474d5f8fb29989c

Branch pushed to git repo; I updated commit sha1. New commits:

c60f495remove commented out code

comment:22 Changed 3 years ago by mkoeppe

  • Status changed from needs_work to needs_review

comment:23 follow-up: Changed 3 years ago by jdemeyer

Have you tested this version on OS X? I can test Linux but not OS X.

comment:24 follow-up: Changed 3 years ago by jdemeyer

  • Status changed from needs_review to needs_info

Why do you need the .serial files?

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

Replying to jdemeyer:

Why do you need the .serial files?

See comment 14 - it's also explained in the comment that I added to spkg-write-makefile

comment:26 in reply to: ↑ 23 Changed 3 years ago by mkoeppe

Replying to jdemeyer:

Have you tested this version on OS X?

Yes

comment:27 in reply to: ↑ 25 Changed 3 years ago by jdemeyer

Replying to mkoeppe:

it's also explained in the comment that I added to spkg-write-makefile

Well, that comment only explains why that file is missing. Not why it is needed.

comment:28 Changed 3 years ago by git

  • Commit changed from c60f495f900f6082a231003e5474d5f8fb29989c to 789437568284ba3dfe3f9e4d4526eaeb8a186f9f

Branch pushed to git repo; I updated commit sha1. New commits:

7894375Add more documentation

comment:29 Changed 3 years ago by mkoeppe

  • Status changed from needs_info to needs_review

comment:30 Changed 3 years ago by mkoeppe

enough documentation?

comment:31 Changed 3 years ago by mkoeppe

ping?

comment:32 Changed 3 years ago by mkoeppe

  • Cc dimpase added
  • Milestone changed from sage-7.3 to sage-7.4

comment:33 Changed 3 years ago by vbraun

  • Reviewers changed from Jeroen Demeyer to Jeroen Demeyer, Volker Braun
  • Status changed from needs_review to positive_review

comment:34 Changed 3 years ago by vbraun

  • Branch changed from u/mkoeppe/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz to 789437568284ba3dfe3f9e4d4526eaeb8a186f9f
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.