spack: Installation issue: py-tensorflow: clang: error: unknown argument: '-fno-canonical-system-headers'

Steps to reproduce the issue

$ spack spec py-tensorflow@2.16.2+cuda%gcc@10.5.0 cuda_arch=61 ^cuda@12.4.1 
 -   py-tensorflow@2.16.2~android~aws~computecpp+cuda+dynamic_kernels~gcp~gdr~hdfs~ios~jemalloc~mkl~monolithic~mpi~nccl~ngraph~numa~opencl~rocm~tensorrt~verbs+xla build_system=generic cuda_arch:=61 patches:=2017b3e,e061875 arch=linux-rhel9-haswell
[+]      ^bazel@6.5.0+nodepfail build_system=generic patches:=0f6940d,3e6448a,604423c,dbbf38b arch=linux-rhel9-haswell
[+]          ^openjdk@11.0.23_9 build_system=generic certs=none arch=linux-rhel9-x86_64
[+]          ^zip@3.0 build_system=makefile patches:=14dc880,3bc30ba,5068e7c,51f48db,66ab4ce,a92fc4e,a95ed93,b930b69,eb83fc8,f7d0bc4,fa8312c arch=linux-rhel9-haswell
[+]      ^compiler-wrapper@1.0 build_system=generic arch=linux-rhel9-haswell
[+]      ^cuda@12.4.1~allow-unsupported-compilers~dev build_system=generic arch=linux-rhel9-haswell
[+]          ^libxml2@2.13.5~http+pic~python+shared build_system=autotools arch=linux-rhel9-haswell
[+]              ^libiconv@1.17 build_system=autotools libs:=shared,static arch=linux-rhel9-haswell
[+]      ^cudnn@8.9.7.29-12 build_system=generic arch=linux-rhel9-haswell
[+]      ^gcc@10.5.0~binutils+bootstrap~graphite~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' patches:=2c18531 arch=linux-rhel9-haswell
[+]          ^diffutils@3.10 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^compiler-wrapper@1.0 build_system=generic arch=linux-rhel9-x86_64
[e]              ^gcc@11.5.0~binutils+bootstrap~graphite~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' arch=linux-rhel9-x86_64
[+]              ^gcc-runtime@11.5.0 build_system=generic arch=linux-rhel9-x86_64
[e]              ^glibc@2.34 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^gmake@4.4.1~guile build_system=generic arch=linux-rhel9-x86_64
[+]              ^libiconv@1.17 build_system=autotools libs:=shared,static arch=linux-rhel9-x86_64
[+]          ^gawk@5.3.1~nls build_system=autotools arch=linux-rhel9-x86_64
[+]              ^libsigsegv@2.14 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^readline@8.2 build_system=autotools patches:=1ea4349,24f587b,3d9885e,5911a5b,622ba38,6c8adf8,758e2ec,79572ee,a177edc,bbf97f1,c7b45ff,e0013d9,e065038 arch=linux-rhel9-x86_64
[+]          ^gmake@4.4.1~guile build_system=generic arch=linux-rhel9-haswell
[e]              ^gcc@11.5.0~binutils+bootstrap~graphite~nvptx~piclibs~profiled~strip build_system=autotools build_type=RelWithDebInfo languages:='c,c++,fortran' arch=linux-rhel9-haswell
[+]              ^gcc-runtime@11.5.0 build_system=generic arch=linux-rhel9-haswell
[+]          ^gmp@6.3.0+cxx build_system=autotools libs:=shared,static arch=linux-rhel9-x86_64
[+]              ^autoconf@2.72 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^automake@1.16.5 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^m4@1.4.19+sigsegv build_system=autotools patches:=9dc5fbd,bfdffa7 arch=linux-rhel9-x86_64
[+]          ^libtool@2.4.7 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^findutils@4.10.0 build_system=autotools patches:=440b954 arch=linux-rhel9-x86_64
[+]          ^llvm@16.0.6+clang~cuda~flang+gold~ipo+libomptarget~libomptarget_debug~link_llvm_dylib+lld+lldb+llvm_dylib+lua~mlir+polly~python~split_dwarf~z3~zstd build_system=cmake build_type=Release compiler-rt=runtime generator=ninja libcxx=runtime libunwind=runtime openmp=runtime patches:=b540ef6 shlib_symbol_version=none targets:=all version_suffix=none arch=linux-rhel9-x86_64
[+]              ^binutils@2.43.1~debuginfod~gas+gold~gprofng+headers~interwork+ld~libiberty~lto~nls~pgo+plugins build_system=autotools compress_debug_sections=zlib libs:=shared,static arch=linux-rhel9-x86_64
[+]              ^cmake@3.31.6~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release arch=linux-rhel9-x86_64
[+]                  ^curl@8.11.1~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=openssl arch=linux-rhel9-x86_64
[+]                      ^nghttp2@1.65.0 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^hwloc@2.11.1~cairo~cuda~gl~level_zero~libudev+libxml2~nvml~opencl+pci~rocm build_system=autotools libs:=shared,static arch=linux-rhel9-x86_64
[+]                  ^libpciaccess@0.17 build_system=autotools arch=linux-rhel9-x86_64
[+]                      ^util-macros@1.20.1 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^libedit@3.1-20240808 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^libffi@3.4.7 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^libxml2@2.13.5+http+pic~python+shared build_system=autotools arch=linux-rhel9-x86_64
[+]              ^lua@5.3.6+shared build_system=makefile fetcher=curl arch=linux-rhel9-x86_64
[+]                  ^unzip@6.0 build_system=makefile patches:=881d2ed,f6f6236 arch=linux-rhel9-x86_64
[+]              ^ncurses@6.5~symlinks+termlib abi=none build_system=autotools patches:=7a351bc arch=linux-rhel9-x86_64
[+]              ^ninja@1.12.1+re2c build_system=generic patches:=93f4bb3 arch=linux-rhel9-x86_64
[+]                  ^re2c@3.1 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^perl-data-dumper@2.173 build_system=perl arch=linux-rhel9-x86_64
[+]              ^pkgconf@2.3.0 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^python@3.11.11+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix+tkinter+uuid+zlib build_system=generic patches:=b0615b2,ebdca64,f2fd060 arch=linux-rhel9-x86_64
[+]                  ^expat@2.7.1+libbsd build_system=autotools arch=linux-rhel9-x86_64
[+]                      ^libbsd@0.12.2 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^libmd@1.1.0 build_system=autotools arch=linux-rhel9-x86_64
[+]                  ^libxcrypt@4.4.38~obsolete_api build_system=autotools arch=linux-rhel9-x86_64
[+]                  ^openssl@3.4.1~docs+shared build_system=generic certs=mozilla arch=linux-rhel9-x86_64
[+]                      ^ca-certificates-mozilla@2025-02-25 build_system=generic arch=linux-rhel9-x86_64
[+]                  ^sqlite@3.46.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-rhel9-x86_64
[+]                  ^tcl@8.6.12 build_system=autotools arch=linux-rhel9-x86_64
[+]                  ^tk@8.6.11+xft+xss build_system=autotools arch=linux-rhel9-x86_64
[+]                      ^libx11@1.8.11 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^inputproto@2.3.2 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^kbproto@1.0.7 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^libxcb@1.17.0 build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^libpthread-stubs@0.5 build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^libxau@1.0.12 build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^libxdmcp@1.1.5 build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^python@3.13.2+bz2+ctypes+dbm~debug+libxml2+lzma~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic arch=linux-rhel9-x86_64
[+]                              ^xcb-proto@1.17.0 build_system=autotools arch=linux-rhel9-x86_64
[+]                                  ^python-venv@1.0 build_system=generic arch=linux-rhel9-x86_64
[+]                          ^xextproto@7.3.0 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^xproto@7.0.31 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^xtrans@1.6.0 build_system=autotools arch=linux-rhel9-x86_64
[+]                      ^libxft@2.3.8 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^fontconfig@2.15.0~pic build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^font-util@1.4.1 build_system=autotools fonts:=encodings,font-adobe-100dpi,font-adobe-75dpi,font-adobe-utopia-100dpi,font-adobe-utopia-75dpi,font-adobe-utopia-type1,font-alias,font-arabic-misc,font-bh-100dpi,font-bh-75dpi,font-bh-lucidatypewriter-100dpi,font-bh-lucidatypewriter-75dpi,font-bh-type1,font-bitstream-100dpi,font-bitstream-75dpi,font-bitstream-speedo,font-bitstream-type1,font-cronyx-cyrillic,font-cursor-misc,font-daewoo-misc,font-dec-misc,font-ibm-type1,font-isas-misc,font-jis-misc,font-micro-misc,font-misc-cyrillic,font-misc-ethiopic,font-misc-meltho,font-misc-misc,font-mutt-misc,font-schumacher-misc,font-screen-cyrillic,font-sun-misc,font-winitzki-cyrillic,font-xfree86-type1 arch=linux-rhel9-x86_64
[+]                                  ^bdftopcf@1.1.1 build_system=autotools arch=linux-rhel9-x86_64
[+]                                      ^fontsproto@2.1.3 build_system=autotools arch=linux-rhel9-x86_64
[+]                                      ^libxfont@1.5.4 build_system=autotools arch=linux-rhel9-x86_64
[+]                                  ^mkfontdir@1.0.7 build_system=autotools arch=linux-rhel9-x86_64
[+]                                  ^mkfontscale@1.2.3 build_system=autotools arch=linux-rhel9-x86_64
[+]                                      ^libfontenc@1.1.8 build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^gperf@3.1 build_system=autotools patches:=3dd36db arch=linux-rhel9-x86_64
[+]                          ^freetype@2.13.2+pic+shared build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^libpng@1.6.47~ipo~pic build_system=cmake build_type=Release generator=make libs:=shared,static arch=linux-rhel9-x86_64
[+]                          ^libxrender@0.9.12 build_system=autotools arch=linux-rhel9-x86_64
[+]                              ^renderproto@0.11.1 build_system=autotools arch=linux-rhel9-x86_64
[+]                      ^libxscrnsaver@1.2.4 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^libxext@1.3.6 build_system=autotools arch=linux-rhel9-x86_64
[+]                          ^scrnsaverproto@1.2.2 build_system=autotools arch=linux-rhel9-x86_64
[+]                  ^util-linux-uuid@2.41 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^swig@4.1.1 build_system=autotools arch=linux-rhel9-x86_64
[+]                  ^pcre2@10.44~jit+multibyte+pic build_system=autotools arch=linux-rhel9-x86_64
[+]              ^xz@5.6.3~pic build_system=autotools libs:=shared,static arch=linux-rhel9-x86_64
[+]          ^mpc@1.3.1 build_system=autotools libs:=shared,static arch=linux-rhel9-haswell
[+]          ^mpfr@4.2.1 build_system=autotools libs:=shared,static arch=linux-rhel9-x86_64
[+]              ^autoconf-archive@2023.02.20 build_system=autotools arch=linux-rhel9-x86_64
[+]          ^perl@5.40.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-rhel9-x86_64
[+]              ^berkeley-db@18.1.40+cxx~docs+stl build_system=autotools patches:=26090f4,b231fcc arch=linux-rhel9-x86_64
[+]              ^bzip2@1.0.8~debug~pic+shared build_system=generic arch=linux-rhel9-x86_64
[+]              ^gdbm@1.23 build_system=autotools arch=linux-rhel9-x86_64
[+]          ^texinfo@7.1 build_system=autotools arch=linux-rhel9-x86_64
[+]              ^gettext@0.23.1+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-rhel9-x86_64
[+]                  ^tar@1.35 build_system=autotools zip=pigz arch=linux-rhel9-x86_64
[+]                      ^pigz@2.8 build_system=makefile arch=linux-rhel9-x86_64
[+]          ^zlib@1.3.1+optimize+pic+shared build_system=makefile arch=linux-rhel9-x86_64
[+]          ^zstd@1.5.7+programs build_system=makefile compression:=none libs:=shared,static arch=linux-rhel9-x86_64
[+]      ^gcc-runtime@10.5.0 build_system=generic arch=linux-rhel9-haswell
[e]      ^glibc@2.34 build_system=autotools arch=linux-rhel9-haswell
[+]      ^hdf5@1.14.6~cxx~fortran+hl~ipo~java~map~mpi+shared~szip~threadsafe+tools api=default build_system=cmake build_type=Release generator=make arch=linux-rhel9-haswell
[+]          ^cmake@3.31.6~doc+ncurses+ownlibs~qtgui build_system=generic build_type=Release arch=linux-rhel9-haswell
[+]              ^curl@8.11.1~gssapi~ldap~libidn2~librtmp~libssh~libssh2+nghttp2 build_system=autotools libs:=shared,static tls:=openssl arch=linux-rhel9-haswell
[+]                  ^nghttp2@1.65.0 build_system=autotools arch=linux-rhel9-haswell
[+]          ^gmake@4.4.1~guile build_system=generic arch=linux-rhel9-haswell
[+]          ^pkgconf@2.3.0 build_system=autotools arch=linux-rhel9-haswell
[+]          ^zlib-ng@2.2.4+compat+new_strategies+opt+pic+shared build_system=autotools arch=linux-rhel9-haswell
[+]      ^patchelf@0.17.2 build_system=autotools arch=linux-rhel9-haswell
[+]      ^py-absl-py@1.4.0 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-astunparse@1.6.3 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-flatbuffers@24.3.25 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-gast@0.5.4 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-google-pasta@0.2.0 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-grpcio@1.62.2 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^c-ares@1.28.1~ipo build_system=cmake build_type=Release generator=make arch=linux-rhel9-haswell
[+]          ^openssl@3.4.1~docs+shared build_system=generic certs=mozilla arch=linux-rhel9-haswell
[+]              ^ca-certificates-mozilla@2025-02-25 build_system=generic arch=linux-rhel9-haswell
[+]              ^perl@5.40.0+cpanm+opcode+open+shared+threads build_system=generic arch=linux-rhel9-haswell
[+]                  ^berkeley-db@18.1.40+cxx~docs+stl build_system=autotools patches:=26090f4,b231fcc arch=linux-rhel9-haswell
[+]          ^py-coverage@7.2.6~toml build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-cython@0.29.36 build_system=python_pip patches:=c4369ad arch=linux-rhel9-haswell
[+]          ^re2@2024-07-02~icu~ipo+pic+shared build_system=cmake build_type=Release generator=make arch=linux-rhel9-haswell
[+]              ^abseil-cpp@20240722.0~ipo+shared build_system=cmake build_type=Release cxxstd=14 generator=make arch=linux-rhel9-haswell
[+]      ^py-h5py@3.12.1~mpi build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-pkgconfig@1.5.5 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^py-poetry-core@2.1.2 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-libclang@16.0.0 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^llvm@16.0.6+clang~cuda~flang+gold~ipo+libomptarget~libomptarget_debug~link_llvm_dylib+lld+lldb+llvm_dylib+lua~mlir+polly~python~split_dwarf~z3~zstd build_system=cmake build_type=Release compiler-rt=runtime generator=ninja libcxx=runtime libunwind=runtime openmp=runtime patches:=b540ef6 shlib_symbol_version=none targets:=all version_suffix=none arch=linux-rhel9-haswell
[+]              ^binutils@2.43.1~debuginfod~gas+gold~gprofng+headers~interwork+ld~libiberty~lto~nls~pgo+plugins build_system=autotools compress_debug_sections=zlib libs:=shared,static arch=linux-rhel9-haswell
[+]                  ^zstd@1.5.7+programs build_system=makefile compression:=none libs:=shared,static arch=linux-rhel9-haswell
[+]              ^hwloc@2.11.1~cairo~cuda~gl~level_zero~libudev+libxml2~nvml~opencl+pci~rocm build_system=autotools libs:=shared,static arch=linux-rhel9-haswell
[+]                  ^libpciaccess@0.17 build_system=autotools arch=linux-rhel9-haswell
[+]              ^libedit@3.1-20240808 build_system=autotools arch=linux-rhel9-haswell
[+]              ^lua@5.3.6+shared build_system=makefile fetcher=curl arch=linux-rhel9-haswell
[+]                  ^unzip@6.0 build_system=makefile patches:=881d2ed,f6f6236 arch=linux-rhel9-haswell
[+]              ^ninja@1.12.1+re2c build_system=generic patches:=93f4bb3 arch=linux-rhel9-haswell
[+]                  ^re2c@3.1 build_system=autotools arch=linux-rhel9-haswell
[+]              ^perl-data-dumper@2.173 build_system=perl arch=linux-rhel9-haswell
[+]      ^py-ml-dtypes@0.3.1 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-pybind11@2.13.6+ipo build_system=cmake build_type=Release generator=ninja arch=linux-rhel9-haswell
[+]      ^py-numpy@1.26.4 build_system=python_pip patches:=873745d arch=linux-rhel9-haswell
[+]          ^openblas@0.3.29~bignuma~consistent_fpcsr+dynamic_dispatch+fortran~ilp64+locking+pic+shared build_system=makefile symbol_suffix=none threads=none arch=linux-rhel9-haswell
[+]          ^py-meson-python@0.16.0 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^meson@1.7.0 build_system=python_pip patches:=0f0b1bd arch=linux-rhel9-haswell
[+]              ^py-pyproject-metadata@0.9.1 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-opt-einsum@3.4.0 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-hatch-fancy-pypi-readme@23.1.0 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-hatch-vcs@0.4.0 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^py-setuptools-scm@8.2.1+toml build_system=python_pip arch=linux-rhel9-haswell
[+]                  ^git@2.48.1+man+nls+perl+subtree~svn~tcltk build_system=autotools arch=linux-rhel9-haswell
[+]                      ^autoconf@2.72 build_system=autotools arch=linux-rhel9-haswell
[+]                      ^automake@1.16.5 build_system=autotools arch=linux-rhel9-haswell
[+]                      ^libidn2@2.3.7 build_system=autotools arch=linux-rhel9-haswell
[+]                          ^libunistring@1.2 build_system=autotools arch=linux-rhel9-haswell
[+]                      ^libtool@2.4.7 build_system=autotools arch=linux-rhel9-haswell
[+]                          ^findutils@4.10.0 build_system=autotools patches:=440b954 arch=linux-rhel9-haswell
[+]                      ^m4@1.4.19+sigsegv build_system=autotools patches:=9dc5fbd,bfdffa7 arch=linux-rhel9-haswell
[+]                          ^libsigsegv@2.14 build_system=autotools arch=linux-rhel9-haswell
[+]                      ^openssh@9.9p1+gssapi build_system=autotools arch=linux-rhel9-haswell
[+]                          ^krb5@1.21.3+shared build_system=autotools arch=linux-rhel9-haswell
[+]                              ^bison@3.8.2~color build_system=autotools arch=linux-rhel9-haswell
[+]          ^py-hatchling@1.27.0 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^py-pathspec@0.11.1 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^py-pluggy@1.5.0 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^py-trove-classifiers@2025.4.11.15 build_system=python_pip arch=linux-rhel9-haswell
[+]                  ^py-calver@2022.6.26 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-packaging@25.0 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-flit-core@3.12.0 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-pip@25.0.1 build_system=generic arch=linux-rhel9-haswell
[+]      ^py-protobuf@4.25.3 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^protobuf@3.25.3~ipo+shared build_system=cmake build_type=Release generator=make arch=linux-rhel9-haswell
[+]      ^py-requests@2.32.3~socks build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-certifi@2023.7.22 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-charset-normalizer@3.3.0 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-idna@3.4 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-urllib3@2.1.0~brotli~socks build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-setuptools@76.1.0 build_system=generic arch=linux-rhel9-haswell
[+]      ^py-six@1.17.0 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-tensorboard@2.16.2 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-markdown@3.4.1 build_system=python_pip arch=linux-rhel9-haswell
[+]          ^py-tensorboard-data-server@0.7.0 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^rust@1.85.0+dev~docs+src build_system=generic arch=linux-rhel9-haswell
[+]                  ^libgit2@1.8.0~curl~ipo+mmap+ssh build_system=cmake build_type=Release generator=make https=system arch=linux-rhel9-haswell
[+]                      ^pcre@8.45~jit+multibyte+pic+shared+static+utf build_system=autotools arch=linux-rhel9-haswell
[+]                  ^libssh2@1.11.1+shared build_system=autotools crypto=openssl arch=linux-rhel9-haswell
[+]                  ^rust-bootstrap@1.85.0 build_system=generic arch=linux-rhel9-haswell
[+]          ^py-werkzeug@3.1.3 build_system=python_pip arch=linux-rhel9-haswell
[+]              ^py-markupsafe@2.1.3 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-termcolor@1.1.0 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-typing-extensions@4.13.2 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^py-wheel@0.45.1 build_system=generic arch=linux-rhel9-haswell
[+]      ^py-wrapt@1.15.0 build_system=python_pip arch=linux-rhel9-haswell
[+]      ^python@3.11.11+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches:=13fa8bf,b0615b2,ebdca64,f2fd060 arch=linux-rhel9-haswell
[+]          ^bzip2@1.0.8~debug~pic+shared build_system=generic arch=linux-rhel9-haswell
[+]              ^diffutils@3.10 build_system=autotools arch=linux-rhel9-haswell
[+]          ^expat@2.7.1+libbsd build_system=autotools arch=linux-rhel9-haswell
[+]              ^libbsd@0.12.2 build_system=autotools arch=linux-rhel9-haswell
[+]                  ^libmd@1.1.0 build_system=autotools arch=linux-rhel9-haswell
[+]          ^gdbm@1.23 build_system=autotools arch=linux-rhel9-haswell
[+]          ^gettext@0.23.1+bzip2+curses+git~libunistring+libxml2+pic+shared+tar+xz build_system=autotools arch=linux-rhel9-haswell
[+]              ^tar@1.35 build_system=autotools zip=pigz arch=linux-rhel9-haswell
[+]                  ^pigz@2.8 build_system=makefile arch=linux-rhel9-haswell
[+]          ^libffi@3.4.7 build_system=autotools arch=linux-rhel9-haswell
[+]          ^libxcrypt@4.4.38~obsolete_api build_system=autotools arch=linux-rhel9-haswell
[+]          ^ncurses@6.5~symlinks+termlib abi=none build_system=autotools patches:=7a351bc arch=linux-rhel9-haswell
[+]          ^readline@8.2 build_system=autotools patches:=1ea4349,24f587b,3d9885e,5911a5b,622ba38,6c8adf8,758e2ec,79572ee,a177edc,bbf97f1,c7b45ff,e0013d9,e065038 arch=linux-rhel9-haswell
[+]          ^sqlite@3.46.0+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=linux-rhel9-haswell
[+]          ^util-linux-uuid@2.41 build_system=autotools arch=linux-rhel9-haswell
[+]          ^xz@5.6.3~pic build_system=autotools libs:=shared,static arch=linux-rhel9-haswell
[+]      ^python-venv@1.0 build_system=generic arch=linux-rhel9-haswell
[+]      ^swig@4.1.1 build_system=autotools arch=linux-rhel9-haswell
[+]          ^pcre2@10.44~jit+multibyte+pic build_system=autotools arch=linux-rhel9-haswell

Error message

Error message
    131    [8,144 / 18,499] Compiling sqlite3.c; 21s local ... (32 actions, 31 running)
  >> 132    ERROR: /mnt/local/cache/spackftdqmi7c/e0fe4738eafb7d050c2e0e880f42af95/external/XNNPACK/BUILD.bazel:1867:1
            9: Compiling src/amalgam/gen/avxvnni.c failed: (Exit 1): crosstool_wrapper_driver_is_not_gcc failed: error
             executing command (from target @@XNNPACK//:avxvnni_prod_microkernels)
     133      (cd /mnt/local/cache/spackftdqmi7c/e0fe4738eafb7d050c2e0e880f42af95/execroot/org_tensorflow && \
...
    182    # Configuration: fe76169bdb4f312c0eae892ec9b22c555758d28130ce68c6d434899e97299fdb
     183    # Execution platform: @local_execution_config_platform//:platform
  >> 184    gcc: error: unrecognized command-line option '-mavxvnni'; did you mean '-mavx512vnni'?

Information on your system

$ spack debug report

  • Spack: 1.0.0.dev0 (123c26c22d8b279840e0fa6a2addb1f5cfb4fb22)
  • Python: 3.9.21
  • Platform: linux-rhel9-haswell

Additional information

spack-build-out.txt

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

Try Clang. Google no longer supports GCC, so these kinds of issues are more or less expected. At some point, we need to get Clang in CI so we can add newer versions.