Hi Wei,
Thank you very much for your response and suggestions.
Unfortunately removing the "-static-libgcc" option from
the sleap compilation line (and adding -lpthread) still
leaves the last 3 undefined symbols.
Any other ideas?
Thank you again!
Shan-Ho
On Fri, 9 Jan 2009, Wei Zhang wrote:
> Hi Shan-ho,
>
>
> First, you should add the "-lpthread" option for AIX.
>
> Second, try to remove the "-static-libgcc" option see if this helps.
>
> Sincerely,
>
> Wei
>
> On Jan 9, 2009, at 10:27 AM, Shan-ho Tsai wrote:
>
>>
>> Hello all,
>> I am trying to build AmberTools 1.2 on an IBM power4+
>> node running AIX 5.2, using gcc/g++ 3.3.2 and gnu make. I
>> am having trouble getting sleap to compile (gcc/g++ 4.1.2
>> gave the same error). The error message is
>>
>> g++ -static-libgcc -o sleap strmain.o strbuff.o plugins.o
>> ../freelib/readline/libreadline.a -lm ../plugins/libplugins.a
>> ../mortsrc/libmort.a
>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_lock
>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_unlock
>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_init
>> ld: 0711-317 ERROR: Undefined symbol: .pthread_mutex_destroy
>> 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)
>>
>> There was no error reported when compiling the programs
>> that make libreadline.a, libplugins.a and libmort.a.
>> Also, strmain.cpp, strbuff.cpp and plugins.cpp compiled fine.
>>
>> I see that rt_errormsg_s is defined in traceback.c
>> in src/gleap/mortsrc/nablib and imatrix and matrix are
>> defined in memutil.c in the same directory. These codes
>> compiled fine (no error messages), so I am not sure why
>> I am getting these undefined symbol errors.
>>
>> Using nm on libmort.a I get
>>
>> nm libmort.a | grep rt_errormsg_s
>>
>> .rt_errormsg_s U -
>> .rt_errormsg_s U -
>> .rt_errormsg_s T 112
>> rt_errormsg_s D 460
>> rt_errormsg_s d 460 12
>> ._Z13rt_errormsg_siPcS_ U -
>>
>> nm libmort.a | grep matrix
>>
>> .....
>> .imatrix T 864
>> .matrix T 544
>> imatrix D 1888
>> imatrix d 1888 12
>> matrix D 1876
>> matrix d 1876 12
>> .matrix U -
>>
>> I can get rid of the pthread undefined symbols by adding
>> -lpthread in the sleap compilation line, but I am not sure
>> if I am supposed to add this option. Earlier I had built
>> AmberTools 1.2 on a Linux cluster (RHEL4) using gcc 3.4.6
>> and all went well (I didn't have to add -lpthread and I
>> didn't have any of the undefined symbol errors above).
>>
>> Should I add the -lpthread option?
>>
>> Any ideas why I am getting the other undefined symbols
>> and how to get this problem resolved?
>>
>> Thank you very much for any help! I really appreciate it!
>> Best regards,
>> Shan-Ho
>>
>> -----------------------------------------------------------
>> Shan-Ho Tsai
>> University of Georgia, Athens, GA (USA)
>>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sun Jan 11 2009 - 01:12:02 PST