FFT segmentation violation

I am running
ROOT 5.20/00 (tags/v5-20-00@24532, Sep 23 2008, 17:12:35 on linuxx8664gcc)
on ubuntu hardy heron.
The configuration is the following:

[code]export ROOTSYS=/usr/local/root

./configure linuxx8664gcc --enable-soversion --enable-python --enable-gsl-shared --enable-shared --enable-fftw3 --with-fftw3-incdir=/usr/local --with-fftw3-libdir=/usr/lib

export ROOTSYS=/usr/local/root
export PATH=$ROOTSYS/bin:$PATH

I have installed the ubuntu fft packages:
fftw3, libfftw3-3, libfftw3-dev

These packages have version 3.1.2-2ubuntu2 (fftw3) and 3.1.2-3ubuntu1 (libfftw3-3 and libfftw3-dev).

When running the tutorial FFT.C, I am running into a segmentation violation when executing the line

[quote]*** Break *** segmentation violation
Attaching to program: /proc/16453/exe, process 16453
[Thread debugging using libthread_db enabled]
[New Thread 0x2b56e27f54d0 (LWP 16453)]
0x00002b56e22f74a5 in waitpid () from /lib/libc.so.6
error detected on stdin
The program is running. Quit anyway (and detach it)? (y or n) [answered Y; input not from terminal]
Detaching from program: /proc/16453/exe, process 16453
Root > Function FFT() busy flag cleared[/quote]

In gdb,
I get the following backtrace:

[quote]Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b9a65511370 (LWP 16486)]
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00002b9a68dae256 in TFFTRealComplex::TFFTRealComplex () from /usr/local/root/lib/libFFTW.so
#2 0x00002b9a68db7f52 in G__G__FFTW_104_0_4 () from /usr/local/root/lib/libFFTW.so
#3 0x00002b9a6023c400 in Cint::G__CallFunc::Execute () from /usr/local/root/lib/libCint.so.5.20
#4 0x00002b9a5fa35851 in TCint::CallFunc_ExecInt () from /usr/local/root/lib/libCore.so.5.20
#5 0x00002b9a5fa2ccbb in TMethodCall::Execute () from /usr/local/root/lib/libCore.so.5.20
#6 0x00002b9a5f9ad4d7 in TPluginHandler::ExecPlugin () from /usr/local/root/lib/libCore.so.5.20
#7 0x00002b9a5f9f121c in TVirtualFFT::FFT () from /usr/local/root/lib/libCore.so.5.20
#8 0x00002b9a6156fced in TH1::FFT () from /usr/local/root/lib/libHist.so.5.20
#9 0x0000000000402e39 in main (argc=1, argv=0x7fff4b4dd688) at meinfft.cc:70
(gdb) [/quote]

I don’t know what is happening and would be glad if anyone could help me.


As the first step, could you make sure that fftw is installed correctly by running some of their internal tests, without ROOT involved?


I would like to do that.
Just tried to run the bench thing in the examples subdirectory.
Doesn’t compile, a whole file is missing.
Do you know any test I could run, post the code?
Bye, Bjoern

Hi Bjoern,

I’d say, that if you can’t compile bench, it’s a bad sign, and it probably doesn’t make sense to try other tests. I have installed from source, and, to be honest, I have no idea how the ubuntu packages work and what could go wrong in that part. I’ll try to ask the experts.


Hi Bjørn,

(I assume the ‘oe’ is really ‘ø’ :slight_smile:

I’m a little puzzled why you have


That is, you point to the headers in /usr/local, while you point at headers in /usr/lib. That seems inconsistent. I think you should point at headers in /usr/include instead. Debian (and by extension Ubuntu) packages should never install in /usr/local.

Also, why have you installed the package fftw3? It’s most likely a transitional dummy package and should be harmless though.

Don’t expect to be able to build the bench.c program - some headers are missing.

I ran the FFT.C script through my ROOT installation (5.19/05) with no problems.

I think you should recheck your build. If you still have problems, rebuild ROOT with debugging symbols (configure option –build=debug) and run the script in ROOT via GDB to get more information.

Sorry I couldn’t do more for you.


Thanks for all the comments.
You were right with the wrong includedirs; but I did try to compile root without fftw flags, which should work, because ubuntu’s fftw is installed in /usr/include and /usr/lib.
I solved the problem by manually downloading fftw3 and installing in /usr/local/include and /usr/local/lib, and then linking root against these directories.
FFT works now.