Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Merge tag '9.1.rc1' into t/29530/make_docker_images_generated_by_gith…
Browse files Browse the repository at this point in the history
…ub_ci_workflows_available

SageMath version 9.1.rc1, Release Date: 2020-04-22
  • Loading branch information
Matthias Koeppe committed Apr 22, 2020
2 parents 02f86f6 + 249fc90 commit 00a82b0
Show file tree
Hide file tree
Showing 133 changed files with 3,231 additions and 1,225 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ sageruntime: base-toolchain
# except for build/make/Makefile-auto, which is unused by the build system
CONFIG_FILES = build/make/Makefile src/Makefile src/bin/sage-env-config build/bin/sage-build-env-config build/pkgs/sage_conf/src/sage_conf.py build/pkgs/sage_conf/src/setup.cfg

# SPKG_COLLECT_FILES contains all files that influence the SAGE_SPKG_COLLECT macro
SPKG_COLLECT_FILES = build/pkgs/*/type build/pkgs/*/package-version.txt build/pkgs/*/dependencies build/pkgs/*/requirements.txt build/pkgs/*/checksums.ini build/pkgs/*/spkg-install

# If configure was run before, rerun it with the old arguments.
# Otherwise, run configure with argument $PREREQ_OPTIONS.
build/make/Makefile: configure build/make/deps build/pkgs/*/* $(CONFIG_FILES:%=%.in)
build/make/Makefile: configure build/make/deps $(SPKG_COLLECT_FILES) $(CONFIG_FILES:%=%.in)
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
Expand Down Expand Up @@ -200,7 +203,7 @@ ptestoptional: all
ptestoptionallong: all
$(PTESTALL) --long --logfile=logs/ptestoptionallong.log

configure: bootstrap src/doc/bootstrap configure.ac src/bin/sage-version.sh m4/*.m4 build/pkgs/*/spkg-configure.m4 build/pkgs/*.txt build/pkgs/*/distros/*.txt
configure: bootstrap src/doc/bootstrap configure.ac src/bin/sage-version.sh m4/*.m4 build/pkgs/*/spkg-configure.m4 build/pkgs/*/type build/pkgs/*.txt build/pkgs/*/distros/*.txt
./bootstrap -d

install: all
Expand Down
97 changes: 52 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ you extracted the binary archive and type:

./sage

(Note that the first run will take more time, as Sage needs to get itself ready.)

If you downloaded the [sources](https://www.sagemath.org/download-source.html),
please read below on how to build Sage and work around common issues.

Expand All @@ -34,21 +36,18 @@ or ask on [ask.sagemath.org](https://ask.sagemath.org).
Contributing to Sage
--------------------

If you'd like to contribute to Sage, be sure to read the
If you'd like to contribute to Sage, we strongly recommend that you read the
[Developer's Guide](https://doc.sagemath.org/html/en/developer/index.html).

Supported Platforms
-------------------

Sage fully supports several Linux distributions, recent versions of
Mac OS X, Windows (using virtualization), as well as a number of
Solaris and OpenSolaris releases.

Ports are in progress to some other, less common platforms. The list of
supported platforms and their current statuses are given in [our wiki](https://wiki.sagemath.org/SupportedPlatforms).
Sage fully supports all major Linux distributions, recent versions of
MacOS, and Windows (using Cygwin or using virtualization).

If you are interested in helping port Sage to a new platform, please let
us know at the [sage-devel mailing list](https://groups.google.com/group/sage-devel).
We highly appreciate contributions to Sage that fix portability bugs
and help port Sage to new platforms; let us know at the [sage-devel
mailing list](https://groups.google.com/group/sage-devel).

Quick Instructions to Build from Source
---------------------------------------
Expand All @@ -69,47 +68,67 @@ files installed

1. Make sure you have the dependencies and 5 GB of free disk space

* __All Linux versions:__ gcc, make, m4, perl, ranlib, git, and tar (a
matching set of gcc, gfortran and g++ will avoid the compilation
of Sage-specific compilers). It should also be possible to use clang/clang++,
* __All Linux versions:__ gcc, gfortran, g++ (a matching set of these three
will avoid the compilation of Sage-specific compilers - unless they are too old),
make, m4, perl, ranlib, git, and tar. It should also be possible to use clang/clang++,
however this is less well-tested.

* __Fedora or RedHat systems:__ the perl-ExtUtils-MakeMaker package.
(install these using your package manager)

* __OS X:__
* __MacOS:__
* Make sure you have installed the most recent version
of Xcode which you can install for free from the App Store.
* You also need to install the "command line tools". When
using OS X Mavericks, after installing Xcode, run
using Mavericks, after installing Xcode, run
`xcode-select --install` from a terminal window:
Then click "Install" in the pop-up window.
When using OS X Mountain Lion or earlier, you need to install the
When using Mountain Lion or earlier, you need to install the
command line tools from Xcode: run Xcode; then from the File
menu, choose "Preferences", then the "Downloads" tab, and then
"Install" the Command Line Tools. You might also have Homebrew or
a similar "Apple's missing package manager" system installed, with
and libraries such gfortran, gmp, etc installed. (However, this
is still experimental as of May 2019).
is still experimental as of April 2020).

* __Other platforms:__ See detailed instructions below.

1. It might be desirable, it terms of faster building and better portability,
to install, as system packages, an ever increasing [list of Sage packages](https://trac.sagemath.org/ticket/27330)
which otherwise might have to be built. The following is a list of Sage packages
"replaceable" by system's packages as of Sage release 8.8:
`bzip2`, `curl`, `cmake`, `gcc/clang`, `gf2x`, `gfortran` (usually part of `gcc` installation),
`git`, `gmp`, `libffi`, `patch`, `pcre`, `perl_term_readline_gnu`, `xz/lzma`, `yasm`, `zeromq`, `zlib`.
Details and names of system packages containing these are system-dependent. E.g. on Debian
`bzip2` lives in `libbz2-dev`. More details on this are in Installation manual.
which otherwise might have to be built.
Details and names of system packages containing these Sage ones are system-dependent. E.g. on Debian
`bzip2` lives in `libbz2-dev`. More details on this are in Installation manual,
and also printed by the `./configure` script (see below).

1. Extract the tarball

tar zxvf sage-*.tar.gz

1. cd into the Sage directory and type make
1. cd into the Sage directory and

cd sage-*/

1. Optionally, review the configuration options, which includes
many optional packages:

./configure --help

1. type ./configure

./configure

1. At the end of a successful ./configure run, you may see messages
recommending to install extra system packages using your package
manager. Only the most recent releases of your distribution will
have all of these packages. If you choose to install the system
packages, a re-run of ./configure will test whether the versions
installed are usable for Sage; if they are, this will reduce the
compilation time and disk space needed by Sage. The usage of packages
may be adjusted by `./configure` parameters (check out the output of
`./configure -h`)

1. Type make

make

That's it! Everything is automatic and non-interactive. The build
Expand Down Expand Up @@ -146,18 +165,16 @@ More Detailed Instructions to Build from Source

* __Linux:__ See quick instructions above.

* __OS X:__ (a.k.a __MacOS__) Make sure you have a recent Xcode version.
* __MacOS:__ Make sure you have a recent Xcode version.
If you don't, go to https://developer.apple.com/,
sign up, and download the free Xcode package. Usually, Xcode's command line
tools suffice to build Sage, although several times new releases of Xcode broke this.
Only OS X >= 10.4 is supported, and (as of May 2019) we only test Sage on OS X >= 10.6.

* __Solaris and OpenSolaris:__ Building Sage on these platforms is more
tricky than on Linux or OS X. For details on how to build Sage on
these platforms, see [our wiki](https://wiki.sagemath.org/solaris) (outdated as of May 2019).
Only MacOS >= 10.4 is supported, and (as of May 2019) we only test Sage on MacOS >= 10.6.

* __Windows:__ [Download and install VirtualBox](https://www.virtualbox.org/wiki/Downloads),
and then download the [Sage virtual appliance](https://wiki.sagemath.org/SageAppliance).
and then download the [Sage virtual appliance](https://wiki.sagemath.org/SageAppliance). Or install
[Cygwin](http://cygwin.com) and follow [Installation Guide](https://doc.sagemath.org/html/en/installation)
and [Wiki](https://trac.sagemath.org/wiki/Cygwin64Port).

* __NOTE:__ On some operating systems, it might be necessary to install
gas/as, gld/ld, gnm/nm. On most platforms, these are automatically
Expand Down Expand Up @@ -235,16 +252,6 @@ More Detailed Instructions to Build from Source
ImageMagick tools (e.g. the "convert" command) installed since some
plotting functionality benefits from it.

1. Optional: Read this if you are intending to run a Sage notebook
server for multiple users. For security (i.e., to run
`notebook(secure=True)`) you want to access the server using the
HTTPS protocol. First, install OpenSSL and the OpenSSL development
headers on your system if they are not already installed. Then
install pyOpenSSL by building Sage and then typing
`./sage -i pyopenssl`.
Note that this command requires internet access. Alternatively,
`make ssl` builds Sage and installs pyOpenSSL.

Troubleshooting
---------------

Expand Down Expand Up @@ -283,7 +290,7 @@ by running `./configure` with option `--without-system-gcc`.
There are some known problems with old assemblers, in particular when
building the ECM package. You should ensure that your assembler
understands all instructions for your processor. On Linux, this means
you need a recent version of binutils; on OS X you need a recent version
you need a recent version of binutils; on MacOS you need a recent version
of Xcode.

Directory Layout
Expand Down Expand Up @@ -415,15 +422,15 @@ install. You can make changes to documentation, source, etc., and very
easily package the complete results up for redistribution just like we
do.

1. To make your own source tarball of Sage, type:
1. To make a binary distribution with your currently installed packages,
visit [sagemath/binary-pkg](https://github.com/sagemath/binary-pkg).

1. (**Obsolete, probably broken**) To make your own source tarball of Sage, type:

sage --sdist

The result is placed in the directory `dist/`.

2. To make a binary distribution with your currently installed packages,
visit [sagemath/binary-pkg](https://github.com/sagemath/binary-pkg).


Changes to Included Software
----------------------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 9.1.rc0, Release Date: 2020-04-12
SageMath version 9.1.rc1, Release Date: 2020-04-22
12 changes: 6 additions & 6 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ install_config_rpath() {
bootstrap () {
rm -f m4/sage_spkg_configures.m4
spkg_configures=""
for filename in $(find build/pkgs -type f -name spkg-configure.m4 | sort); do
pkgname="$(echo $filename | cut -d/ -f3)"
echo "m4_sinclude([$filename])" >> m4/sage_spkg_configures.m4
spkg_configures="$spkg_configures
SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
done
for filename in $(find build/pkgs -type f -name type); do
pkgtype="$(cat $filename)"
pkgname="$(echo $filename | cut -d/ -f3)"
Expand All @@ -90,6 +84,12 @@ SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
SAGE_SPKG_ENABLE([$pkgname], [$pkgtype])" ;;
esac
done
for filename in $(find build/pkgs -type f -name spkg-configure.m4 | sort); do
pkgname="$(echo $filename | cut -d/ -f3)"
echo "m4_sinclude([$filename])" >> m4/sage_spkg_configures.m4
spkg_configures="$spkg_configures
SAGE_SPKG_CONFIGURE_$(echo ${pkgname} | tr '[a-z]' '[A-Z]')"
done
echo "$spkg_configures" >> m4/sage_spkg_configures.m4

SAGE_ROOT="$SAGE_ROOT" src/doc/bootstrap && \
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ sdh_check_vars() {
while [ -n "$1" ]; do
[ -n "$(eval "echo "\${${1}+isset}"")" ] || sdh_die << _EOF_
${1} undefined ... exiting
Maybe run 'sage --sh'?
Maybe run 'sage --buildsh'?
_EOF_
shift
done
Expand Down
62 changes: 36 additions & 26 deletions build/bin/sage-print-system-package-command
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,45 @@ if [ -z "$system" -o -z "$command" ]; then
fi
shift 2
system_packages="$*"
if [ -z "$system_packages" ]; then
shopt -s extglob
if [ -n "$system_packages" ]; then
# No command needed to install nothing
exit 0
case $system:$command in
debian*|ubuntu*)
echo "sudo apt-get $command $system_packages"
;;
@(fedora*|redhat*|centos*):install)
echo "sudo yum install $system_packages"
;;
arch*:install)
echo "sudo pacman -S $system_packages"
;;
*conda*:install)
echo "conda install $system_packages"
;;
homebrew*:install)
echo "brew install $system_packages"
echo "# Afterwards: "
;;
slackware*:install)
echo "sudo slackpkg install $system_packages"
;;
cygwin*:install)
echo "# first install apt-cyg from https://github.com/transcode-open/apt-cyg"
echo "apt-cyg install $system_packages"
;;
*)
echo "# $command the following packages: $system_packages"
;;
esac
fi
shopt -s extglob
# Messages that should go out even if not packages need to be installed
case $system:$command in
debian*|ubuntu*)
echo "sudo apt-get $command $system_packages"
;;
@(fedora*|redhat*|centos*):install)
echo "sudo yum install $system_packages"
;;
arch*:install)
echo "sudo pacman -S $system_packages"
;;
*conda*:install)
echo "conda install $system_packages"
;;
homebrew*:install)
echo "brew install $system_packages"
;;
slackware*:install)
echo "sudo slackpkg install $system_packages"
;;
cygwin*:install)
echo "# first install apt-cyg from https://github.com/transcode-open/apt-cyg"
echo "apt-cyg install $system_packages"
;;
*)
echo "# $command the following packages: $system_packages"
echo "# To automatically take care of homebrew messages regarding "
echo "# keg-only packages for the current shell session:"
[ -n "$SAGE_ROOT" ] || SAGE_ROOT=.
echo "# $ source $SAGE_ROOT/.homebrew-build-env"
echo "# Add this to your shell profile if you want it to persist between shell sessions."
;;
esac
15 changes: 1 addition & 14 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ If you want to try to fix the problem yourself, *don't* just cd to
`pwd` and type '$2' or whatever is appropriate.
Instead, the following commands setup all environment variables
correctly and load a subshell for you to debug the error:
(cd '`pwd`' && '$SAGE_ROOT/sage' --sh)
(cd '`pwd`' && '$SAGE_ROOT/sage' --buildsh)
When you are done debugging, you can type "exit" to leave the subshell.
MESSAGE
fi
Expand Down Expand Up @@ -786,19 +786,6 @@ for script in $WRAPPED_SCRIPTS; do

if [ -f "$script.in" ]; then
if [ "$USE_LOCAL_SCRIPTS" = "yes" ]; then
if [ -x "$script.in" ]; then
msg="$script.in should not be marked executable in the build/pkgs directory"
if [ "$UNAME" = "CYGWIN" ]; then
# On Cygwin we can't necessarily rely on file permissions
# being sane, so just issue a warning; on other platforms
# this should be enforced as an error
echo >&2 "WARNING: $msg"
else
error_msg "$msg"
exit 1
fi
fi

write_script_wrapper "$(pwd)/$script" "$script_dir"
else
if [ ! -x "$script" ]; then
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=e9aafd5119e55927f7fff8e4dfd6c3c45fad41e1
md5=4fb90ed37625aaaf2e78cecb3acc77cb
cksum=1874797019
sha1=4e229f01e58451cce917d20718584565fc37a395
md5=5f227165cf7fd23ed7e0fe890a7c1b1e
cksum=2087518725
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b351e65d3d5129e3abfa6020afa1f6150bd1feef
358caa9bccf45c8142c77d0bcf38dc6e44df8dfd
3 changes: 1 addition & 2 deletions build/pkgs/cygwin.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ binutils
make
m4
# a system python is needed for downloading the sage packages, https://trac.sagemath.org/ticket/29090
# as of #27824, we use python3 for venv as well
python37-urllib python37-devel python37
python37-urllib python37
perl
perl-ExtUtils-MakeMaker
tar
Expand Down
3 changes: 3 additions & 0 deletions build/pkgs/cysignals/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cd src

# #29473: Override -Wp,-D_FORTIFY_SOURCE from Fedora's python3.
export CPPFLAGS="$CPPFLAGS -Wp,-U_FORTIFY_SOURCE"

if [ "$SAGE_DEBUG" = yes ]; then
CYSIGNALS_CONFIGURE="--enable-debug $CYSIGNALS_CONFIGURE"
fi
Expand Down
Loading

0 comments on commit 00a82b0

Please sign in to comment.