[gmx-users] compile template.c
Mark Abraham
Mark.Abraham at anu.edu.au
Fri Aug 12 02:24:15 CEST 2011
On 12/08/2011 7:48 AM, Park, Jae Hyun nmn wrote:
> Dear GMX users,
>
> Now, I am trying to write my own gromacs analysis code with gromacs 4.5.3.
> As a first test, when I run "make" in the directory of "template" I got the following message:
>
> ------------------------------
> cc -O3 -fomit-frame-pointer -finline-functions -Wall -Wno-unused -msse2 -funroll-all-loops -std=gnu99 -pthread -I./include -I/usr/include/libxml2 -I/home/h1y/gromacs-4.5.3s/include -I/home/h1y/fftw3s/include -c -o work.o work.c
>
> cc -L/home/h1y/gromacs-4.5.3s/lib -L/home/h1y/fftw3s/lib -o work work.o -lmd -lgmx -lfftw3f -lxml2 -lnsl -lm
>
> /home/h1y/gromacs-4.5.3s/lib/libgmx.a(vmddlopen.o)(.text+0x6): In function `vmddlopen':
>
> : undefined reference to `dlopen'
>
> /home/h1y/gromacs-4.5.3s/lib/libgmx.a(vmddlopen.o)(.text+0x11): In function `vmddlerror':
>
> : undefined reference to `dlerror'
>
> /home/h1y/gromacs-4.5.3s/lib/libgmx.a(vmddlopen.o)(.text+0x21): In function `vmddlsym':
>
> : undefined reference to `dlsym'
>
> /home/h1y/gromacs-4.5.3s/lib/libgmx.a(vmddlopen.o)(.text+0x31): In function `vmddlclose':
>
> : undefined reference to `dlclose'
>
> collect2: ld returned 1 exit status
>
> make: *** [work] Error 1
>
>
> I would deeply appreciate if any help why I got those erros and how to figure out.
Probably when the feature of using the VMD libraries was added, nobody
updated share/template/Makefile.am. You can either disable the use of
the DLOPEN facility from the VMD libraries (used for reading
non-GROMACS-native file formats) when you configure GROMACS, or you can
update share/template/Makefile.am so that
XLIBS = -lmd at LIBSUFFIX@ -lgmx at LIBSUFFIX@ @FFT_LIBS@ @XML_LIBS@
@GSL_LIBS@ @LIBS@
becomes
XLIBS = -lmd at LIBSUFFIX@ -lgmx at LIBSUFFIX@ @FFT_LIBS@ @XML_LIBS@
@GSL_LIBS@ @LIBS@ @DLOPEN_LIBS@
Then get the bootstrap script from a git install of GROMACS and run that
from the main source directory, before configure, make, make install.
Now the installed template Makefile should be able to link properly.
Mark
More information about the gromacs.org_gmx-users
mailing list