# Installing missing fftw3 package

**URL:** <https://community.freefem.org/t/installing-missing-fftw3-package/2060>\
**Category:** FreeFEM installation\
**Created:** [October 13, 2022, 1:04pm UTC](https://community.freefem.org/t/installing-missing-fftw3-package/2060 "2022-10-13T13:04:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AzizTakhirov](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aziztakhirov/32/26_2.png) [@AzizTakhirov](https://community.freefem.org/u/AzizTakhirov)\
**Post date:** [October 13, 2022, 1:04pm UTC](https://community.freefem.org/t/installing-missing-fftw3-package/2060/1 "2022-10-13T13:04:15Z")

</div>

Dear FreeFEM++ community,  
I’ve been using - version 4.11 with PETSc on my Linux Mint 20.2.  
When I ran the dfft.edp example in the manual, I got the message dfft.so was missing, and the

> ff-c++ -auto dfft.cpp

command gives

> MISSING lib fftw3, Check the WHERE-LIBRARYfiles

How can I install the missing fftw3 package without ruining the existing installation?  
Thanks!

---

<div class="post-metadata">

**Author:** ![AzizTakhirov](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aziztakhirov/32/26_2.png) [@AzizTakhirov](https://community.freefem.org/u/AzizTakhirov)\
**Post date:** [October 14, 2022, 2:57pm UTC](https://community.freefem.org/t/installing-missing-fftw3-package/2060/2 "2022-10-14T14:57:52Z")

</div>

A follow up to my previous question:  
I installed fftw3 and tried go generate dfft.so file via

> ff-c++ -auto FreeFem-sources/plugin/seq/dfft.cpp

command, but I’m getting

> eval FreeFem-sources/plugin/seq/ff-c++ /home/aziz/Documents/SourceCodes/FreeFem-sources/plugin/seq/dfft.cpp -lfftw3  
> g++ -c -fPIC ‘-I/FreeFem-sources/plugin/seq/include’ -g -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG\_LONG\_LONG -DNCHECKPTR -fPIC -I/petsc/arch-FreeFem/include ‘/FreeFem-sources/plugin/seq/dfft.cpp’

g++ -shared -fPIC -g -DNDEBUG -O3 -mmmx -mavx -std=c++14 -DBAMG\_LONG\_LONG -DNCHECKPTR -fPIC -I/petsc/arch-FreeFem/include ‘dfft.o’ -o dfft.so ‘-lfftw3’

> /usr/bin/ld: /usr/local/lib/libfftw3.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

I don’t know how to fix that. On the other hand, without the auto command, it works fine, but doesn’t generate the dfft.so file

> ff-c++ FreeFem-sources/plugin/seq/dfft.cpp

---

<div class="post-metadata">

**Author:** ![AzizTakhirov](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aziztakhirov/32/26_2.png) [@AzizTakhirov](https://community.freefem.org/u/AzizTakhirov)\
**Post date:** [October 15, 2022, 3:01pm UTC](https://community.freefem.org/t/installing-missing-fftw3-package/2060/3 "2022-10-15T15:01:38Z")

</div>

Somehow installing/reinstalling fftw3

> sudo apt-get install libfftw3-dev libfftw3-doc

and reconfiguring fixed the issue.
