[AMBER] problem compiling nmode.c

From: Shan-ho Tsai <tsai.hal.physast.uga.edu>
Date: Tue, 17 Feb 2009 15:38:00 -0500 (EST)

Hello all,

I'm trying to build AmberTools 1.2 on an AIX 5.2 box,
using gcc 3.3.2 (gcc 4.1.2 gave the same errors), and
I am getting an error compiling nmode.c:

         gcc -c -DBINTRAJ -o nmode.o nmode.c
nmode.c: In function `lnorm':
nmode.c:1172: error: `__I' 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.)
make: 1254-004 The error code from the last command is 1.

The system does have /usr/include/complex.h, but it
must be non-standard.

So I added -DUSE_AMBER_C9XCOMPLEX to the compilation
flag to use the local complex.h and then I got many other
errors:

   gcc -c -DBINTRAJ -DUSE_AMBER_C9XCOMPLEX -o nmode.o nmode.c
In file included from nmode.c:6:
complex.h:101: error: parse error before '(' token
complex.h:101: error: conflicting types for `atan2'
complex.h:25: error: previous declaration of `atan2'
complex.h: In function `atan2':
complex.h:101: error: parse error before ',' token
complex.h:103: error: storage class specified for parameter `cabsl'
complex.h:104: error: storage class specified for parameter `clogl'
complex.h:105: error: storage class specified for parameter `cexpl'
....
In file included from nmode.c:10:
../f2c/f2c.h:10: error: storage class specified for parameter `integer'
../f2c/f2c.h:11: error: storage class specified for parameter `uinteger'
../f2c/f2c.h:12: error: storage class specified for parameter `address'
../f2c/f2c.h:13: error: storage class specified for parameter `shortint'
....
nmode.c: In function `diagonchol':
nmode.c:1461: error: invalid lvalue in assignment
nmode.c:1471: warning: passing arg 1 of `dseupd_' from incompatible
pointer type


I am not sure what is causing this problem. Could it be a
conflict with some definitions in /usr/include/math.h ?

The following test file (test.c), compiled with "gcc -c test.c"
from $AMBERHOME/src/nab yielded the same errors as above.

#include <math.h>
#include "complex.h"
#include "../f2c/f2c.h"

int main(void)
{
   return 0;
}

However, when I removed the first line, the compilation went
fine.

What could be causing this problem and any suggestions how
I can get this fixed?

I really appreciate your help.
Thank you!
  Shan-Ho

-----------------------------------------------------------
Shan-Ho Tsai
University of Georgia, Athens, GA


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed Feb 18 2009 - 01:22:09 PST
Custom Search