Error "Undefined reference to _gfortran_xxx" occured while making

GROMACS version: 2021.2
GROMACS modification: Yes
Hi there, I failed to install GROMACS on Ubuntu 20.04. The “cmake” procedure seemed okay, but “make” failed with errors like:

[ 94%] Linking CXX executable …/…/…/bin/methane-water-integration
/usr/bin/ld: /home/kevin/programs/gromacs_build/lib/libgromacs_mpi.so.6: undefined reference to ‘_gfortran_transfer_integer_write’
/usr/bin/ld: /home/kevin/programs/gromacs_build/lib/libgromacs_mpi.so.6: undefined reference to ‘_gfortran_transfer_character_write’
/usr/bin/ld: /home/kevin/programs/gromacs_build/lib/libgromacs_mpi.so.6: undefined reference to ‘_gfortran_st_write_done’
/usr/bin/ld: /home/kevin/programs/gromacs_build/lib/libgromacs_mpi.so.6: undefined reference to ‘_gfortran_string_len_trim’
/usr/bin/ld: /home/kevin/programs/gromacs_build/lib/libgromacs_mpi.so.6: undefined reference to ‘_gfortran_stop_string’
/usr/bin/ld: /home/kevin/programs/gromacs_build/lib/libgromacs_mpi.so.6: undefined reference to ‘_gfortran_st_write’
collect2: error: ld returned 1 exit status

My cmake command was like:

cmake …/gromacs-2021.2_src -DGMX_USE_LMFIT=internal -DCMAKE_INSTALL_PREFIX=~/programs/gromacs-2021.2 -DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda -DGMX_MPI=ON -DGMX_BUILD_OWN_FFTW=ON -DGMX_FFT_LIBRARY=fftw3 -DGMX_EXTERNAL_BLAS=on -DGMX_PREFIX_PATH=/usr/local -DGMX_DEFAULT_SUFFIX=ON -DGMX_BLAS_USER=/usr/local/lib/libblas.a

I have upgraded all packages before installing, so I think this is not the problem. Any suggestions to this situation? Thanks!