amber-developers: Re: Installing Ambertools in cygwin

From: Gustavo Seabra <gustavo.seabra.gmail.com>
Date: Sat, 6 Sep 2008 18:09:04 -0400

Hi All,

I noticed some issues when trying to compile ambertools under Cygwin:

I have cygwin with gcc, tcsh and g95 installed, and created the
comfig.h file with the command './configure_at -cygwin'. Configuration
runs nicely. When I try to compile it, compilation dies with the
following message:

        $ make -f Makefile_at clean
        $ make -f Makefile_at
        [...]
        gcc -c -O3 -DCYGWIN -m32 nmode.c
        nmode.c:8:23: complex.h: No such file or directory
        nmode.c: In function `lnorm':
        nmode.c:1160: error: syntax error before "lambda"
        nmode.c:1161: error: syntax error before "piki"
        nmode.c:1172: error: `lambda' undeclared (first use in this function)
        nmode.c:1172: error: (Each undeclared identifier is reported only once
        nmode.c:1172: error: for each function it appears in.)
        nmode.c:1172: error: `I' undeclared (first use in this function)
        nmode.c:1179: error: `sum' undeclared (first use in this function)
        nmode.c:1184: error: `piki' undeclared (first use in this function)
        nmode.c:1188: error: `pili' undeclared (first use in this function)
        nmode.c:1200: error: `cons' undeclared (first use in this function)
        nmode.c:1210: error: `elki' undeclared (first use in this function)
        make[1]: *** [nmode.o] Error 1
        make[1]: Leaving directory `/cygdrive/c/Documents and
Settings/seabra/My Documents/Work/Programs/amber11/src/nab'
        make: *** [install] Error 2

As I was only interested in ptraj, I tried adding the "-" sign in the
nab and antechamber lines in Makefile_at, so the compilation would
ignore any errors and pass that point. However, I then have a
different error:

        $ make -f Makefile_at clean
        $ make -f Makefile_at
        [...]
        gcc -c -DCYGWIN -m32 -DBINTRAJ -o clusterLib.o clusterLib.c
        gcc -o rdparm.exe main.o rdparm.o dispatch.o help.o utility.o second.o io.o
                trajectory.o evec.o torsion.o mask.o rms.o display.o interface.o
energy.o experimental.o
                ptraj.o actions.o analyze.o thermo.o pubfft.o cluster.o clusterLib.o
/home/seabra/work/Programs/amber11/lib/libpdb.a
                /home/seabra/work/Programs/amber11/lib/libsym.a
/home/seabra/work/Programs/amber11/lib/arpack.a
                /home/seabra/work/Programs/amber11/lib/lapack.a
/home/seabra/work/Programs/amber11/lib/blas.a
                /home/seabra/work/Programs/amber11/lib/f2c.a
/home/seabra/work/Programs/amber11/lib/libmc.a
../netcdf/lib/libnetcdf.a
        gcc: /home/seabra/work/Programs/amber11/lib/libsym.a: No such file or directory
        make[1]: *** [rdparm.exe] Error 1
        make[1]: Leaving directory `/cygdrive/c/Documents and
Settings/seabra/My Documents/Work/Programs/amber11/src/ptraj'
        make: *** [install] Error 2

So, it looks like ptraj needs libsym.a to compile, this is compiled in
the 'nss' directory. I tried to force its compilation:

        $ cd nss
        $ make libsym.a
        /home/seabra/work/Programs/amber11/bin/nab -c symop.nab
        make: /home/seabra/work/Programs/amber11/bin/nab: Command not found
        make: *** [symop.o] Error 127

So, ptraj needs libsym.a, which in turn needs nab, which doesn't
compile (at least in my cygwin installation) because 'nmode.c' cannot
find 'complex.h'. So, (finally :-) ) I want to ask:
        1. I understand that I may be missing something in my cygwin
installation, but what?
        2. Aren't those compilations supposed to be independent?
                I mean, should I not be able to install only ptraj if that's all I need?
                
Anyways, I did find a workaround. It is documented *only in nmode.c
source file*, not in any config file. After the error, I can compile
only nmode.c with:

        $ cd nab
        $ gcc -c -O3 -DCYGWIN -m32 -DUSE_AMBER_C9XCOMPLEX -DBINTRAJ nmode.c

After that, everything else compiles just fine:

        $ cd ..
        $ make -f Makefile_at
        [...] (plus a bunch of warnings from gleap)
        Completed installation of AmberTools, version 1.2

There's no documentation about the use of '-DUSE_AMBER_C9XCOMPLEX'
anywhere. However, I'm not really convinced it should be necessary,
but I can't identify what I'm missing here. Any ideas?

Thanks,
Gustavo.
Received on Sun Sep 07 2008 - 06:08:08 PDT
Custom Search