1

I am trying to install pyFFTW on my Opensuse 13.1 x86_64 for a couple of days now and running into some issues all the time: I could not install pyFFTW for the first time due to some missing libraries of fftw. I found that it would be the best to install fftw from source, what I then did.

This solves the problem of a missing library but a different problem arises, when I try to either build pyFFTW from source or by using pip for the installation:

/usr/local/lib64/libfftw3.a: could not read symbols: Bad value

I found some people with a similar problem, but not a real solution for this. I found a hint in this thread, but I could not figure out, where in the installation process I could change the compiler flag. Furthermore I found in the logs of the fftw configuring process:

checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes

Any ideas?

Thanks!

EDIT:

I tried the to use --enable-shared and enable as configure flags an

/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3f 
/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3l 
/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3_threads 
/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3f_threads 
/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3l_threads

I then did some research and found, that ./configure can have a --enable-float flag, which reduced the error message to:

/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3l
/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3_threads
/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3l_threads

Since the suffix l seems to stand for long-double I found, that I could use --enable-long-double. But now I am stuck with:

/ ... /x86_64-suse-linux/bin/ld: cannot find -lfftw3_threads

My current ./configure looks is this:

./configure --enable-long-double --enable-threads --enable-openmp --enable-shared

Anybody knows, how to get this library in place?

freeone
  • 39
  • 2
  • 8
  • 1
    try compiling a shared library of fftw3, add --enable-shared to the configure call, that should avoid PIC issues. Also don't forget to add --enable-sse2 (or --enable-avx) to get decent performance – jtaylor Jul 18 '14 at 23:22
  • Now I get /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lfftw3f /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lfftw3l /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lfftw3_threads /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lfftw3f_threads /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld: cannot find -lfftw3l_threads while installing pyfftw via pip... :-/ – freeone Jul 20 '14 at 02:02
  • build with --enable-threads to add the thread library, also you apparently need all variants which can be built by using --enable-single and --enable-long-double. You have to configure, build and install three times. – jtaylor Jul 21 '14 at 18:54

2 Answers2

2

You have to download basic FFTW package from here and build this 3 times as follows:

$ cd ~/bin/fftw-3.3.5

or other directory you chose to unpack archive,

$ ./configure --enable-threads --enable-shared
$ make
$ sudo make install
$ ./configure --enable-threads --enable-shared --enable-float
$ make
$ sudo make install
$ ./configure --enable-threads --enable-shared --enable-long-double 
$ make
$ sudo make install

The source: https://github.com/pyFFTW/pyFFTW/issues/70

Mesco
  • 1,254
  • 13
  • 21
0

And I can add a detail about how to invoke pip install [OS X 10.9.5]: it should read something like this, in order to find all 3 installations of FFTW.

rollett$ sudo CPATH=/Users/Shared/fftw334single/include/
LIBRARY_PATH=/Users/Shared/fftw334single/lib/:/Users/Shared/fftw334/lib/:/Users/Shared/fftw334long/lib/ 
pip install pyFFTW
i alarmed alien
  • 9,412
  • 3
  • 27
  • 40