问题
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?
回答1:
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
回答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
来源:https://stackoverflow.com/questions/24834822/pyfftw-installation-cannot-find-lfftw3-threads