2013/4/1 Sikandar Mashayak <[email protected]>: > Hi > > I am trying to compile votca csg in cygwin using "build.sh". However, it is > not able to link to gromacs libraries and giving following error: > > checking for module 'libgmx' > -- found libgmx, version 4.6.1 > -- Looking for GromacsVersion in /opt/gromacs/lib/libgmx.a;/usr/lib/libm.a > -- Looking for GromacsVersion in /opt/gromacs/lib/libgmx.a;/usr/lib/libm.a - > n ot found > CMake Error at CMakeModules/FindGROMACS.cmake:84 (message): > Could not find GromacsVersion in > /opt/gromacs/lib/libgmx.a;/usr/lib/libm.a, > take look at the error message in > /home/Sikandar/Apps/Votca/src/csg/CMakeFiles/CMakeError.log to find out > what was going wrong. If you don't have pkg-config installed you will > most > likely have to set GROMACS_LIBRARY and GROMACS_DEP_LIBRARY by hand which > sets the gromacs lib and it's depencies (i.e. > -DGROMACS_LIBRARY='/path/to/libgmx.so' > -DGROMACS_DEP_LIBRARIES='/path/to/libblas.so;/path/to/libm.so') ! > Call Stack (most recent call first): > src/libcsg/CMakeLists.txt:23 (find_package) > > error log file is also attached
In there it says: /opt/gromacs/lib/libgmx.a(copyrite.c.o):copyrite.c:(.text+0x1fff): undefined reference to `fftwf_version' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0x65): undefined reference to `omp_get_num_threads' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0x6c): undefined reference to `omp_get_thread_num' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0x4ca): undefined reference to `omp_get_num_threads' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0x4d1): undefined reference to `omp_get_thread_num' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0x9a53): undefined reference to `omp_get_num_threads' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0x9a60): undefined reference to `omp_get_thread_num' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0xd2da): undefined reference to `GOMP_parallel_start' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0xd2e7): undefined reference to `GOMP_parallel_end' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0xd68f): undefined reference to `GOMP_parallel_start' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0xd69c): undefined reference to `GOMP_parallel_end' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0xd75c): undefined reference to `GOMP_parallel_start' /opt/gromacs/lib/libgmx.a(bondfree.c.o):bondfree.c:(.text+0xd769): undefined reference to `GOMP_parallel_end' That means you will have to add /usr/lib/libfftwf.a and /lib/libgomp.a to GROMACS_DEP_LIBRARIES, the omp stuff can also be done by adding -fopenmp to CXXFLAGS. The errors are mainly due to the fact that the static libgmx (.a suffix) doesn't contain any link information. Have you tried building gromacs with BUILD_SHARED_LIBS=ON ? Cheers, Christoph > > Thanks > Sikandar > > -- > You received this message because you are subscribed to the Google Groups > "votca" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/votca?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > -- Christoph Junghans Web: http://www.compphys.de -- You received this message because you are subscribed to the Google Groups "votca" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/votca?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
