[ncl-install] undefined reference to gfortran copy string

Richard Hewston r.hewston at swansea.ac.uk
Mon Mar 2 13:13:45 MST 2009


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20090302/3ad243dd/attachment.html 


More information about the ncl-install mailing list