Error installing gromacs 2021.4

GROMACS version: 2021.4
GROMACS modification: Yes/No

Hi,

I am getting this error while installing gromacs 2021.4 please help me with it.

I configured cmake as follows:

cmake … -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DGMX_MPI=ON -DGMX_GPU=CUDA -DGMX_SIMD=AVX2_256 -DCMAKE_PREFIX_PATH=/usr/local/gromacs2021 -DCMAKE_INSTALL_PREFIX=/usr/local/gromacs2021 -DBUILD_SHARED_LIBS=ON -DGMX_FFT_LIBRARY=fftw3 -DCMAKE_BUILD_TYPE=Debug -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-11.7

after this I am getting an error as follows:

[ 92%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/selelem.cpp.o
[ 92%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/selhelp.cpp.o
[ 92%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/selmethod.cpp.o
[ 92%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/selvalue.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_compare.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_distance.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_insolidangle.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_keywords.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_merge.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_permute.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_position.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_same.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/sm_simple.cpp.o
[ 94%] Building CXX object src/gromacs/CMakeFiles/libgromacs.dir/selection/symrec.cpp.o
[ 94%] Linking CXX shared library …/…/lib/libgromacs_mpi.so
/usr/bin/ld: /usr/local/lib/libfftw3f.a(conf.o): warning: relocation against fftwf_solvtab_dft_sse2' in read-only section .text’
/usr/bin/ld: /usr/local/lib/libfftw3f.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5’ can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [src/gromacs/CMakeFiles/libgromacs.dir/build.make:13232: lib/libgromacs_mpi.so.6.0.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:4392: src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
make: *** [Makefile:166: all] Error 2

Thanks.