Gromacs SYCL Spack build error

GROMACS version:2024.1
GROMACS modification: No
Here post your question:

Hi, I am trying to build gromacs with the following command :
spack install gromacs@2024.1%oneapi@2023.2.0 +sycl +mpi

[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/nghttp2-1.57.0-54czeqmr4qadkqnnuuzufd2p4aohmqla
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/zlib-ng-2.1.4-bjplwahje7noykqhjer44gvw6lxxxu6a
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/gcc-runtime-12.2.0-muur22hgsecvh3dmnxoj7pjnh3teddgt
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/ncurses-6.4-latmykf333bg4koph5oisuf5x2ykcuup
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libpciaccess-0.17-pmhly5zyy6wqkto2jln4yfp7mvanmkol
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libiconv-1.17-4ojv6rziro46rpde5sgportja7pnblxn
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/xz-5.4.1-jkitpb4skhoxz2acotalylot7n366ouk
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/bzip2-1.0.8-fv7pkikc4iv3sxwnf4eqwnjeynmpad5p
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/zstd-1.5.5-xygti2fgvunhsafaejcsgtar76ex4u27
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libxcrypt-4.4.35-pr64fai4gsx435qcwymvtrhb6tdetnll
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libsigsegv-2.14-ybxkihunotlqrc6geedhwbwbemstmzv5
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libtool-2.4.7-uttansg3nmrjf47ak2iyyeem4vj7ovtc
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/berkeley-db-18.1.40-5fg7mbulac7qu4rtqkxb3mi2zddd2zkx
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/pkgconf-1.9.5-ul6hjnq6oyu23adcckiq7mxvbgqjbrkr
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/pigz-2.7-xuu6ppgnylbnlryixsdfwoqzm7lyv6wg
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/openssl-3.1.3-s5lnl2zhthvjtjilifmhx77wo5ckex5x
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/intel-oneapi-runtime-2023.2.0-2ah3tk6qdovkuusve7w2flnyk3hwgxzv
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/openblas-0.3.26-y3zkkqimtkqvwmj3tlnunpgop2efoep4
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/gmake-4.4.1-ajgjo2s5vzg3cblmtl426pvsv6hpewpe
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/readline-8.2-dguilf37kabiqbw7csgwdoyajkmxna4e
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/diffutils-3.9-q2t5dyyjqc34dclnyfetvynuyd3godsj
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/numactl-2.0.14-f5ihi6yu6p7an2y66gl5aw5xmigwkbur
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libxml2-2.10.3-j5a3gl4ejwz7l4xal76yektiiondt7qa
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libedit-3.1-20210216-jr5sxzej33d7mxxmdwmojg2ascvu6wtq
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/tar-1.34-jk4m7s6kogjvthumdoa2sreglwg3eky5
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/curl-8.4.0-3ulpttd4cqk6fkhq4ol35eh7pc6slozm
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/gmp-6.2.1-xqtfzsqghtap6ym6rbhs52ms4kio27h2
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/libevent-2.1.12-a4q5pxzgoq6gnmwucyoxq65b54dzm5rr
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/gdbm-1.23-nrftdj2zmebq2zutsydwaapg4btwmdof
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/hwloc-2.9.1-mfzirwqcuqrsbhpy6llgnshll6fayibp
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/gettext-0.22.3-2lc42wsvykrc4ouwqla6gq3xzyofcyjr
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/cmake-3.26.6-iobnbee5qe6uduthgern7qomo4gv4sro
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/mpfr-3.1.6-anhwwubuf4mfinnkajgado3rqvsyo7tn
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/perl-5.38.0-ebchflxbysacgyfjzx2apheukjpbwanp
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/pmix-5.0.1-ktrmmztxcxt2k5fnhprgkffmcmzzvugs
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/gawk-5.3.0-npui33ruc23fioxfd3qgmimuafhxzodh
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/mpc-1.1.0-vnkm4h4zbucrc6z6apuuittotjziy3ny
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/krb5-1.20.1-egezrbvhih2s6gghdfv2odngl2p4uts7
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/texinfo-7.0.3-4tcwh4aakq3344a4sbkkm57x2ut6dpry
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/openssh-9.5p1-7ftfdac4lips6jjtkubihdrv62svwwns
==> Installing gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w [41/44]
==> No binary for gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w found: installing from source
==> Using cached archive: /lustre/home/br-kolgu/spack/var/spack/cache/_source-cache/archive/27/27769f64ef1d4cd5e2be8682c0c93f9887983e6cfd1a927ce5a0a2915a95cf8f.tar.xz
==> Using cached archive: /lustre/home/br-kolgu/spack/var/spack/cache/_source-cache/archive/0d/0d136226eb07bc43f1b15284f48bd252e3748a0426b5d7ac9084ebc406e15490
==> Applied patch /lustre/home/br-kolgu/spack/var/spack/repos/builtin/packages/gcc/glibc-2.36-libsanitizer-gcc-5-9.patch
==> Applied patch https://github.com/gcc-mirror/gcc/commit/423cd47cfc9640ba3d6811b780e8a0b94b704dcb.patch?full_index=1
==> Ran patch() for gcc
==> gcc: Executing phase: 'autoreconf'
==> gcc: Executing phase: 'configure'
==> gcc: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j16' 'V=1'

13 errors found in build log:
     11890    #define offsetof(t, d) __builtin_offsetof(t, d)
     11891                           ^                     ~
     11892    In file included from /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/rtl.c:131:
     11893    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/rtl.def:974:1: warning: offset of on non-POD type 'struct rtx_def' [-Winvalid-offse
              tof]
     11894    DEF_RTL_EXPR(DEFINE_ASM_ATTRIBUTES, "define_asm_attributes", "V", RTX_EXTRA)
     11895    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  >> 11896    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/rtl.c:128:6: /lustre/home/br-kolgu/spack/lib/spack/env/oneapi/icpx -std=gnu++98 -c 
                -g -O1 -DIN_GCC    -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-
              attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H  -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I/tmp/br
              -kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc -I/tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-s
              rc/gcc/build -I/tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/../include  -I/tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37t
              fsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/../libcpp/include  \
     11897      -o build/hash-table.o /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/hash-table.c
     11898    note: expanded from macro 'DEF_RTL_EXPR'
     11899       ? RTX_HDR_SIZE + sizeof (reg_info)                                   \
     11900         ^~~~~~~~~~~~
     11901    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/rtl.h:694:22: note: expanded from macro 'RTX_HDR_SIZE'
     11902    #define RTX_HDR_SIZE offsetof (struct rtx_def, u)

     ...

     13646    In file included from /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/genattr.c:26:
     13647    In file included from /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/rtl.h:31:
     13648    In file included from /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/hash-table.h:575:
     13649    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/mem-stats.h:126:1: warning: 'mem_usage' defined as a struct here but previously dec
              lared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
     13650    struct mem_usage
     13651    ^
  >> 13652    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/hash-table.h:350:1: /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikw
              z5ifun2rso6vpuu2w/spack-src/gcc/hash-table.hnote: :did you mean struct here?350
     13653    :1: note: did you mean struct here?
     13654    class mem_usage;
     13655    ^~~~~
     13656    struct
     13657    class mem_usage;
     13658    ^~~~~

     ...

     13975    build/genpreds /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/common.md /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrt
              g5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/i386.md > tmp-preds.c
     13976    build/genpreds -h /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/common.md /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tf
              srtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/i386.md > tmp-preds.h
     13977    build/genconditions /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/common.md /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37
              tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/i386.md > tmp-condmd.c
     13978    build/genpreds -c /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/common.md /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tf
              srtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/i386.md > tmp-constrs.h
     13979    /lustre/home/br-kolgu/spack/lib/spack/env/oneapi/icpx -std=gnu++98   -g -O1 -DIN_GCC    -fno-strict-aliasing -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-
              narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-commo
              n  -DHAVE_CONFIG_H  -DGENERATOR_FILE -fno-PIE -Wl,-rpath,/lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/lib -Wl
              ,-rpath,/lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/lib64 -Wl,-rpath,/lustre/home/br-kolgu/spack/opt/spack/l
              inux-rhel8-zen3/oneapi-2023.2.0/gmp-6.2.1-xqtfzsqghtap6ym6rbhs52ms4kio27h2/lib -Wl,-rpath,/lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/intel-oneapi-runt
              ime-2023.2.0-2ah3tk6qdovkuusve7w2flnyk3hwgxzv/lib -Wl,-rpath,/lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/mpc-1.1.0-vnkm4h4zbucrc6z6apuuittotjziy3ny/lib
               -Wl,-rpath,/lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/oneapi-2023.2.0/mpfr-3.1.6-anhwwubuf4mfinnkajgado3rqvsyo7tn/lib -Wl,-rpath,/lustre/home/br-kolgu/spack/opt/spac
              k/linux-rhel8-zen3/gcc-12.2.0/zlib-ng-2.1.4-bjplwahje7noykqhjer44gvw6lxxxu6a/lib  -no-pie -o build/genattrtab \
     13980        build/genattrtab.o build/rtl.o build/read-rtl.o build/ggc-none.o build/vec.o build/min-insn-modes.o build/gensupport.o build/print-rtl.o build/hash-table.o build/sort.o build
              /read-md.o build/errors.o ../build-x86_64-pc-linux-gnu/libiberty/libiberty.a
  >> 13981    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:26: error: '@@' used without iterators
     13982    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:27: note: following context is `)'
  >> 13983    make[3]: *** [Makefile:2423: s-preds] Error 1
     13984    make[3]: *** Waiting for unfinished jobs....
  >> 13985    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:26: error: '@@' used without iterators
     13986    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:27: note: following context is `)'
  >> 13987    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:26: error: '@@' used without iterators
     13988    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:27: note: following context is `)'
  >> 13989    make[3]: *** [Makefile:2428: s-preds-h] Error 1
  >> 13990    make[3]: *** [Makefile:2433: s-constrs-h] Error 1
  >> 13991    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:26: error: '@@' used without iterators
     13992    /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/gcc/config/i386/sse.md:18340:27: note: following context is `)'
  >> 13993    make[3]: *** [Makefile:2367: s-conditions] Error 1
     13994    10 warnings generated.
     13995    16 warnings generated.
     13996    7 warnings generated.
     13997    rm gcc.pod
     13998    make[3]: Leaving directory '/tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/spack-build/gcc'
  >> 13999    make[2]: *** [Makefile:4667: all-stage1-gcc] Error 2
     14000    make[2]: Leaving directory '/tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/spack-build'
  >> 14001    make[1]: *** [Makefile:22823: stage1-bubble] Error 2
     14002    make[1]: Leaving directory '/tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-src/spack-build'
  >> 14003    make: *** [Makefile:994: all] Error 2

See build log for details:
  /tmp/br-kolgu/spack-stage/spack-stage-gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w/spack-build-out.txt

==> Warning: Skipping build of gromacs-2024.1-qvl47qjtobwiekrtnuryfi3dug3fj7tp since gcc-9.5.0-j6k37tfsrtg5ikwz5ifun2rso6vpuu2w failed
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/openmpi-5.0.3-5pqagzyg6urjutwq4wd6xnu5lvtji4vl
[+] /lustre/home/br-kolgu/spack/opt/spack/linux-rhel8-zen3/gcc-12.2.0/fftw-3.3.10-xenz4ra6qk46p53tzriitjpoz44ax5lm
==> Error: gromacs-2024.1-qvl47qjtobwiekrtnuryfi3dug3fj7tp: Package was not installed
==> Error: Installation request failed.  Refer to reported errors for failing package(s).

I don’t understand why it tries to install gcc@9.5.0
I have loaded gcc@12.2.0 and gcc@9.3.0 but it still tries to install gcc@9.5.0
Also, the oneapi compiler is present on the system so it is not spack installed

Thanks!