From c601bdf7bf7b42430b09f5451363b00478294840 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Fri, 18 Nov 2022 19:55:52 +0100 Subject: gcc: Ensure matching assembler/binutils on RHEL8 (#33994) gcc@10: Newer binutils than RHEL7/8's are required to for guaranteed operaton. Therefore, on RHEL7/8, reject ~binutils. You need to add +binutils to be sure to have binutils which are recent enough. See this discussion with the OpenBLAS devs for reference: https://github.com/xianyi/OpenBLAS/issues/3805#issuecomment-1319878852 Co-authored-by: Bernhard Kaindl --- var/spack/repos/builtin/packages/gcc/package.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 6fbfdd27b1..d802a47d48 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -342,6 +342,14 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Newer binutils than RHEL's is required to run `as` on some instructions # generated by new GCC (see https://github.com/spack/spack/issues/12235) conflicts("~binutils", when="@7: os=rhel6", msg="New GCC cannot use system assembler on RHEL6") + # Ditto for RHEL7/8: OpenBLAS uses flags which the RHEL system-binutils don't have: + # https://github.com/xianyi/OpenBLAS/issues/3805#issuecomment-1319878852 + conflicts( + "~binutils", when="@10: os=rhel7", msg="gcc: Add +binutils - preinstalled as might be old" + ) + conflicts( + "~binutils", when="@10: os=rhel8", msg="gcc: Add +binutils - preinstalled as might be old" + ) # GCC 11 requires GCC 4.8 or later (https://gcc.gnu.org/gcc-11/changes.html) conflicts("%gcc@:4.7", when="@11:") -- cgit v1.2.3-70-g09d2