@@ -9,7 +9,7 @@ Testing on Multiple Platforms
9
9
=============================
10
10
11
11
Sage is intended to build and run on a variety of platforms,
12
- including all major Linux distributions, as well as MacOS , and
12
+ including all major Linux distributions, as well as macOS , and
13
13
Windows (with WSL).
14
14
15
15
There is considerable variation among these platforms.
@@ -128,9 +128,9 @@ Typical Docker images provide minimal installations of packages only::
128
128
129
129
As you can see above, the image ``ubuntu:latest `` has neither a Python nor
130
130
a GCC installed, which are among the build prerequisites of Sage. We
131
- need to install them using the distribution's package manager first.
131
+ need to install them using the Linux distribution's package manager first.
132
132
133
- Sage facilitates testing various distributions on Docker as follows.
133
+ Sage facilitates testing various Linux distributions on Docker as follows.
134
134
135
135
Discovering the system's package system
136
136
---------------------------------------
@@ -142,7 +142,7 @@ Discovering the system's package system
142
142
143
143
Let's install gcc, hoping that the Ubuntu package providing it is
144
144
simply named ``gcc ``. If we forgot what the package manager on
145
- Debian-derived distributions is called, we can ask Sage for a
145
+ Debian-derived Linux distributions is called, we can ask Sage for a
146
146
reminder::
147
147
148
148
root@39d693b2a75d:/sage# build/bin/sage-print-system-package-command debian install gcc
@@ -190,7 +190,8 @@ example, the file ``build/pkgs/_prereq/distros/debian.txt`` contains the followi
190
190
From this information, we know that we can use the following command
191
191
on our container to install the necessary build prerequisites::
192
192
193
- root@39d693b2a75d:/sage# apt-get install binutils make m4 perl python3 tar bc gcc g++ ca-certificates
193
+ root@39d693b2a75d:/sage# apt-get install binutils make m4 perl python3 \
194
+ tar bc gcc g++ ca-certificates
194
195
Reading package lists... Done
195
196
Building dependency tree
196
197
Reading state information... Done
@@ -208,7 +209,8 @@ Now we can start the build::
208
209
root@39d693b2a75d:/sage# ./configure
209
210
checking for a BSD-compatible install... /usr/bin/install -c
210
211
checking for root user... yes
211
- configure: error: You cannot build Sage as root, switch to an unprivileged user. (If building in a container, use --enable-build-as-root.)
212
+ configure: error: You cannot build Sage as root, switch to an unprivileged user.
213
+ (If building in a container, use --enable-build-as-root.)
212
214
213
215
Let's just follow this helpful hint::
214
216
@@ -225,14 +227,16 @@ Using Sage's database of equivalent distribution packages
225
227
At the end of the ``./configure `` run, Sage issued a message like the
226
228
following::
227
229
228
- configure: notice: the following SPKGs did not find equivalent system packages: arb boost_cropped bzip2 ... zeromq zlib
230
+ configure: notice: the following SPKGs did not find equivalent system packages:
231
+ arb boost_cropped bzip2 ... zeromq zlib
229
232
checking for the package system in use... debian
230
- configure: hint: installing the following system packages is recommended and may avoid building some of the above SPKGs from source:
233
+ configure: hint: installing the following system packages is recommended and
234
+ may avoid building some of the above SPKGs from source:
231
235
configure: $ sudo apt-get install libflint-arb-dev ... libzmq3-dev libz-dev
232
236
configure: After installation, re-run configure using:
233
237
configure: $ ./config.status --recheck && ./config.status
234
238
235
- This information comes from Sage's database of equivalent distribution
239
+ This information comes from Sage's database of equivalent system
236
240
packages. For example::
237
241
238
242
root@39d693b2a75d:/sage# ls build/pkgs/arb/distros/
@@ -268,9 +272,9 @@ corresponding to its current state::
268
272
269
273
root@39d693b2a75d:/sage# ^D
270
274
[mkoeppe@sage worktree-ubuntu-latest]$ docker ps -a | head -n3
271
- CONTAINER ID IMAGE COMMAND CREATED STATUS
272
- 39d693b2a75d ubuntu:latest "/bin/bash" 8 minutes ago Exited (0) 6 seconds ago
273
- 9f3398da43c2 ubuntu:latest "/bin/bash" 8 minutes ago Exited (0) 8 minutes ago
275
+ CONTAINER ID IMAGE COMMAND CREATED STATUS
276
+ 39d693b2a75d ubuntu:latest "/bin/bash" 8 minutes ago Exited (0) 6 seconds ago
277
+ 9f3398da43c2 ubuntu:latest "/bin/bash" 8 minutes ago Exited (0) 8 minutes ago
274
278
[mkoeppe@sage worktree-ubuntu-latest]$ docker commit 39d693b2a75d ubuntu-latest-minimal-17
275
279
sha256:4151c5ca4476660f6181cdb13923da8fe44082222b984c377fb4fd6cc05415c1
276
280
@@ -506,7 +510,8 @@ might not work on all platforms, ``surf``, which was marked as
506
510
...
507
511
Makefile:31: recipe for target 'surf' failed
508
512
make: *** [surf] Error 1
509
- The command '/bin/sh -c make SAGE_SPKG="sage-spkg -y -o" ${USE_MAKEFLAGS} ${TARGETS_PRE}' returned a non-zero code: 2
513
+ The command '/bin/sh -c make SAGE_SPKG="sage-spkg -y -o" ${USE_MAKEFLAGS} ${TARGETS_PRE}'
514
+ returned a non-zero code: 2
510
515
511
516
Note that no image id is shown at the end; the build failed, and no
512
517
image is created. However, the container in which the last step of
@@ -688,11 +693,11 @@ the one just after running the ``configure`` script (``configured``)::
688
693
689
694
Let's verify that the images are available::
690
695
691
- (base) egret:~/s/ sage/sage-rebasing/worktree-algebraic-2018-spring (mkoeppe *$%>) $ docker images | head
692
- REPOSITORY TAG IMAGE ID
693
- sage-centos-8-standard-with-targets 9.1.beta9-435-g861ba33bbc-dirty 7ecfa86fceab
694
- sage-centos-8-standard-configured 9.1.beta9-435-g861ba33bbc-dirty 4314929e2b4c
695
- sage-centos-8-standard-with-system-packages 9.1.beta9-435-g861ba33bbc-dirty 4bb14c3d5646
696
+ [mkoeppe@ sage sage] $ docker images | head
697
+ REPOSITORY TAG IMAGE ID
698
+ sage-centos-8-standard-with-targets 9.1.beta9-435-g861ba33bbc-dirty 7ecfa86fceab
699
+ sage-centos-8-standard-configured 9.1.beta9-435-g861ba33bbc-dirty 4314929e2b4c
700
+ sage-centos-8-standard-with-system-packages 9.1.beta9-435-g861ba33bbc-dirty 4bb14c3d5646
696
701
...
697
702
698
703
0 commit comments