NFFT / nfft

The official NFFT library repository
https://tu-chemnitz.de/~potts/nfft/
GNU General Public License v2.0
174 stars 46 forks source link

FFTW3 Linking problem while building #95

Closed benjamin-lieser closed 5 years ago

benjamin-lieser commented 5 years ago

Building the project while following the instruction of the README, I got /usr/bin/ld: //usr/local/lib/libfftw3.a(assert.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC This problems comes from fftw3 not being compiled with -fPIC. So FFTW3 has to be compiled with ./configure --enable-shared It would be helpful when this is checked in the configure script or mentioned in the README

michaelquellmalz commented 5 years ago

Hi, thanks for your comment. I updated the README which now hints to configure the fftw with --enable-shared.

ghost commented 4 years ago

addition of --enable-shared will generate a serious of lib.so files

**

ghost commented 4 years ago

just like this cmake libfftw3f_mpi.a libfftw3l.la libfftw3l_mpi.so.3 libfftw3l.so.3.5.8 libfftw3_mpi.so.3 libfftw3.so.3.5.8 libfftw3.a libfftw3f_mpi.la libfftw3l_mpi.a libfftw3l_mpi.so.3.5.8 libfftw3_mpi.a libfftw3_mpi.so.3.5.8 pkgconfig libfftw3f.a libfftw3.la libfftw3l_mpi.la libfftw3l.so libfftw3_mpi.la libfftw3.so libfftw3f.la libfftw3l.a libfftw3l_mpi.so libfftw3l.so.3 libfftw3_mpi.so libfftw3.so.3

michaelquellmalz commented 4 years ago

For the NFFT, you do not need the libfftw3*_mpi.so (which are produced with --enable-mpi), but we need the libfftw3*_threads.so (which are produced with --enable-threads).

dm8000 commented 2 years ago

hello I am having a similar issue

I just installed FFTW with

./configure --enable-shared but I am still getting the same error

kevinmatthes commented 2 years ago

I had the same problem when installing FFTW3 for NFFT. You need to set more --enable--flags; if I remember correctly, you needed to activate OpenMP as well as the threaded mode. Those three flags should suffice to make the library (NFFT) compile.

You always need to install FFTW3 from sources, even with brew on macOS which will install FFTW3 in the totally wrong configurations. On a Linux system, you can enforce an overview about the provided flags for ./configure (FFTW3) if automatic completion is activated in order to look up the according flags.

tvolkmer commented 2 years ago

@dm8000 Please check that the linker uses the newly installed FFTW. Typically, the compiled version is installed at /usr/local. If the system fftw3 library is also installed (typically at /usr), then the linker may still use the system library. Please make sure that you call the nfft3 configure script with the option --with-fftw3= or --with-fftw3-libdir=