<br><br><div class="gmail_quote">On Mon, Dec 20, 2010 at 8:20 PM,  <span dir="ltr">&lt;<a href="mailto:chris.neale@utoronto.ca">chris.neale@utoronto.ca</a>&gt;</span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


Just for completeness, I could not get fftw to compile with --enable-shared (although I don&#39;t need to any more):<br>
<br>
$ ./configure --enable-float --enable-threads --enable-shared --prefix=/project/pomes/cneale/GPC/exe/intel/fftw-3.1.2/exec<br>
$ make<br>
<br>
.. &lt;snip&gt; ...<br>
rm -fr  .libs/libfftw3f.a .libs/<a href="http://libfftw3f.la" target="_blank">libfftw3f.la</a> .libs/libfftw3f.lai<br>
icc -c99 -shared  -Wl,--whole-archive kernel/.libs/libkernel.a dft/.libs/libdft.a dft/codelets/.libs/libdft_codelets.a dft/codelets/standard/.libs/libdft_standard.a rdft/.libs/librdft.a rdft/codelets/.libs/librdft_codelets.a rdft/codelets/r2hc/.libs/librdft_codelets_r2hc.a rdft/codelets/hc2r/.libs/librdft_codelets_hc2r.a rdft/codelets/r2r/.libs/librdft_codelets_r2r.a reodft/.libs/libreodft.a api/.libs/libapi.a -Wl,--no-whole-archive  -L/scratch/cneale/GPC/exe/intel/fftw-3.1.2/exec/lib -lm  -pthread -Wl,-soname -Wl,libfftw3f.so.3 -o .libs/libfftw3f.so.3.1.2<br>


icc: command line remark #10010: option &#39;-c99&#39; is deprecated and will be removed in a future release. See &#39;-help deprecated&#39;<br>
ld: kernel/.libs/libkernel.a(alloc.o): relocation R_X86_64_32 against `a local symbol&#39; can not be used when making a shared object; recompile with -fPIC<br>
kernel/.libs/libkernel.a(alloc.o): could not read symbols: Bad value<br>
make[2]: *** [<a href="http://libfftw3f.la" target="_blank">libfftw3f.la</a>] Error 1<br>
make[2]: Leaving directory `/project/pomes/cneale/GPC/exe/intel/fftw-3.1.2_again&#39;<br>
make[1]: *** [all-recursive] Error 1<br>
make[1]: Leaving directory `/project/pomes/cneale/GPC/exe/intel/fftw-3.1.2_again&#39;<br>
make: *** [all] Error 2<br></blockquote><div><br></div><div>You need to run &quot;make clean&quot; when you change the configure options.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


It will be nice to see some example build instructions on the gromacs site as people have time to add them.<br></blockquote><div>Please contribute you experience to the wiki pages. Good documentation requires many people to help. The (main) developers are often too busy too write detailed documentation. </div>

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


<br>
------------------------------<br>
<br>
--<br>
gmx-users mailing list<br>
<a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at  <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
<br>
End of gmx-users Digest, Vol 80, Issue 135<br>
******************************************<br>
<br>
</blockquote>
<br>
<br>
<br>
-- <br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don&#39;t post (un)subscribe requests to the list. Use thewww interface or send it to <a href="mailto:gmx-users-request@gromacs.org" target="_blank">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>ORNL/UT Center for Molecular Biophysics <a href="http://cmb.ornl.gov">cmb.ornl.gov</a><br>865-241-1537, ORNL PO BOX 2008 MS6309<br>