Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow gcc/gfortran 12 #33187

Closed
mkoeppe opened this issue Jan 16, 2022 · 27 comments
Closed

Allow gcc/gfortran 12 #33187

mkoeppe opened this issue Jan 16, 2022 · 27 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Jan 16, 2022

https://gcc.gnu.org/gcc-12/changes.html

fedora-36 (rawhide) just started to use GCC 12, which we reject. (https://github.com/sagemath/sage/runs/4860062925)

On this ticket we change the spkg-configure.m4 scripts to allow gcc/gfortran 12.
We also add GCC 4.9.x (but not 4.8.x) to the reject list; this compiler was the reason to drop support for debian-jessie in #32947.

Upstream PRs:

CC: @culler @dimpase @kiwifb @antonio-rojas

Component: packages: standard

Author: Matthias Koeppe

Branch/Commit: f27ff17

Reviewer: Dima Pasechnik

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

@mkoeppe mkoeppe added this to the sage-9.6 milestone Jan 16, 2022
@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

Branch: u/mkoeppe/allow_gcc_gfortran_12

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

Commit: 734ba23

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

comment:4

tox -e docker-fedora-36-minimal gives build failures in 2 packages: singular, giac


New commits:

07bbd64build/pkgs/{gcc,gfortran}/spkg-configure.m4: Accept 12.x
734ba23build/pkgs/gcc/spkg-configure.m4: Reject GCC 4.9.x

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

comment:5

So rejecting GCC 12 is justified.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

comment:6

Singular:

/usr/bin/bash ../../libtool  --tag=CXX   --mode=compile g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../.. -I../../libpolys -I../../libpolys -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src  -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src/factory -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src/factory/include -I/sage/local/include   -g -O2 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-rtti -c -o vspace.lo vspace.cc
libtool: compile:  g++ -std=gnu++11 -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -I../../libpolys -I../../libpolys -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src/factory -I/sage/local/var/tmp/sage/build/singular-4.2.1p3/src/factory/include -I/sage/local/include -g -O2 -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-rtti -c vspace.cc  -fPIC -DPIC -o .libs/vspace.o
vspace.cc: In function 'void vspace::internals::vmem_free(vaddr_t)':
vspace.cc:753:26: error: expected primary-expression before ',' token
  753 |   vaddr -= offsetof(Block, data);
      |                          ^
vspace.cc:753:28: error: 'data' was not declared in this scope
  753 |   vaddr -= offsetof(Block, data);
      |                            ^~~~
vspace.cc:753:12: error: 'offsetof' was not declared in this scope
  753 |   vaddr -= offsetof(Block, data);
      |            ^~~~~~~~
vspace.cc:562:1: note: 'offsetof' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
  561 | #include <sys/stat.h>
  +++ |+#include <cstddef>
  562 | 

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

comment:7

Giac:

tex.cc: In function 'std::string giac::gen2tex(const gen&, const context*)':
tex.cc:1383:12: error: conversion from 'int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'} is ambiguous
 1383 |     return 0;
      |            ^

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

comment:8

I suppose we should update these two packages first and then see if the failures persist

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 20, 2022

Dependencies: #31563, #33160

@kiwifb
Copy link
Member

kiwifb commented Jan 21, 2022

comment:9

Are you trying to compile giac with an explicit std=c++14 or earlier? I see that you remove any explicit c++17 in spkg-install.in, but that shouldn't be sufficient when the compiler default to c++17 without any explicit options.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Jan 21, 2022

comment:10

Yes, that's probably it

@mkoeppe

This comment has been minimized.

@mkoeppe

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 1, 2022

Changed commit from 734ba23 to 35857d8

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 1, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

35857d8build/pkgs/singular: Add upstream PR 1128 for GCC 12 support

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 2, 2022

Changed commit from 35857d8 to f27ff17

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Feb 2, 2022

Branch pushed to git repo; I updated commit sha1. New commits:

f27ff17build/pkgs/giac/spkg-install.in: Use -std=gnu++11

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 2, 2022

comment:16

Tested using tox -e docker-ubuntu-trusty-standard -- giac
and tox -e docker-fedora-36-standard -- giac.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 2, 2022

comment:17

The next error on fedora-36:


Condition of type: SIMPLE-ERROR
Error code 1 when executing
(EXT:RUN-PROGRAM "gcc" ("-o" "binary-ecl/maxima-package.fas" "-L/usr/lib64/" "/tmp/eclinit9XnKcY.o" "binary-ecl/maxima-package.o" "-shared" "-Wl,-z,relro" "-Wl,--as-needed" "-Wl,-z,now" "-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" "-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" "-Wl,--build-id=sha1" "-Wl,-dT,/builddir/build/BUILD/.package_note-ecl-21.2.1-4.fc36.x86_64.ld" "-Wl,-z,relro" "-Wl,--as-needed" "-Wl,-z,now" ...)):
/usr/bin/ld: cannot open linker script file /builddir/build/BUILD/.package_note-ecl-21.2.1-4.fc36.x86_64.ld: No such file or directory
collect2: error: ld returned 1 exit status
Available restarts:

1. (CONTINUE) Continues anyway.
2. (RESTART-TOPLEVEL) Go back to Top-Level REPL.

Broken at DO-COMPILE-ECL. In: #<process TOP-LEVEL 0x7fd8e977af80>.
 File: #P"/sage/local/var/tmp/sage/build/maxima-5.45.0.p0/src/src/maxima.system" (Position #1601)
>> 

but that looks just like a broken system package ecl.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 2, 2022

Changed dependencies from #31563, #33160 to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 2, 2022

comment:19

EXTRA_CONFIGURE_ARGS="--without-system-ecl" tox -e docker-fedora-36-standard builds successfully.

@dimpase
Copy link
Member

dimpase commented Feb 3, 2022

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Feb 3, 2022

comment:21

lgtm

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Feb 3, 2022

comment:22

Thanks!

@vbraun
Copy link
Member

vbraun commented Feb 12, 2022

Changed branch from u/mkoeppe/allow_gcc_gfortran_12 to f27ff17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants