AMBER Archive (2009)
Subject: Re: [AMBER] problem building AmberTools/sleap on AIX
From: Shan-ho Tsai (tsai_at_hal.physast.uga.edu)
Date: Fri Jan 16 2009 - 14:58:53 CST
I'm still struggling to get sleap to build on AIX.
As my last posting in this thread indicates, I've
tried to compile all mortsrc/nablib code (both C
and C++ code) with g++. However, I got an error
when compiling memutil.c (incorrect C++ syntax
in nab.h). Is there a way I can modify nab.h
(line 219) to make it compatible with g++ ?
I've also tried using the IBM xlC compiler, but
got an error compiling one of the C++ programs.
As this is not listed as a supported compiler for
AmberTools, I didn't pursue this path further.
Any other suggestions?
Thanks in advance,
On Mon, 12 Jan 2009, Shan-ho Tsai wrote:
> Hi Wei,
> Thank you very much for your response. I made the change
> in src/gleap/mortsrc/nablib/Makefile that you suggested
> and recompiled. I am getting an error compiling memutil.c.
> The error message is:
> g++ -c -Dflex -DMORT -O3 -DBINTRAJ -o memutil.o memutil.c
> In file included from memutil.c:4:
> nab.h:219: error: expected ',' or '...' before '&' token
> nab.h:219: error: ISO C++ forbids declaration of 'molecule_t'
> with no type
> gmake: *** [memutil.o] Error 1
> Line 219 in nab.h is
> double molsurf(const molecule_t&, double, bool verbose=false );
> I got this error using either g++ 3.3.2 or 4.1.2.
> Thank you!
> On Fri, 9 Jan 2009, Wei Zhang wrote:
>> It looks like due to C++ name mangling, maybe because we use gcc to
>> compile c source
>> code, but use g++ to compile c++ code and link them together.
>> Can you try the following:
>> find file amber10/src/gleap/mortsrc/nablib/Makefile. Change line 3 to 4
>> $(CC) -c -Dflex -DMORT $(OCFLAGS) -o $@ $<
>> $(CXX) -c -Dflex -DMORT $(OCFLAGS) -o $@ $<
>> then recompile. This will make sure c code will also compiled by c++
AMBER mailing list