From 09a1f09fd0d93f2ab0e5a238ad0a4d9129651994 Mon Sep 17 00:00:00 2001 From: "Seth R. Johnson" Date: Thu, 27 Feb 2020 21:56:48 -0500 Subject: Mark GCC7 and newer as conflicting with rhel6 without binutils (#14706) When building gcc7 and gcc8 on RHEL6 with Spack and installing it as a spack-available compiler, OpenBLAS will fail to compile because GCC generates newer instructions than rhel6's `as` assembler knows about (e.g. "vpermpd"). Building gcc8 with binutils succeeds, and it generates a GCC that can then successfully build OpenBLAS. This is also expected to work for gcc7 on RHEL6. --- var/spack/repos/builtin/packages/gcc/package.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index 431fcaa9da..b3a6cd68ac 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -193,6 +193,11 @@ class Gcc(AutotoolsPackage, GNUMirrorPackage): # Binutils can't build ld on macOS conflicts('+binutils', when='platform=darwin') + # 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') + if sys.platform == 'darwin': # Fix parallel build on APFS filesystem # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81797 -- cgit v1.2.3-70-g09d2