Opened 7 months ago

Closed 4 months ago

#31786 closed enhancement (fixed)

Accept gcc 11 (for fedora 34)

Reported by: mkoeppe Owned by:
Priority: blocker Milestone: sage-9.4
Component: build Keywords:
Cc: gh-zlscherr, jhpalmieri, dimpase, fbissey, enriqueartal, vbraun Merged in:
Authors: Matthias Koeppe Reviewers: Dima Pasechnik
Report Upstream: N/A Work issues:
Branch: f47c47e (Commits, GitHub, GitLab) Commit: f47c47e4560c449524a77daa7cc17f4e630e8483
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

After having resolved the following blockers:

... we accept gcc 11 again. This will allow building Sage with the default compilers on Fedora 34 and other platforms.

Not so urgent:

Change History (36)

comment:1 Changed 7 months ago by fbissey

I didn't have any problems in Gentoo with eclib and ntl.

comment:2 Changed 7 months ago by fbissey

  • Description modified (diff)

comment:3 Changed 7 months ago by fbissey

  • Description modified (diff)

Note that issue of standard do not arise in vanilla sage since we enforce std=c++11. However, issues with headers are not prevented by sticking to that standard, which means the following have to be fixed in any case:

  • fplll
  • pynac
  • lcalc

Others can be delayed.

comment:4 Changed 7 months ago by mkoeppe

  • Description modified (diff)

comment:5 Changed 7 months ago by mkoeppe

  • Description modified (diff)

comment:6 Changed 7 months ago by mkoeppe

  • Description modified (diff)

comment:7 Changed 7 months ago by mkoeppe

  • Description modified (diff)

comment:8 Changed 7 months ago by mkoeppe

  • Branch set to u/mkoeppe/meta_ticket__support_gcc_11__fedora_34_

comment:9 Changed 7 months ago by mkoeppe

  • Commit set to 5486f814f2b1b2210ca253b6b4c342b9b1a0bc8f
  • Description modified (diff)

New commits:

2e8fe53build/pkgs/{gcc,gfortran}/spkg-configure.m4: Accept gcc 11.x
956ddccbuild/pkgs/fplll: Update to 5.4.1
b2ea24ebuild/pkgs/fpylll: Update to 0.5.6
5486f81Merge #31832

comment:10 Changed 6 months ago by mkoeppe

  • Description modified (diff)

comment:11 Changed 6 months ago by enriqueartal

The compilation failed with lcalc and pynac. The other packages in the introduction have been built, except for fplll which did not appear.

comment:12 Changed 6 months ago by vbraun

Workaround for libgd is at #31879

comment:13 Changed 6 months ago by mkoeppe

  • Description modified (diff)

comment:14 Changed 5 months ago by mkoeppe

  • Description modified (diff)

comment:15 Changed 5 months ago by dimpase

rebase please

comment:16 Changed 5 months ago by mkoeppe

  • Branch u/mkoeppe/meta_ticket__support_gcc_11__fedora_34_ deleted
  • Commit 5486f814f2b1b2210ca253b6b4c342b9b1a0bc8f deleted

The branch is no longer relevant, all tickets have been merged

comment:17 follow-up: Changed 5 months ago by dimpase

By the way, a viable route to work on Fedora 34 might be to use clang rather than gcc.

dnf install clang
CC=clang CXX=clang++ ./configure...

Do we test Linux/clang on GH Actions? We should...

comment:18 in reply to: ↑ 17 Changed 5 months ago by mkoeppe

Replying to dimpase:

Do we test Linux/clang on GH Actions? We should...

I agree. #30835 can be broadened to include this...

comment:19 Changed 5 months ago by dimpase

we see Maxima builds failing in Fedora 34 on the latests CI runs, see e.g. https://github.com/sagemath/sagetrac-mirror/runs/2918514130

comment:20 Changed 5 months ago by mkoeppe

earlier in that log:

;;; (EXT:RUN-PROGRAM "gcc" ("-I." "-I/usr/include/" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" "-O2" "-flto=auto" "-ffat-lto-objects" "-fexceptions" "-g" "-grecord-gcc-switches" "-pipe" "-Wall" "-Werror=format-security" "-Wp,-D_FORTIFY_SOURCE=2" "-Wp,-D_GLIBCXX_ASSERTIONS" "-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1" "-fstack-protector-strong" "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" "-m64" "-mtune=generic" "-fasynchronous-unwind-tables" "-fstack-clash-protection" "-fcf-protection" "-Wno-unused" "-Wno-return-type" "-Wno-unknown-pragmas" "-fPIC" "-D_THREAD_SAFE" "-Dlinux" "-O2" "-c" "binary-ecl/maxima-package.c" "-o" "binary-ecl/maxima-package.o")):
;;; cc1: fatal error: inaccessible plugin file /sage/local/lib/gcc/x86_64-pc-linux-gnu/10.3.0/plugin/annobin.so expanded from short plugin name annobin: No such file or directory
;;; compilation terminated.
;      - Loading binary file "binary-ecl/maxima-package.fas" 
Condition of type: FILE-ERROR
Filesystem error with pathname #P"/sage/local/var/tmp/sage/build/maxima-5.45.0/src/src/binary-ecl/maxima-package.fas".

comment:21 Changed 5 months ago by mkoeppe

Looks like combining system ecl with our gcc does not work because it uses Fedora-specific compiler options.

This will go away when we can accept system gcc11...

comment:22 Changed 5 months ago by dimpase

that annobin-related gcc/ecl bug was also reported on sage-devel

Redhat/Fedora? does something special with annobin, perhaps that's the fallout we see here

comment:23 Changed 5 months ago by mkoeppe

I've opened #32093 for this

comment:24 Changed 5 months ago by mkoeppe

  • Description modified (diff)

comment:25 Changed 5 months ago by mkoeppe

  • Branch set to u/mkoeppe/meta_ticket__support_gcc_11__fedora_34_

comment:26 Changed 5 months ago by mkoeppe

  • Authors set to Matthias Koeppe
  • Commit set to f47c47e4560c449524a77daa7cc17f4e630e8483
  • Dependencies set to #31694, #32093, #31837

Last 10 new commits:

3c131f7wip tarball
11c80aaupdated tarball with PRs 377 and 378
c9c50e3build/pkgs/pynac: Upgrade to 0.7.29
ee34993Merge #31694
228ea28build/pkgs/ecl/spkg-configure.m4: Add SAGE_SPKG_DEPCHECK for gcc
a22e24cMerge #32093
5023898build/pkgs/lcalc/patches: Add https://github.com/cschwan/sage-on-gentoo/blob/master/sci-mathematics/lcalc/files/lcalc-1.23-gcc11.patch
26caef1build/pkgs/lcalc/patches: Remove the superseded Lcommon.h.patch
6340e53Merge #31837
f47c47ebuild/pkgs/gcc/spkg-configure.m4, .homebrew-build-env: Accept gcc 11.x

comment:27 Changed 5 months ago by mkoeppe

  • Priority changed from major to blocker
  • Reviewers set to https://github.com/mkoeppe/sage/actions/runs/984105414
  • Status changed from new to needs_review

comment:28 Changed 5 months ago by dimpase

Does this work with #32037 and without lcalc patch?

comment:29 follow-up: Changed 5 months ago by mkoeppe

This is unknown. I don't think portability testing has been run on #32037.

comment:30 in reply to: ↑ 29 Changed 5 months ago by dimpase

Replying to mkoeppe:

This is unknown. I don't think portability testing has been run on #32037.

they are now running on https://github.com/sagemath/sagetrac-mirror/actions/runs/1009717554

comment:31 Changed 5 months ago by dimpase

gengetopt does not build on ubunty-trusty. Arrgh...

comment:32 Changed 5 months ago by mkoeppe

  • Cc vbraun added
  • Dependencies #31694, #32093, #31837 deleted
  • Description modified (diff)
  • Summary changed from Meta-ticket: Support gcc 11 (fedora 34) to Accept gcc 11 (for fedora 34)

With all dependencies now merged in 9.4.beta5, let's get this in please.

comment:33 Changed 5 months ago by dimpase

  • Reviewers changed from https://github.com/mkoeppe/sage/actions/runs/984105414 to Dima Pasechnik
  • Status changed from needs_review to positive_review

I believe it actually works on Fedora 34, right?

comment:34 Changed 5 months ago by mkoeppe

Thanks, yes, I think so

comment:35 Changed 5 months ago by enriqueartal

It works for me in Fedora 34

comment:36 Changed 4 months ago by vbraun

  • Branch changed from u/mkoeppe/meta_ticket__support_gcc_11__fedora_34_ to f47c47e4560c449524a77daa7cc17f4e630e8483
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.