Problem compiling version 2021.2

GROMACS version: 2021.2
GROMACS modification: No


I am trying to compile version 2021.2 on a cluster and I get the following error during the make step:

[ 92%] Building CXX object src/testutils/CMakeFiles/testutils.dir/cmdlinetest.cpp.o
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/ undefined reference to `gmx::GpuHaloExchange::GpuHaloExchange(gmx_domdec_t*, int, int, DeviceContext const&, DeviceStream const&, DeviceStream const&, int, gmx_wallcycle*)'
/opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: ../../lib/ undefined reference to `gmx::PmePpCommGpu::PmePpCommGpu(int, int, DeviceContext const&, DeviceStream const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [src/programs/CMakeFiles/gmx.dir/build.make:102: bin/gmx_mpi] Error 1
make[1]: *** [CMakeFiles/Makefile2:6552: src/programs/CMakeFiles/gmx.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 98%] Built target testutils
make: *** [Makefile:182: all] Error 2

My cmake command is:

I am using gcc version 9.3.1 20200408. Do I need a more recent gcc compiler (version 10, for example)?

Thanks in advance.