sagemath/sage

tox / GH Actions: Add centos-7-devtoolset-gcc_{9,10,11}

mkoeppe opened this issue · 21 comments

(from #30876)

centos-7 has EOL June 2024 and comes with the very outdated gcc 4.x, which we will not be able to use any more (see #32074)

We add variants centos-7-devtoolset-gcc_{9,10,11}, following https://stackoverflow.com/a/67212990/557937; to test:

tox -e docker-centos-7-devtoolset-gcc_11-standard

This prepares a switch from centos-7 to centos-7-devtoolset-gcc_11, as suggested by dimpase in #30876 comment:12
("nobody nowadays is using gcc 4 on Centos 7... We can and should drop gcc 4, without dropping OSs")

(This is not needed for fedora because even the oldest that we currently support, fedora-26, comes with GCC 7.1.1.)

Depends on #32966
Depends on #33306

CC: @dimpase

Component: porting

Author: Matthias Koeppe

Branch/Commit: d11dd6e

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/32965

Dependencies: #32966

Description changed:

--- 
+++ 
@@ -1,4 +1,8 @@
 (from #30876)
 
-see https://stackoverflow.com/a/67212990/557937
+`centos-7` has EOL June 2024 and comes with the very outdated gcc 4.x, which we will not be able to use any more (see #32074)
 
+We switch to variants `centos-7-devtoolset-gcc_{9,10,11}`, following  https://stackoverflow.com/a/67212990/557937
+
+(This is not needed for `fedora` because even the oldest that we currently support, `fedora-26`, comes with GCC 7.1.1.)
+

Changed dependencies from #32966 to #32966, #33306

Author: Matthias Koeppe

Last 10 new commits:

c62fc35build/pkgs/_prereq/distros/slackware.txt: Add packages needed on -current
e1a2d3atox.ini: Add centos-stream-{8,9}
5dd228etox.ini: Remove centos-6 (packages no longer available)
4978a3bMerge tag '9.5' into t/33196/tox_ini__add_centos_stream8__stream9
9286299Merge #33196
a5dca4atox.ini (centos-8): Remove
b1167bd.github/workflows/tox*.yml: Replace centos-8 by centos-stream-8
4898796.github/workflows/tox*.yml: Replace opensuse-15 (same as opensuse-15.3) by opensuse-15.2.1
6d1a0a5Merge #33306
9c8f6dbtox.ini (centos-7-devtoolset): New

Commit: 9c8f6db

Description changed:

--- 
+++ 
@@ -2,7 +2,13 @@
 
 `centos-7` has EOL June 2024 and comes with the very outdated gcc 4.x, which we will not be able to use any more (see #32074)
 
-We switch to variants `centos-7-devtoolset-gcc_{9,10,11}`, following  https://stackoverflow.com/a/67212990/557937
+We add variants `centos-7-devtoolset-gcc_{9,10,11}`, following  https://stackoverflow.com/a/67212990/557937; to test:
+
+```
+tox -e docker-centos-7-devtoolset-gcc_11-standard
+```
+This prepares a switch from `centos-7` to `centos-7-devtoolset-gcc_11`, as suggested by dimpase in [#30876 comment:12](https://github.com/sagemath/sage/issues/30876#comment:12)
+("nobody nowadays is using gcc 4 on Centos 7... We can and should drop gcc 4, without dropping OSs")
 
 (This is not needed for `fedora` because even the oldest that we currently support, `fedora-26`, comes with GCC 7.1.1.)
 
comment:9

Replying to @dimpase:

testing this on https://github.com/sagemath/sagetrac-mirror/actions/runs/1818122556

That's not testing anything related to the ticket because I have not changed .github/workflows/tox.yml

comment:10

OK, testing this now.

I wonder, by the way, whether it's possible to give docker images created meaningful names, and not these automatically assigned romantic_chebyshev etc.

comment:11

The images are already tagged with names such as sage-docker-centos-7-devtoolset-gcc_11-standard-with-targets. Probably you mean containers. The ones created as a side effect of building the images in tox do not matter.
If you run one of the built images in a new container using docker run -it sage-docker-centos-7-devtoolset-gcc_11-standard-with-targets:9.6.beta0-16-g9c8f6dbbb8-failed or such, you can use an option --name to give a name to the container.

comment:12

Replying to @mkoeppe:

The images are already tagged with names such as sage-docker-centos-7-devtoolset-gcc_11-standard-with-targets. Probably you mean containers. The ones created as a side effect of building the images in tox do not matter.

Well, they matter for debugging,say. And figuring this out by names might be a good idea.

comment:13

No, these containers are dead. They have been committed to tagged images already. For debugging purposes, you run a new container from that image.

comment:14

OK, it works

Reviewer: Dima Pasechnik

comment:15

Thanks!

comment:17

this needs a rebase

Changed commit from 9c8f6db to d11dd6e

Branch pushed to git repo; I updated commit sha1 and set ticket back to needs_review. New commits:

4e2d536build/bin/write-dockerfile.sh (ubuntu): Run apt-get update before installing software-properties-common
80057baMerge tag '9.6.beta0' into t/32966/tox___gh_actions__add_ubuntu_variants_using_ppa_ubuntu_toolchain_r
6bc45cebuild/bin/write-dockerfile.sh (debian) [EXTRA_REPOSITORY]: Also install gpg, gpg-agent
459749bMerge #33187
983b4a8src/doc/en/developer/portability_testing.rst: Document RAM needs for Docker containers
a78c109Merge #33103
f98e0dcbuild/bin/write-dockerfile.sh (debian) [EXTRA_REPOSITORY]: Do not fail if gpg, gpg-agent cannot be installed
d42bc03Merge tag '9.6.beta1' into t/32966/tox___gh_actions__add_ubuntu_variants_using_ppa_ubuntu_toolchain_r
d11dd6eMerge #32966