Pkg-config could not detect fftw3f

GROMACS version: 2021.5
GROMACS modification: no

According to the manual, I am first doing a build of gromacs by configuring it with cmake. I have used the following commands:
tar xfz gromacs-2021.5.tgz
cd gromacs-2021.5
mkdir build-gromacs
cd build-gromacs
cmake …

However, when i run cmake i get the following error;
pkg-config could not detect fftw3f, trying generic detection
Could not find fftw3f library named libfftw3f, please specify its location in CMAKE_PREFIX_PATH or FFTWF_LIBRARY by hand (e.g. -DFFTWF_LIBRARY=‘/path/to/libfftw3f.so’)

I have searched for the libfftw3f, but it is not there. Instead, I have a zip file name libfftw3.a in the fftw lib directory. Please help me how to solve this error. I have already tried to install fftw in various ways but none gives me the required library.

Hi,
You can try the option -DGMX_BUILD_OWN_FFTW=ON, maybe it helps
\Alessandra

yes did that. error solved