You want to compile fftw with either --enable-shared or with --with-pic. Or you need to compile a static version of Gromacs. As the message says you can't use fftw without pic with shared libraries in GROMACS.
Roland On Mon, Dec 20, 2010 at 6:31 PM, Chris Neale <chris.ne...@utoronto.ca>wrote: > Dear Gromacs users: > > I pulled the master version of the source code today at 2pm via: > git clone git://git.gromacs.org/gromacs.git > and I tried to compile it following the instructions posted here: > http://www.gromacs.org/Developer_Zone/Cmake but I was unsuccessful. This > is my first attempt at using cmake, but I have been compiling gromacs > successfully with autoconf since version 3.3.1 > > I have a recent enough version of cmake: > $ cmake --version > cmake version 2.8.0 > > And I have installed fftw: > $ echo $FFTW_LOCATION > /project/pomes/cneale/GPC/exe/intel/fftw-3.1.2_again/exec > $ ls $FFTW_LOCATION/lib > libfftw3f.a libfftw3f.la libfftw3f_threads.a libfftw3f_threads.la pkgconfig > > But then when I try to compile gromacs: > $ cmake ../ -DFFTW3F_INCLUDE_DIR=$FFTW_LOCATION/include > -DFFTW3F_LIBRARIES=$FFTW_LOCATION/lib/libfftw3f.a > -DCMAKE_INSTALL_PREFIX=$(pwd) -DGMX_X11=OFF > -DCMAKE_CXX_COMPILER=/scinet/gpc/intel/Compiler/11.1/072/bin/intel64/icpc > -DCMAKE_C_COMPILER=/scinet/gpc/intel/Compiler/11.1/072/bin/intel64/icc > $ make -j 4 > > I get the error: > ... <snip> ... > [ 72%] Building C object src/mdlib/CMakeFiles/md.dir/tables.c.o > Linking C shared library libmd.so > ld: > /project/pomes/cneale/GPC/exe/intel/fftw-3.1.2_again/exec/lib/libfftw3f.a(mapflags.o): > relocation R_X86_64_32S against `a local symbol' can not be used when making > a shared object; recompile with -fPIC > /project/pomes/cneale/GPC/exe/intel/fftw-3.1.2_again/exec/lib/libfftw3f.a: > could not read symbols: Bad value > make[2]: *** [src/mdlib/libmd.so.6] Error 1 > make[1]: *** [src/mdlib/CMakeFiles/md.dir/all] Error 2 > make: *** [all] Error 2 > > Just to be sure, I recompiled my FFTW and also tried a few different > options for FFTW3F_LIBRARIES, all with errors. > This fftw was compiled the same way I did previously, but just in case our > version of icc was updated and this is causing the problem: > export CC=icc > export CXX=icpc > ./configure --enable-float --enable-threads --prefix=$(pwd)/exec > make > make install > > ############################ USING > -DFFTW3F_LIBRARIES=$FFTW_LOCATION/lib/libfftw3f_threads.a > ... <snip> ... > ../mdlib/libmd.so.6: undefined reference to `fftwf_plan_dft_c2r_3d' > ../mdlib/libmd.so.6: undefined reference to `fftwf_plan_guru_dft_r2c' > ../mdlib/libmd.so.6: undefined reference to `fftwf_plan_dft_r2c_2d' > > ... <snip> ... > > 78%] Building C object src/kernel/CMakeFiles/g_luck.dir/g_luck.c.o > Linking C executable g_luck > Scanning dependencies of target g_protonate > [ 79%] Building C object > src/kernel/CMakeFiles/g_protonate.dir/g_protonate.c.o > [ 79%] /scinet/gpc/intel/Compiler/11.1/072/lib/intel64//libimf.so: warning: > warning: feupdateenv is not implemented and will always fail > Building C object src/tools/CMakeFiles/gmxana.dir/gmx_bundle.c.o > ../mdlib/libmd.so.6: undefined reference to `fftwf_plan_dft_3d' > ../mdlib/libmd.so.6: undefined reference to `fftwf_execute_dft_r2c' > > ... <snip> ... > > Building C object src/tools/CMakeFiles/gmxana.dir/edittop.c.o > [ 88%] Building C object src/tools/CMakeFiles/gmxana.dir/gmx_bar.c.o > [ 89%] Building C object src/tools/CMakeFiles/gmxana.dir/gmx_pme_error.c.o > Linking C shared library libgmxana.so > [ 89%] Built target gmxana > make: *** [all] Error 2 > > ############################ USING -DFFTW3F_LIBRARIES=$FFTW_LOCATION/lib/ > libfftw3f.la > ... <snip> ... > [ 72%] Building C object src/mdlib/CMakeFiles/md.dir/tables.c.o > Linking C shared library libmd.so > /project/pomes/cneale/GPC/exe/intel/fftw-3.1.2_again/exec/lib/libfftw3f.la: > file not recognized: File format not recognized > > ############################ USING -DFFTW3F_LIBRARIES=$FFTW_LOCATION/lib/ > libfftw3f_threads.la > ... <snip> ... > [ 72%] Building C object src/mdlib/CMakeFiles/md.dir/mvxvf.c.o > [ 72%] Building C object src/mdlib/CMakeFiles/md.dir/tables.c.o > Linking C shared library libmd.so > /project/pomes/cneale/GPC/exe/intel/fftw-3.1.2_again/exec/lib/ > libfftw3f_threads.la: file not recognized: File format not recognized > make[2]: *** [src/mdlib/libmd.so.6] Error 1 > make[1]: *** [src/mdlib/CMakeFiles/md.dir/all] Error 2 > make: *** [all] Error 2 > > > Thank you, > Chris. > -- > gmx-users mailing list gmx-users@gromacs.org > http://lists.gromacs.org/mailman/listinfo/gmx-users > Please search the archive at > http://www.gromacs.org/Support/Mailing_Lists/Search before posting! > Please don't post (un)subscribe requests to the list. Use the www interface > or send it to gmx-users-requ...@gromacs.org. > Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > > > -- ORNL/UT Center for Molecular Biophysics cmb.ornl.gov 865-241-1537, ORNL PO BOX 2008 MS6309
-- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists