undefined reference to gfortran copy string

From: Richard Hewston <r.hewston_at_nyahnyahspammersnyahnyah>
Date: Mon, 02 Mar 2009 20:13:45 +0000

I have downloaded the NCL5.0.0 binaries and they lie under /usr/local/ncl5

When I try to run the sample NCL script (ng4ex gsun01n) it works fine.
However, the ncarg sample produces errors:

root_at_rhewston bin]# ncargex
cpex08
NCAR Graphics Fortran Example <cpex08>
 
Copying cpex08.f

  Copying cpexcc.f

Compiling and linking...
gfortran -fPIC -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncl5/lib
-L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -L/usr/X11R6/lib64
-lX11 -lXext
/usr/local/ncl5/lib/libncarg.a(cpcldm.o): In function
`cpcldm_':
cpcldm.f:(.text+0x7eb): undefined reference to
`_gfortran_copy_string'
cpcldm.f:(.text+0xa20): undefined reference to `_gfortran_pow_r4_i4'
....etc....
gzputs.f:(.text+0xd3): undefined reference to `_gfortran_copy_string'
gzputs.f:(.text+0x146): undefined reference to `_gfortran_copy_string'
/usr/local/ncl5/lib/libncarg_gks.a(gzopwk.o):gzopwk.f:(.text+0x471):
more undefined references to `_gfortran_copy_string' follow
collect2: ld returned 1 exit status

There is no /usr/X11R6/ directory so i tried to changes links (and add
the libgfortran link too), but this also produced errors.

# gfortran -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncl5/lib -lncarg
-lncarg_gks -lncarg_c -L/usr/lib64 -lX11 -lXext
-lgfortran
/usr/lib/gcc/x86_64-redhat-linux/4.3.2/../../../../lib64/crt1.o: In
function `_start':
(.text+0x20): undefined reference to
`main'
/usr/local/ncl5/lib/libncarg.a(cpcldm.o): In function
`cpcldm_':
cpcldm.f:(.text+0x7eb): undefined reference to
`_gfortran_copy_string'
cpcldm.f:(.text+0xa20): undefined reference to
`_gfortran_pow_r4_i4'
cpcldm.f:(.text+0xa8f): undefined reference to
`_gfortran_pow_r4_i4'
cpcldm.f:(.text+0xdb6): undefined reference to
`_gfortran_copy_string'
cpcldm.f:(.text+0xe35): undefined reference to
`_gfortran_copy_string'
cpcldm.f:(.text+0xef3): undefined reference to
`_gfortran_copy_string'
cpcldm.f:(.text+0xfca): undefined reference to
`_gfortran_copy_string'
cpcldm.f:(.text+0x104e): undefined reference to
`_gfortran_copy_string'
/usr/local/ncl5/lib/libncarg.a(cpcldm.o):cpcldm.f:(.text+0x10da): more
undefined references to `_gfortran_copy_string'
follow
/usr/local/ncl5/lib/libncarg.a(cppkcl.o): In function
`cppkcl_':
cppkcl.f:(.text+0x451): undefined reference to
`_gfortran_pow_r4_i4'
cppkcl.f:(.text+0x518): undefined reference to
`_gfortran_pow_r4_i4'
cppkcl.f:(.text+0x54a): undefined reference to
`_gfortran_pow_r4_i4'
cppkcl.f:(.text+0x733): undefined reference to `_gfortran_copy_string'

... etc...
gzputs.f:(.text+0x62): undefined reference to `_gfortran_copy_string'
gzputs.f:(.text+0xd3): undefined reference to `_gfortran_copy_string'
gzputs.f:(.text+0x146): undefined reference to `_gfortran_copy_string'
/usr/local/ncl5/lib/libncarg_gks.a(gzopwk.o):gzopwk.f:(.text+0x471):
more undefined references to `_gfortran_copy_string' follow
collect2: ld returned 1 exit status

Am I missing anything obvious?!
Thanks,
Rich

_______________________________________________
ncl-install mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-install
Received on Mon Mar 02 2009 - 13:13:45 MST

This archive was generated by hypermail 2.2.0 : Tue Mar 03 2009 - 09:54:16 MST