Opened 4 years ago

Last modified 3 months ago

#21566 new task

Task ticket: Make sage (the distribution) behave like a standard autotools package, to the extent possible — at Version 6

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.2
Component: build Keywords:
Cc: vbraun, jdemeyer, fbissey, embray, dimpase, was, mmezzarobba, thansen, gh-timokau, jhpalmieri, slabbe Merged in:
Authors: Matthias Koeppe Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by mkoeppe)

The goal of this ticket is to be able to explain to experienced Unix users what sage-the-distribution is, as follows:

If you download sage-the-distribution and do

./configure --prefix=/SOMEWHERE && make 

then that's the same as doing a sequence of about 100 times:

wget SOMEPACKAGE.tar.gz && tar xf SOMEPACKAGE.tar.gz && (cd SOMEPACKAGE \
&& ./configure --prefix=/SOMEWHERE && make && make install)

(and about a 50 times pip install SOMEPACKAGE). sage-the-distribution has figured out the right order of installing these packages, tricky configure options so that everything works, and on top has fixes for various outdated/handwritten/missing build systems of various packages.

Thus it is beyond the scope of this ticket:

  • to separate make and make install. Our make install is a no-op. ANY discussion of this needs to go to ticket #21495, not here.

We will implement this goal without sacrificing any of the traditional convenience features that Sage-the-distribution has provided for the casual user (such as sage -i for installing packages).

We have a separate task ticket for the following:

  • #21507: Make sagelib (sage-the-Python-library) a normal Python package, installable by, pip, etc. and eventually even via PyPI. We will NOT turn sagelib to an automake package (which was proposed in #14807).

(There will be some interaction with some of the steps of that ticket.)

Included on this ticket are the following steps.

Implement standard features expected of an autotools build system.

  • Choosing the installation hierarchy (configure --prefix=SAGE_LOCAL). Right now it is the subdirectory local of SAGE_ROOT.
    • #21501: Allow SAGE_LOCAL to be customized
    • #21534: Allow SAGE_LOCAL to be customized - follow-up
    • #21479: ./configure --prefix=SAGE_LOCAL
  • By allowing the user to choose the installation hierarchy, there are new requirements. What is installed there should run without requiring environment variables to be set. It should not refer to SAGE_ROOT (or SAGE_SRC_ROOT), except perhaps for "debugging" or "source inspection" facilities:
    • #21525: package autotools: Don't depend on $SAGE_LOCAL
    • #21509: Install cython_debug somewhere in SAGE_LOCAL
  • #21539: make V=0 should silence the build
  • #21589: Make make V=0 the default by ./configure --enable-silent-rules
  • #21469: Enable VPATH builds (SAGE_SRC_ROOT/configure --srcdir=SAGE_SRC_ROOT)
  • #21538: ./configure --with-packages=...
  • Various other configure options, to replace use of environment variables that influence the build.

Clean up parts of the build system to make it more standard. This is to make it straightforward for developers familiar with the autotools system to contribute to sage.

  • #21532: Create SAGE_LOCAL directory hierarchy during make, not configure
  • #21524: write build/make/Makefile within an AC_CONFIG_COMMANDS, not during main configure

Make the separation between sage-the-distribution and sagelib (sage-the-Python-library) clearer. This will be beneficial for distributions such as Debian etc.

  • #21559: Move sage-the-distribution scripts from src/bin to build/bin
  • #21565: Add src/README.txt and build/README.txt

Following are workarounds to enable root-owned installation hierarchies (prefix).

  • #21537: If $SAGE_SUDO is set, use it whenever we do make install of a package
  • #21536: documentation: Recommend GNU stow to people who want to install to /usr/local

Change History (6)

comment:1 Changed 4 years ago by mkoeppe

  • Cc was added

comment:2 Changed 4 years ago by mmezzarobba

  • Cc mmezzarobba added

comment:3 follow-up: Changed 4 years ago by mmezzarobba

Do you intend ./configure to detect already installed dependencies so that make skips installing them? (Eventually? as part of this task?) For example, is the idea that ./configure would finish by saying something like “the following dependencies are missing: ... please install them, or type make and I'll install my own copy”? (This wouldn't be quite standard, but close enough, while staying mostly compatible with the installation procedure of sage-the-distribution.)

Or would sage-the-distribution still always have its private version of everything, so that users would have to choose between installing it and installing sagelib directly (e.g., via pip)?

Last edited 4 years ago by mmezzarobba (previous) (diff)

comment:4 Changed 4 years ago by embray

(Sorry, the comment that was here previously was meant to go on #21507 -- I have too many tabs open)

Last edited 4 years ago by embray (previous) (diff)

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

Replying to mmezzarobba:

Do you intend ./configure to detect already installed dependencies so that make skips installing them? (Eventually? as part of this task?)

That is beyond the scope of this task ticket. But I would be interested in a follow-up ticket to this effect.

comment:6 Changed 4 years ago by mkoeppe

  • Description modified (diff)
Note: See TracTickets for help on using tickets.