Problems linking with ACML 3.1.0 mp and large array version

I am trying to build a program with PGI 6.0-8 (64-bit) and the ACML library 3.1.0 (mp and large array version). I have included the fortran link flag -mp, however I got the following link error. I also tried to remove -Bstatic or use -lpgftnrtl -lm flags. Can anyone show me how to solve the problem?

link failed
pgf90 -pc 64 -i8 -fastsse -mp -Bstatic -fastsse -g77libs -o /usr/local/src/molpro/molpro2002.6/bin/molprop_2002_6_i8_amd64_tcgmsg.exe molver.o molpro.o -L/usr/local/src/molpro/molpro2002.6/lib -lmolpro -L/usr/local/share/ga-4.0p/pgi-6.0-linux64-tcgmsg -lglobal -ltcgmsg -lma -lpario -larmci -lgks0 -L/opt/acml3.1.0/pgi64_mp_large_arrays/lib -lacml -L/usr/local/share/ga-4.0p/pgi-6.0-linux64-tcgmsg -lglobal -ltcgmsg -lma -lpario -larmci -lz
/usr/local/src/molpro/molpro2002.6/lib/libmolpro.a(licence.o)(.text+0x5621): In function get_machine_info_c': : warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/local/share/ga-4.0p/pgi-6.0-linux64-tcgmsg/libtcgmsg.a(sockets.o)(.text+0x25e): In function TcpNoDelay’:
: warning: Using ‘getprotobyname’ in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/opt/acml3.1.0/pgi64_mp_large_arrays/lib/libacml.a(acmlgetenv.o)(.text+0xc1): In function acmlgetenv_': : undefined reference to __c_mset1’
/opt/acml3.1.0/pgi64_mp_large_arrays/lib/libacml.a(ilaenvkernel.o)(.text+0x1e1): In function ilaenvkernel_': : undefined reference to ftn_str_cpy1’
/opt/acml3.1.0/pgi64_mp_large_arrays/lib/libacml.a(ilaenvkernel.o)(.text+0x1f8): In function ilaenvkernel_': : undefined reference to ftn_str_cpy1’
/opt/acml3.1.0/pgi64_mp_large_arrays/lib/libacml.a(ilaenvkernel.o)(.text+0x20f): In function ilaenvkernel_': : undefined reference to ftn_str_cpy1’
make: *** [bin/molprop_2002_6_i8_amd64_tcgmsg.exe] Error 1

Hi Shenggang,

The 3.1.0 version of ACML was built with the 6.1 version of the PGI compilers and contains feature unsupported in the 6.0 version. Either upgrading the compiler or using the earlier 2.7.0 version of ACML will solve the errors.

Thanks,
Mat