Re: [AMBER] problem building AmberTools/sleap on AIX

From: Shan-ho Tsai <tsai.hal.physast.uga.edu>
Date: Fri, 16 Jan 2009 15:58:53 -0500 (EST)

Hi all,

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,
Shan-Ho


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[2]: *** [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!
> Shan-Ho
>
> On Fri, 9 Jan 2009, Wei Zhang wrote:
>
>> Hi,
>>
>> 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
>> from:
>>
>> .c.o:
>> $(CC) -c -Dflex -DMORT $(OCFLAGS) -o $. $<
>>
>> to
>> .c.o:
>> $(CXX) -c -Dflex -DMORT $(OCFLAGS) -o $. $<
>>
>> then recompile. This will make sure c code will also compiled by c++
>> compiler.
>>
>> Sincerely,
>>
>> Wei
>>
>>

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