# Pkg-config could not detect fftw3f

**URL:** <https://gromacs.bioexcel.eu/t/pkg-config-could-not-detect-fftw3f/5794>\
**Category:** User discussions\
**Created:** [February 14, 2023, 7:51am UTC](https://gromacs.bioexcel.eu/t/pkg-config-could-not-detect-fftw3f/5794 "2023-02-14T07:51:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![purvak](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@purvak](https://gromacs.bioexcel.eu/u/purvak)\
**Post date:** [February 14, 2023, 7:51am UTC](https://gromacs.bioexcel.eu/t/pkg-config-could-not-detect-fftw3f/5794/1 "2023-02-14T07:51:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![alevilla](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/alevilla/32/439_2.png) [@alevilla](https://gromacs.bioexcel.eu/u/alevilla)\
**Post date:** [February 17, 2023, 3:33pm UTC](https://gromacs.bioexcel.eu/t/pkg-config-could-not-detect-fftw3f/5794/2 "2023-02-17T15:33:12Z")

</div>

Hi,  
You can try the option -DGMX\_BUILD\_OWN\_FFTW=ON, maybe it helps  
\Alessandra

---

<div class="post-metadata">

**Author:** ![purvak](https://avatars.discourse-cdn.com/v4/letter/p/bbce88/32.png) [@purvak](https://gromacs.bioexcel.eu/u/purvak)\
**Post date:** [February 18, 2023, 9:44am UTC](https://gromacs.bioexcel.eu/t/pkg-config-could-not-detect-fftw3f/5794/3 "2023-02-18T09:44:09Z")

</div>

yes did that. error solved
