Root installation to be able to use TF1Convolution and RooGExpModel

How do I install root properly with fftw3 to be able to do convolution-based studies using TF1Convolution and RooGExpModel? I tried to run the TF1Convolution example and got an error:
Cannot use FFT, probably FFTW package is not available. Switch to numerical convolution

Since I did not turn on the fftw3 flag ‘ON’ during root installation, I assumed the error was coming from there. So, I installed root with the following flags: “cmake -DCMAKE_INSTALL_PREFIX=~/root/install/ ~/root/root_src/root_v6.32.06.source/root-6.32.06/ -DCMAKE_CXX_STANDARD=17 -Dfftw3=ON”
and then did “cmake --build . – -j4”
The installation was successful but when I tried “root-config --has-fftw3”, the answer was still “no”.

So, I tried the -Dbuiltin_fftw3=ON flag and repeated the steps. I got the error

"CMake Error at /home/dhanurdhar/root/build/FFTW3-prefix/src/FFTW3-stamp/FFTW3-build-Release.cmake:49 (message):
Command failed: 2

‘make’ ‘CFLAGS=-fPIC’

See also /home/dhanurdhar/root/build/FFTW3-prefix/src/FFTW3-stamp/FFTW3-build-*.log"

I tried installing fftw3 from here with the correct cflags and repeated the above steps. I always get the error:

‘make’ ‘CFLAGS=-fPIC’

How do I successfully install root in this case? If anybody has encountered this installation issue, please let me know. Thanks in advance.

Hi Dhanurdhar,

Sorry to read ROOT did not work on your system out of the box.
Have you looked at the logs? Perhaps there is an error message there.
What is your platform?

Best,
D
PS
The latest stable is 6.32.08, in case you are interested.

Hey Danilo, thanks for your response. I’m using Ubuntu 22.04.

Unfortunately, I deleted the files in my build directory to install it again. So I don’t have the log files. I saw a solution here https://github.com/root-project/root/issues/14162 that says to install a version before 6.30.00 which has fftw3.

I have ROOT 6.30.08 (without the fftw3) which works perfectly fine and I’m trying to install 6.28.10 in a separate build and install directories. But now there is another issue. When I did “cmake --build . – -j4”, it worked for about 55-56% and then stopped. So I did “cmake --build . – -j”. It ran for a while before the entire thing crashed. My terminal shuts down, and all my other tabs and windows are closed. My PC also froze. Any idea why that could be happening?

I could also try to install version 6.32.08, but from my experience, I guess it will crash when I do the “cmake” step.

PS: Even without the fftw3 option in my ROOT 6.30.08, I can successfully run the RooFit tutorial example rf208_convolution.C but not the ROOT example fitConvolution.C, which I don’t understand how, even though I have the relevant files like TF1Convolution.h and TVirtualFFT.h. I get the error:

“Error in TVirtualFFT::FFT: handler not found
Error in TVirtualFFT::FFT: handler not found
Warning in TF1Convolution::MakeFFTConv: Cannot use FFT, probably FFTW package is not available. Switch to numerical convolution”.
Is the “TVirtualFFT::FFT: handler” related to the installation of the FFTW package? I assume that it wouldn’t work without it, right?

Thanks again,
Dhanurdhar

Hi,

I cannot clearly follow. What I believe we are facing is a misconfiguration of your node.
What I was asking are the /home/dhanurdhar/root/build/FFTW3-prefix/src/FFTW3-stamp/FFTW3-build-*.log files. I think that would be a first step for the debugging.

Cheers,
Danilo