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

From: Wei Zhang <zgjzweig.gmail.com>
Date: Fri, 9 Jan 2009 16:28:08 -0600

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



On Jan 9, 2009, at 3:49 PM, Shan-ho Tsai wrote:

>
> Hi Bill,
> Thanks for the suggestion. It turns out there are no man pages
> for any of the 3 symbols. Because these functions are defined
> in src/gleap/mortsrc/nablib, I had assumed that these are
> either AmberTools functions or that they would be built as
> part of building AmberTools (that is, they are not part of
> other C++ or system libraries). Is this correct?
>
> It is strange to me that it appears that libmort.a was built
> correctly and the 3 symbols appear to be defined there.
> The output of 'nm -A libmort.a' contains:
>
> libmort.a[traceback.o]: .rt_errormsg_s T 224
> libmort.a[memutil.o]: .imatrix T 688
> libmort.a[memutil.o]: .matrix T 1056
>
> Doesn't this mean that these symbols are defined in libmort.a?
> If so, why can't ld resolve them?
>
> Any ideas?
> Thank you very much!!
> Shan-Ho
>
>
> On Fri, 9 Jan 2009, Bill Ross wrote:
>
>>> Unfortunately removing the "-static-libgcc" option from
>>> the sleap compilation line (and adding -lpthread) still
>>> leaves the last 3 undefined symbols.
>>
>>>> ld: 0711-317 ERROR: Undefined symbol: .rt_errormsg_s(int, char*,
>>>> char*)
>>>> ld: 0711-317 ERROR: Undefined symbol: .imatrix(int, int, int, int)
>>>> ld: 0711-317 ERROR: Undefined symbol: .matrix(int, int, int, int)
>>
>> You could try 'man x' where x is each of [rt_errormsg_s, imatrix,
>> matrix]
>> and see if some library or libraries are indicated.
>>
>> Bill
>>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber


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