How can I fix the problem of installing gromacs?

I'm trying to install gromacs-5.1.5.
I followed the installation guide of the recommendation.
(Http://manual.gromacs.org/documentation/5.1.5/install-guide/index.html)

But I have an error ..

/ usr / bin / ld: ../contrib/fftw/fftwBuild-prefix/lib/libfftw3f.a(assert.o): The relocation R_X86_64_PC32 against the symbol "stdout @@ GLIBC_2.2.5" can not be used when creating a shared object; recompile with -fPIC
/ usr / bin / ld: final link failure: invalid value
collect2: error: ld returned 1 exit status
src / gromacs / CMakeFiles / libgromacs.dir / build.make: 17627: The recipe for the target "lib / libgromacs.so.1.5.0" failed.
make[2]: * [lib/libgromacs.so.1.5.0] Error 1
CMakeFiles / Makefile2: 2031: The recipe of the target & # 39; src / gromacs / CMakeFiles / libgromacs.dir / all & # 39; has failed.
make[1]: *
[src/gromacs/CMakeFiles/libgromacs.dir/all] Error 2
Makefile: 162: the recipe for the target & # 39; all & # 39; has failed
make: *** [all] Error 2

This error occurred after cmake and make glend.
cmake .. -DGMX_BUILD_OWN_FFTW = ON -DREGRESSIONTEST_DOWNLOAD = ON
make —> error

Is there anyone who can help me?

I've installed gromacs-2018.1 before,
But I need version 5.1.5, so I delete the 2018.1 version and have tried to install version 5.1.5.
But I do not know why he makes a mistake ..

Thank you