@@ -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: $ make reconfigure
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
@@ -1204,13 +1209,13 @@ Using our pre-built Docker images for development in VS Code
1204
1209
1205
1210
`VS Code <https://code.visualstudio.com/ >`_ is very
1206
1211
convenient for developing with Docker containers thanks to the `Visual
1207
- Studio Code Remote - Containers
1208
- <https://code.visualstudio.com/docs/remote /containers> `_ extension.
1212
+ Studio Code Dev Containers
1213
+ <https://code.visualstudio.com/docs/devcontainers /containers> `_ extension.
1209
1214
1210
1215
If the extension is not already installed, then in VS Code, click the
1211
1216
"Extension" icon on the left (or press :kbd: `Ctrl ` + :kbd: `Shift ` + :kbd: `X `;
1212
1217
on macOS, :kbd: `Command ` + :kbd: `Shift ` + :kbd: `X `) to open a list of
1213
- extensions. Search for "Remote - Containers" and install it.
1218
+ extensions. Search for "Dev Containers" and install it.
1214
1219
1215
1220
The extension needs a ``devcontainer.json `` configuration file to work. Sage
1216
1221
provides sample ``devcontainer.json `` configuration files
@@ -1220,11 +1225,11 @@ purpose.
1220
1225
1221
1226
If you open the sage folder in VS Code, it may prompt you whether you would like to open the current
1222
1227
directory in the dev container (yes). If it does not, use the command palette
1223
- (:kbd: `Ctrl ` + :kbd: `Shift ` + :kbd: `P `), enter the command "Remote- Containers:
1228
+ (:kbd: `Ctrl ` + :kbd: `Shift ` + :kbd: `P `), enter the command "Dev Containers:
1224
1229
Reopen Folder in Container" , and hit :kbd: `Enter `.
1225
1230
1226
1231
If the above ``code . `` command does not work, start VS Code as a regular
1227
- application, then in the command palette of VS Code, enter "Remote- Containers:
1232
+ application, then in the command palette of VS Code, enter "Dev Containers:
1228
1233
Open Folder in Container", and hit :kbd: `Enter `, and choose the directory
1229
1234
``$SAGE_ROOT `` of your local Sage repository.
1230
1235
@@ -1271,7 +1276,7 @@ in a terminal, `open a new terminal in VS Code
1271
1276
``configure `` script.
1272
1277
1273
1278
You can edit a copy of the configuration file to change to a different platform, another
1274
- version, or build stage. After editing the configuration file, run "Remote- Containers: Rebuild Container" from the command
1279
+ version, or build stage. After editing the configuration file, run "Dev Containers: Rebuild Container" from the command
1275
1280
palette. See the `VS Code devcontainer.json reference
1276
1281
<https://code.visualstudio.com/docs/remote/devcontainerjson-reference> `_
1277
1282
and the `GitHub introduction to dev containers
0 commit comments