“root-config --has-fftw3” always no


I wanted to run the example of the Fourier transformer, but it crushes.
I checked some posts (Compilation with ROOT FFTW Wrapper) and
tried “root-config --has-fftw3”. The answer was “no”.
I am using Ubuntu 16.04 with:

gcc --version: gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904
cmake --version: cmake version 3.9.0-rc5

I installed libfftw3-dev (as reported here https://root.cern.ch/build-prerequisites#ubuntu) through apt-get install.
If I ask “locate libfftw3.so”, the answer is

So, I added /usr/lib/x86_64-linux-gnu/ to the path of LD_LIBRARY_PATH in my .bashrc and rebuilt root, but
again the answer to “root-config --has-fftw3” was “no”.

I have then decided to go to /usr/lib and create a symbolic link to /usr/lib/x86_64-linux-gnu/libfftw3.so
Now, the result of “locate libfftw3.so”, is

So I rebuilt root once again, but the answer to “root-config --has-fftw3” is still “no”.
I build root with
cmake …/root-source-directory
cmake --build .
. bin/thisroot.sh
and add a “source” to bin/thisroot.sh in my .bashrc

Should I ask somehow to enable fft when I build root? If so, how, please?



You should configure ROOT with

cmake -Dfftw3=ON …/root-source-directory

If came still does not find fftw3, you can either use the option
-Dbuiltin_fftw3=ON or provide directly the location of fifth by defining

See CMAKE build options https://root.cern.ch/building-root#options
and the options for External libraries


Thanks a lot!
It works!


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.