Search code examples
installationlibrariesfftw

Missing dynamic (.so) library in fftw 2.1.5 installation


I am trying to run simulations using Gadget2, an astrophysics N-body simulation package. It requires a few libraries, including fftw-2.1.5. I have installed fftw using the guidelines given in the user manual:

 ./configure --prefix=<PATH> --enable-typeprefix --enable-mpi
 make
 make install
 make clean
 ./configure --prefix=<PATH> --enable-float--enable-type-prefix --enable-mpi
 make
 make install

The two makes are to get both single and double precision files according to this source. The install happened successfully, and I was also able to compile Gadget2.

But when I try to run Gadget2, I get the following error:

./Gadget2: error while loading shared libraries: libsrfftw_mpi.so.2: cannot open shared object file: No such file or directory

The file libsrfftw_mpi.so.2 is missing in the fftw lib folder, even though a few download sites for fftw packages say that it is part of the contents. What am I missing?


Solution

  • Specify the below and run your command again.

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH=<PATH from your install command>
    

    also don't forget to additionally specify --enable-shared for both configure commands.