[gmx-developers] Re:How to compile and run new tools from template.c?

David spoel at xray.bmc.uu.se
Wed Nov 12 20:46:05 CET 2003


On Wed, 2003-11-12 at 19:59, Senthil Kandasamy wrote:
> When I follow the procedure followed by Jason, I got the same errors.
> So I included an extra path in the Makefile.i686..... for CFLAGS to point to 
> -I/home/senthilk/local/gromacs-3.1.4/include.
> then, when I type make -f Makefile.i686 .... It seemed to compile, but it stopped with an error about 
> 
> /usr/bin/ld: cannot find -lmd
> I noticed that a template.o has been created, but not a "template" executable.
> Do I have to include an extra path or something? What am I doing wrong?
> Or rather, the question should be, am I doing anything correctly at all?
> 
> Senthil

did you do a source GMXRC?

In principle you should add the program to Makefile.am and then run
make. (just copy the  syntax from some other program)
> 
> 
> 
> 
> __________________________________________________
> Jason wrote:
> 
> Hi,
> I just looked inside my share/tools/. There were three
> makefile: Makefile, Makefile.am and Makefile.in as well
> as the program template.c. So I typed "make" which ended
> up producing another makefile: Makefile.i686-pc-linux-gnu
> This file has one target clearly aimed at compiling template.c.
> So I typed "make -f Makefile.i686-pc-linux-gnu". This produced
> a bunch of errors on compilation:
> 
> mpicc -O6 -fomit-frame-pointer -finline-functions -Wall -Wno-unused
> -malign-double -funroll-all-loops   -I/usr/X11R6/include 
> -I/home/dejo/include/gromacs     -c -o template.o template.c
> template.c:40:22: statutil.h: No such file or directory
> template.c:41:22: typedefs.h: No such file or directory
> template.c:42:21: smalloc.h: No such file or directory
> template.c:43:17: vec.h: No such file or directory
> template.c:44:22: copyrite.h: No such file or directory
> template.c:45:22: statutil.h: No such file or directory
> template.c:46:19: tpxio.h: No such file or directory
> 
> etcetera
> 
> My gromacs is installed only in my user account (using the 
> configure script). The include path "-I/home/dejo/include/gromacs"
> is wrong. So I changed it to the right one and now it works.
> I have the object "template.o" available now.
> 
> Now it is probably necessary to install this object as a binary
> or integrate it with the gromacs source somehow but I am not
> clear on that.
> 
> 
> 
> 
> _______________________________________________
> gmx-developers mailing list
> gmx-developers at gromacs.org
> http://www.gromacs.org/mailman/listinfo/gmx-developers
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-developers-request at gromacs.org.
-- 
David.
________________________________________________________________________
David van der Spoel, PhD, Assist. Prof., Molecular Biophysics group,
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://xray.bmc.uu.se/~spoel
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++




More information about the gromacs.org_gmx-developers mailing list