Error build 2023.2, 2023.1 and 2022.6 with gcc/11.4.0 and cuda/11.8.0

GROMACS version: 2023.2, 2023.1 and 2022.6
GROMACS modification: No
Here post your question

Using:

cmake -DCMAKE_INSTALL_PREFIX=/apps/u/opt/gcc/11.4.0/gromacs/2023.2/ -DGMX_MPI=ON -DGMX_GPU=CUDA -DGMX_BUILD_OWN_FFTW=ON -DGMX_BUILD_UNITTESTS=ON -DCMAKE_C_COMPILER=/apps/u/spack/gcc/8.5.0/gcc/11.4.0-dll2s4f/bin/gcc -DCMAKE_CXX_COMPILER=/apps/u/spack/gcc/8.5.0/gcc/11.4.0-dll2s4f/bin/g++

I’m getting the following during the make install:

[ 79%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/applied_forces/qmmm/qmmminputgenerator.cpp.o
[ 79%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/applied_forces/qmmm/qmmmtopologypreprocessor.cpp.o
/apps/u/opt/gcc/11.4.0/gromacs/2023.2/src/gromacs/applied_forces/qmmm/qmmmtopologypreprocessor.cpp: In member function 'void gmx::QMMMTopologyPreprocessor::buildQMMMAtomNumbers(gmx_mtop_t*)':
/apps/u/opt/gcc/11.4.0/gromacs/2023.2/src/gromacs/applied_forces/qmmm/qmmmtopologypreprocessor.cpp:277:17: error: base operand of '->' has non-pointer type 'AtomIterator'
  277 |     while (atoms->globalAtomNumber() < mtop->natoms)
      |                 ^~
/apps/u/opt/gcc/11.4.0/gromacs/2023.2/src/gromacs/applied_forces/qmmm/qmmmtopologypreprocessor.cpp:280:18: error: base operand of '->' has non-pointer type 'AtomIterator'
  280 |         if (atoms->atom().atomnumber < 0)
      |                  ^~
/apps/u/opt/gcc/11.4.0/gromacs/2023.2/src/gromacs/applied_forces/qmmm/qmmmtopologypreprocessor.cpp:285:28: error: base operand of '->' has non-pointer type 'AtomIterator'
  285 |                       atoms->globalAtomNumber());
      |                            ^~
/apps/u/opt/gcc/11.4.0/gromacs/2023.2/src/gromacs/applied_forces/qmmm/qmmmtopologypreprocessor.cpp:288:37: error: base operand of '->' has non-pointer type 'AtomIterator'
  288 |         atomNumbers_.push_back(atoms->atom().atomnumber);
      |                                     ^~
At global scope:
cc1plus: note: unrecognized command-line option '-Wno-cast-function-type-strict' may have been intended to silence earlier diagnostics
make[2]: *** [src/gromacs/CMakeFiles/libgromacs.dir/build.make:9344: src/gromacs/CMakeFiles/libgromacs.dir/applied_forces/qmmm/qmmmtopologypreprocessor.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4280: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

I’m using openmpi/4.1.5 (built with gcc/11.4.0).

Any suggestions?