Opened 6 years ago

Closed 6 years ago

#21047 closed defect (fixed)

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

Reported by: Matthias Köppe Owned by:
Priority: major Milestone: sage-7.4
Component: packages: experimental Keywords:
Cc: Jean-Pierre Flori, Jeroen Demeyer, Volker Braun, Felix Salfelder, Leif Leonhardy, Dima Pasechnik Merged in:
Authors: Matthias Koeppe Reviewers: Jeroen Demeyer, Volker Braun
Report Upstream: N/A Work issues:
Branch: 7894375 (Commits, GitHub, GitLab) Commit: 789437568284ba3dfe3f9e4d4526eaeb8a186f9f
Dependencies: #21063 Stopgaps:

Status badges

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 6 years ago by Robert Pollak

Cc: Robert Pollak removed

comment:2 Changed 6 years ago by Matthias Köppe

Dependencies: #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 6 years ago by Matthias Köppe

Branch: u/mkoeppe/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz

comment:4 Changed 6 years ago by Matthias Köppe

Authors: Matthias Koeppe
Commit: d70e85813f155bae6c1f0d9c37af8bd0b8c4c386
Status: newneeds_review

Now it works. Needs review.


New commits:

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

comment:5 Changed 6 years ago by Matthias Köppe

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 Changed 6 years ago by Jeroen Demeyer

Reviewers: Jeroen Demeyer
Status: needs_reviewneeds_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 ; Changed 6 years ago by Matthias Köppe

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 6 years ago by Jeroen Demeyer

Replying to mkoeppe:

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

Please add this sentence to a comment in the patch and refer to this ticket.

Version 0, edited 6 years ago by Jeroen Demeyer (next)

comment:9 Changed 6 years ago by git

Commit: d70e85813f155bae6c1f0d9c37af8bd0b8c4c386e09aaf37390699e318442506e0262a88a9266896

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 6 years ago by Matthias Köppe

Status: needs_workneeds_review

comment:11 Changed 6 years ago by git

Commit: e09aaf37390699e318442506e0262a88a9266896ff3f2b31d0bf071ee8828a8038d74082789d2e01

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 6 years ago by git

Commit: ff3f2b31d0bf071ee8828a8038d74082789d2e01ba06f0e03ce2e7ba03d37c9ad450eee77535d107

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 6 years ago by Matthias Köppe

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 6 years ago by Matthias Köppe

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 6 years ago by Matthias Köppe

It now works fine for me. Needs review.

Follow-up ticket: #21196 - Upgrade autotools

comment:16 Changed 6 years ago by Leif Leonhardy

Cc: Leif Leonhardy added

comment:17 Changed 6 years ago by Jeroen Demeyer

Status: needs_reviewneeds_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 ; Changed 6 years ago by Matthias Köppe

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 6 years ago by git

Commit: ba06f0e03ce2e7ba03d37c9ad450eee77535d107afe7062c48cbb75a0e871efa8002eec132837d39

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

afe7062add more comments

comment:20 in reply to:  18 Changed 6 years ago by Jeroen Demeyer

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 6 years ago by git

Commit: afe7062c48cbb75a0e871efa8002eec132837d39c60f495f900f6082a231003e5474d5f8fb29989c

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

c60f495remove commented out code

comment:22 Changed 6 years ago by Matthias Köppe

Status: needs_workneeds_review

comment:23 Changed 6 years ago by Jeroen Demeyer

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

comment:24 Changed 6 years ago by Jeroen Demeyer

Status: needs_reviewneeds_info

Why do you need the .serial files?

comment:25 in reply to:  24 ; Changed 6 years ago by Matthias Köppe

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 6 years ago by Matthias Köppe

Replying to jdemeyer:

Have you tested this version on OS X?

Yes

comment:27 in reply to:  25 Changed 6 years ago by Jeroen Demeyer

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 6 years ago by git

Commit: c60f495f900f6082a231003e5474d5f8fb29989c789437568284ba3dfe3f9e4d4526eaeb8a186f9f

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

7894375Add more documentation

comment:29 Changed 6 years ago by Matthias Köppe

Status: needs_infoneeds_review

comment:30 Changed 6 years ago by Matthias Köppe

enough documentation?

comment:31 Changed 6 years ago by Matthias Köppe

ping?

comment:32 Changed 6 years ago by Matthias Köppe

Cc: Dima Pasechnik added
Milestone: sage-7.3sage-7.4

comment:33 Changed 6 years ago by Volker Braun

Reviewers: Jeroen DemeyerJeroen Demeyer, Volker Braun
Status: needs_reviewpositive_review

comment:34 Changed 6 years ago by Volker Braun

Branch: u/mkoeppe/_sage__i_autotools__fails_because_libtool_2_4_3_requires_xz789437568284ba3dfe3f9e4d4526eaeb8a186f9f
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.