Opened 3 years ago

Closed 3 years ago

#29162 closed defect (fixed)

gfortran compile error on debian-jessie-minimal

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.1
Component: build Keywords:
Cc: dimpase, fbissey, vbraun Merged in:
Authors: Matthias Koeppe Reviewers: Volker Braun
Report Upstream: N/A Work issues:
Branch: 1c36ede (Commits, GitHub, GitLab) Commit: 1c36ede54da80ed5bdbf36e3f6e98c0983dfb5dd
Dependencies: Stopgaps:

Status badges

Description (last modified by mkoeppe)

This is with gcc version 4.9.2 (Debian 4.9.2-10+deb8u2).

2020-02-07T01:07:37.4585503Z In file included from ../../src/gcc/config/i386/i386.c:98:0:
2020-02-07T01:07:37.4586109Z ../../src/gcc/config/i386/x86-tune-costs.h:32:56: error: uninitialized const member 'stringop_algs::stringop_strategy::max'
2020-02-07T01:07:37.4586420Z    {rep_prefix_1_byte, {{-1, rep_prefix_1_byte, false}}}};
2020-02-07T01:07:37.4586500Z                                                         ^

This ticket fixes this by building gfortran using system g++ without passing the -std=gnu++11 flags.


9.1.beta5 + this ticket:

Change History (16)

comment:1 Changed 3 years ago by dimpase

so, Sage's gfortran cannot be built with an ancient gcc. Nothing really new about it.

Perhaps the most meaningful fix would be to gfortran's spkg-configure to error out on not finding a system gfortran and finding an old gcc...

comment:2 Changed 3 years ago by mkoeppe

On this system, the gcc package (including fortran) can be installed successfully, but not gfortran.

comment:3 Changed 3 years ago by dimpase

if gcc is built then gfortran will be built with the new gcc.

apparently gfortran is more picky.

I really don't see a point of not having gfortran as a pre-req on Linux.

comment:4 Changed 3 years ago by mkoeppe

Branch: u/mkoeppe/gfortran_compile_error_on_debian_jessie

comment:5 Changed 3 years ago by mkoeppe

Commit: 833ab0e56542413009d4fac4108b421cdace404c
Dependencies: #29052

What's happening here is that gfortran 9.2 cannot build without bootstrapping when the old g++ is invoked as g++ -std=gnu++11. This is apparently a build configuration untested by upstream. The ticket fixes it by avoiding the -std=gnu++11 flag (which is globally added to $CXX by build/pkgs/gcc/spkg-configure.m4 on old compilers).

The ticket is on top of #29052 (which needs review...)

Tests at

New commits:

5244060Split out build/bin/sage-build-env-config from sage-env-config
96b6c58src/bin/sage: Add -buildsh
3491a9dbuild/make/deps, build/ Source build/bin/sage-build-env-config for building sagelib and for script packages
11f6797Document 'sage -buildsh' in the output of 'sage -advanced'
ecb6a8bsrc/doc/en/reference/repl/options.rst: Document sage --buildsh
a0c3c59Fix "--build-sh" -> "--buildsh" in a comment
c1f0e62Merge tag '9.1.beta4' into t/29052/create_build_bin_sage_build_env_and_call_it_from_build_make_deps__add_sage___buildsh
0dc97dbClean src/doc/en/installation/*.txt in bootstrap-clean, not misc-clean
8bd4f53Merge branch 't/29233/bootstrap____make_distclean_broken' into t/29052/create_build_bin_sage_build_env_and_call_it_from_build_make_deps__add_sage___buildsh
833ab0eBuild gcc/gfortran without passing -std=gnu++11 to the system g++

comment:6 Changed 3 years ago by mkoeppe

Authors: Matthias Koeppe
Status: newneeds_review

comment:7 Changed 3 years ago by mkoeppe

Summary: gfortran compile error on debian-jessiegfortran compile error on debian-jessie-minimal

comment:8 Changed 3 years ago by mkoeppe

Description: modified (diff)

comment:9 Changed 3 years ago by mkoeppe

For the unrelated gfortran compile errors on *-i386-minimal that appear in, see #29241 (gfortran on 32bit: Configure for the same ABI as gcc).

comment:10 Changed 3 years ago by mkoeppe

Cc: vbraun added

comment:11 Changed 3 years ago by git

Commit: 833ab0e56542413009d4fac4108b421cdace404ccaeaaae975020c5879e69b2ca22460ec0bb521c4

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

caeaaaeMerge branch 't/29052/create_build_bin_sage_build_env_and_call_it_from_build_make_deps__add_sage___buildsh' into t/29162/gfortran_compile_error_on_debian_jessie

comment:12 Changed 3 years ago by git

Commit: caeaaae975020c5879e69b2ca22460ec0bb521c41c36ede54da80ed5bdbf36e3f6e98c0983dfb5dd

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

1c36edeMerge tag '9.1.beta6' into t/29162/gfortran_compile_error_on_debian_jessie

comment:13 Changed 3 years ago by mkoeppe

Dependencies: #29052

comment:14 Changed 3 years ago by vbraun

Reviewers: Volker Braun
Status: needs_reviewpositive_review

comment:15 Changed 3 years ago by mkoeppe

Thank you.

comment:16 Changed 3 years ago by vbraun

Branch: u/mkoeppe/gfortran_compile_error_on_debian_jessie1c36ede54da80ed5bdbf36e3f6e98c0983dfb5dd
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.