AMBER Archive (2009)

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

From: Shan-ho Tsai (tsai_at_hal.physast.uga.edu)
Date: Fri Jan 09 2009 - 10:27:56 CST


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_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber