Upgrade gcc to 10.3 (latest 10.x)
mkoeppe opened this issue · 26 comments
Follow-up from #29674 (fedora-32: If gcc 10 is found, install gcc spkg; fix building gcc (9.2.0) spkg with gcc 10). As noted there, on many systems, building --without-system-gcc fails.
gcc 10.3 was released 2021-04-08.
Potentially helpful for fedora-34 (released end of April 2021), which uses gcc 11, which our configure script rejects.
We also need a newer gcc to provide a gfortran for macOS builds (homebrew-macos-minimal, macos-nohomebrew) on Big Sur
homebrew:
- uses this patch for GCC 10.2: https://raw.githubusercontent.com/Homebrew/formula-patches/6a83f36d/gcc/bigsur_2.patch
- notes in https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L53: "Patch for Big Sur, remove with GCC 10.3 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98805"
macports:
See also:
- https://gcc.gnu.org/gcc-10/changes.html
- Attempted upgrade to 9.3.0: #29827 (abandoned)
CC: @zlscherr @jhpalmieri @dimpase @vbraun @kiwifb @enriqueartal
Component: packages: standard
Author: Matthias Koeppe
Branch/Commit: 22c050a
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/29703
Description changed:
---
+++
@@ -1,2 +1,4 @@
Follow-up from #29674 (fedora-32: If gcc 10 is found, install gcc spkg; fix building gcc (9.2.0) spkg with gcc 10). As noted there, on many systems, building `--without-system-gcc` fails.
+Upgrade to 9.3.0: #29827
+Description changed:
---
+++
@@ -1,4 +1,4 @@
Follow-up from #29674 (fedora-32: If gcc 10 is found, install gcc spkg; fix building gcc (9.2.0) spkg with gcc 10). As noted there, on many systems, building `--without-system-gcc` fails.
-Upgrade to 9.3.0: #29827
+- Attempted upgrade to 9.3.0: #29827
Description changed:
---
+++
@@ -1,4 +1,12 @@
Follow-up from #29674 (fedora-32: If gcc 10 is found, install gcc spkg; fix building gcc (9.2.0) spkg with gcc 10). As noted there, on many systems, building `--without-system-gcc` fails.
-- Attempted upgrade to 9.3.0: #29827
+We also need a newer gcc to provide a gfortran for macOS builds (`homebrew-macos-minimal`, `macos-nohomebrew`) on Big Sur
+homebrew:
+- uses this patch for GCC 10.2: https://raw.githubusercontent.com/Homebrew/formula-patches/6a83f36d/gcc/bigsur_2.patch
+- notes in https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L53: "Patch for Big Sur, remove with GCC 10.3 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98805"
+
+See also:
+- https://gcc.gnu.org/gcc-10/changes.html
+- Attempted upgrade to 9.3.0: #29827 (abandoned)
+Description changed:
---
+++
@@ -6,6 +6,9 @@
- uses this patch for GCC 10.2: https://raw.githubusercontent.com/Homebrew/formula-patches/6a83f36d/gcc/bigsur_2.patch
- notes in https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc.rb#L53: "Patch for Big Sur, remove with GCC 10.3 - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98805"
+macports:
+- https://github.com/macports/macports-ports/commit/53ad57cd08c5971b5a92df34d84e62589bc006b4
+
See also:
- https://gcc.gnu.org/gcc-10/changes.html
- Attempted upgrade to 9.3.0: #29827 (abandoned)Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.
Description changed:
---
+++
@@ -1,4 +1,6 @@
Follow-up from #29674 (fedora-32: If gcc 10 is found, install gcc spkg; fix building gcc (9.2.0) spkg with gcc 10). As noted there, on many systems, building `--without-system-gcc` fails.
+
+Critical for `fedora-34` (released end of April 2021), which uses gcc 11, which our configure script rejects.
We also need a newer gcc to provide a gfortran for macOS builds (`homebrew-macos-minimal`, `macos-nohomebrew`) on Big Sur
Description changed:
---
+++
@@ -1,4 +1,6 @@
Follow-up from #29674 (fedora-32: If gcc 10 is found, install gcc spkg; fix building gcc (9.2.0) spkg with gcc 10). As noted there, on many systems, building `--without-system-gcc` fails.
+
+gcc 10.3 was released 2021-04-08.
Critical for `fedora-34` (released end of April 2021), which uses gcc 11, which our configure script rejects.
Author: Matthias Koeppe
local build (with make gcc) fails on homebrew-macos
In file included from ../../src/gcc/gengtype.c:26:
../../src/gcc/system.h:544:20: error: conflicting declaration of C function 'const char* strsignal(int)'
544 | extern const char *strsignal (int);
| ^~~~~~~~~
In file included from /Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/tmp/sage/build/gcc-10.3.0/gcc-build/prev-x86_64-apple-darwin19.6.0/libstdc++-v3/include/cstring:42,
from ../../src/gcc/system.h:235,
from ../../src/gcc/gengtype.c:26:
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/string.h:134:7: note: previous declaration 'char* strsignal(int)'
134 | char *strsignal(int __sig);
| ^~~~~~~~~
make[6]: *** [build/sort.o] Error 1
make[6]: *** [build/gengtype-parse.o] Error 1
make[6]: *** [build/gengenrtl.o] Error 1
But it did not work with the previous version either.
Looking fine for Linux and macOS (-minimal configurations where we build gfortran from the spkg) - https://github.com/mkoeppe/sage/runs/2494424419
However, this upgrade does NOT fix #31624 (fedora-34-standard: eclib, singular build failures with system ntl). https://github.com/mkoeppe/sage/runs/2494425736
So there is no urgency to this upgrade.
Description changed:
---
+++
@@ -2,7 +2,7 @@
gcc 10.3 was released 2021-04-08.
-Critical for `fedora-34` (released end of April 2021), which uses gcc 11, which our configure script rejects.
+Potentially helpful for `fedora-34` (released end of April 2021), which uses gcc 11, which our configure script rejects.
We also need a newer gcc to provide a gfortran for macOS builds (`homebrew-macos-minimal`, `macos-nohomebrew`) on Big Sur
... unless this helps with Big Sur?
let's not duplicate the efforts of Homebree and Conda...
In any case... needs review
Changed reviewer from https://github.com/mkoeppe/sage/actions/runs/807684403, https://github.com/mkoeppe/sage/actions/runs/807684401, https://github.com/mkoeppe/sage/actions/runs/807684408 to Dima Pasechnik
good to get rid of patches.
Thanks
Replying to @dimpase:
let's not duplicate the efforts of Homebree and Conda...
And here we go. Our Sage 9.3 does not build with Big Sur / Homebrew - as just reported https://groups.google.com/g/sage-devel/c/Yut08rvqgvg/m/9uD4W6hFBAAJ
we need a proper formula for building Sage using Homebrew, then we can pin versions of dependencies etc.
Downstream packaging is traditionally considered not part of the upstream project. But if you want to work on it, this would certainly be valuable to some mac users. But lots of packages are missing on homebrew, so you'd be ... duplicating packaging work that has already been done in conda-forge.
Changed branch from u/mkoeppe/upgrade_gcc_to_10_3__latest_10_x___fix___without_system_gcc_builds to 22c050a