[ncl-install] Welcome to the "ncl-install" mailing list

Mary Haley haley at ucar.edu
Wed Jul 11 13:36:41 MDT 2012


You may need to add -lgfortran to the end of the compile line.

Try:

ncargf77 cpex08.f cpexcc.f -o cpex08 -lgfortran
./cpex08

If this doesn't work, then see question #5 at:

http://www.ncl.ucar.edu/FAQ/#misc_005

--Mary

On Jul 11, 2012, at 12:27 PM, Ming Zhao wrote:

> Dear all,
> 
> I have downloaded the ncl_ncarg-6.0.0.Linux_RedHat_x86_64_nodap_gcc412
> 
> My gfortran version is 4.7.0
> 
> When I try to run the sample NCL script (ng4ex gsun01n) it works fine. 
> However, the ncarg sample produces errors: 
> 
> [root at T620 ~]# ncargex cpex08 -clean 
> 
> NCAR Graphics Fortran  Example <cpex08>
> 
>   Copying cpex08.f
> 
>   Copying cpexcc.f
> 
> Compiling and linking...
> gfortran -fPIC -fno-second-underscore -O -o cpex08 cpexcc.f cpex08.f -L/usr/local/ncarg/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
> /usr/local/ncarg/lib/libncarg.a(cpcldm.o): In function `cpcldm_':
> cpcldm.f:(.text+0x7e5): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0xa17): undefined reference to `_gfortran_pow_r4_i4'
> cpcldm.f:(.text+0xa86): undefined reference to `_gfortran_pow_r4_i4'
> cpcldm.f:(.text+0xdcf): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0xe59): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0xf28): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0x1014): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0x10ad): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpcldm.o):cpcldm.f:(.text+0x114f): more undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(cppkcl.o): In function `cppkcl_':
> cppkcl.f:(.text+0x459): undefined reference to `_gfortran_pow_r4_i4'
> cppkcl.f:(.text+0x521): undefined reference to `_gfortran_pow_r4_i4'
> cppkcl.f:(.text+0x553): undefined reference to `_gfortran_pow_r4_i4'
> cppkcl.f:(.text+0x704): undefined reference to `_gfortran_copy_string'
> cppkcl.f:(.text+0x73f): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cppklb.o): In function `cppklb_':
> cppklb.f:(.text+0x4b1): undefined reference to `_gfortran_pow_r4_i4'
> cppklb.f:(.text+0x568): undefined reference to `_gfortran_pow_r4_i4'
> cppklb.f:(.text+0x5ee): undefined reference to `_gfortran_copy_string'
> cppklb.f:(.text+0x607): undefined reference to `_gfortran_copy_string'
> cppklb.f:(.text+0x861): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpsetr.o): In function `cpsetr_':
> cpsetr.f:(.text+0x60): undefined reference to `_gfortran_copy_string'
> cpsetr.f:(.text+0x77): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpsetr.o):cpsetr.f:(.text+0x39f): more undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(cpinit.o): In function `cpinit_':
> cpinit.f:(.text+0x145a): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(cpinrc.o): In function `cpinrc_':
> cpinrc.f:(.text+0x8d): undefined reference to `_gfortran_pow_r4_i4'
> cpinrc.f:(.text+0xb9): undefined reference to `_gfortran_copy_string'
> cpinrc.f:(.text+0x189): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpnumb.o): In function `cpnumb_':
> cpnumb.f:(.text+0xf8): undefined reference to `_gfortran_copy_string'
> cpnumb.f:(.text+0x41b): undefined reference to `_gfortran_copy_string'
> cpnumb.f:(.text+0x558): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpnumb.o):cpnumb.f:(.text+0x9ca): more undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(dpgetc.o): In function `dpgetc_':
> dpgetc.f:(.text+0x52): undefined reference to `_gfortran_internal_malloc'
> dpgetc.f:(.text+0x83): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x8b): undefined reference to `_gfortran_internal_free'
> dpgetc.f:(.text+0x10a): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x16e): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x1d2): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x23e): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x24a): undefined reference to `_gfortran_internal_malloc'
> dpgetc.f:(.text+0x27b): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x283): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(dpgetr.o): In function `dpgetr_':
> dpgetr.f:(.text+0x50): undefined reference to `_gfortran_internal_malloc'
> dpgetr.f:(.text+0x81): undefined reference to `_gfortran_copy_string'
> dpgetr.f:(.text+0x89): undefined reference to `_gfortran_internal_free'
> dpgetr.f:(.text+0x5c6): undefined reference to `_gfortran_internal_malloc'
> dpgetr.f:(.text+0x5f7): undefined reference to `_gfortran_copy_string'
> dpgetr.f:(.text+0x5ff): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(dpsetc.o): In function `dpsetc_':
> dpsetc.f:(.text+0x96): undefined reference to `_gfortran_internal_malloc'
> dpsetc.f:(.text+0xc7): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0xcf): undefined reference to `_gfortran_internal_free'
> dpsetc.f:(.text+0x146): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x1a2): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x1fe): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x277): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x283): undefined reference to `_gfortran_internal_malloc'
> dpsetc.f:(.text+0x2b4): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x2bc): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(dpsetr.o): In function `dpsetr_':
> dpsetr.f:(.text+0x94): undefined reference to `_gfortran_internal_malloc'
> dpsetr.f:(.text+0xc5): undefined reference to `_gfortran_copy_string'
> dpsetr.f:(.text+0xcd): undefined reference to `_gfortran_internal_free'
> dpsetr.f:(.text+0x7e7): undefined reference to `_gfortran_internal_malloc'
> dpsetr.f:(.text+0x818): undefined reference to `_gfortran_copy_string'
> dpsetr.f:(.text+0x820): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(mdpbla.o): In function `mdpbla_':
> mdpbla.f:(.text+0x31eb): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdpita.o): In function `mdpita_':
> mdpita.f:(.text+0x3ce): undefined reference to `_gfortran_pow_r8_i4'
> mdpita.f:(.text+0x448): undefined reference to `_gfortran_pow_r8_i4'
> /usr/local/ncarg/lib/libncarg.a(mdpitm.o): In function `mdpitm_':
> mdpitm.f:(.text+0x3db): undefined reference to `_gfortran_pow_r8_i4'
> mdpitm.f:(.text+0x455): undefined reference to `_gfortran_pow_r8_i4'
> /usr/local/ncarg/lib/libncarg.a(mdlnam.o): In function `mdlnam_':
> mdlnam.f:(.text+0x98): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0xca): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0xf3): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x10b): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x113): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x185): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0x1b6): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0x1e3): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x1ee): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0x216): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x23c): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x249): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x354): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x50e): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x5a5): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x6a6): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x70f): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdlnam.o):mdlnam.f:(.text+0xc1c): more undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(mdlndr.o): In function `mdlndr_':
> mdlndr.f:(.text+0x81): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0xb0): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0xd9): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0xf1): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0xf9): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x165): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0x190): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0x1ba): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x1c5): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0x1ed): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x213): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x220): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x31e): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x4d2): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x563): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x5d4): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x636): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(lbsetr.o):lbsetr.f:(.text+0x5a): more undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(plchhq.o): In function `plchhq_':
> plchhq.f:(.text+0x262): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(pcgetc.o): In function `pcgetc_':
> pcgetc.f:(.text+0xbd): undefined reference to `_gfortran_copy_string'
> pcgetc.f:(.text+0x151): undefined reference to `_gfortran_copy_string'
> pcgetc.f:(.text+0x17e): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(pcfopn.o): In function `pcfopn_':
> pcfopn.f:(.text+0x39): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0xa5): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x123): undefined reference to `_gfortran_internal_malloc'
> pcfopn.f:(.text+0x160): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x168): undefined reference to `_gfortran_internal_free'
> pcfopn.f:(.text+0x295): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x2bd): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x2f6): undefined reference to `_gfortran_internal_malloc'
> pcfopn.f:(.text+0x33a): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x342): undefined reference to `_gfortran_internal_free'
> pcfopn.f:(.text+0x38d): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(sfsgfa.o): In function `sfsgfa_':
> sfsgfa.f:(.text+0x4c7): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(seter.o): In function `seter_':
> seter.f:(.text+0x31f): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(bcgetr.o): In function `bcgetr_':
> bcgetr.f:(.text+0x25): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(bcsetr.o): In function `bcsetr_':
> bcsetr.f:(.text+0x25): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(icfell.o): In function `icfell_':
> icfell.f:(.text+0x9d): undefined reference to `_gfortran_copy_string'
> icfell.f:(.text+0xb7): undefined reference to `_gfortran_internal_malloc'
> icfell.f:(.text+0xe4): undefined reference to `_gfortran_internal_malloc'
> icfell.f:(.text+0x10a): undefined reference to `_gfortran_internal_free'
> icfell.f:(.text+0x11d): undefined reference to `_gfortran_copy_string'
> icfell.f:(.text+0x125): undefined reference to `_gfortran_internal_free'
> icfell.f:(.text+0x147): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpinrk.o): In function `cpinrk_':
> cpinrk.f:(.text+0x29): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(mdgetc.o): In function `mdgetc_':
> mdgetc.f:(.text+0x8d): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0xdc): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0x12f): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0x183): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0x1d6): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdgetc.o):mdgetc.f:(.text+0x226): more undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(mdpcem.o): In function `mdpcem_':
> mdpcem.f:(.text+0x42): undefined reference to `_gfortran_internal_malloc'
> mdpcem.f:(.text+0x72): undefined reference to `_gfortran_copy_string'
> mdpcem.f:(.text+0x7a): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(mdpio.o): In function `mdpio_':
> mdpio.f:(.text+0xe7): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdpit.o): In function `mdpit_':
> mdpit.f:(.text+0x47a): undefined reference to `_gfortran_pow_r8_i4'
> mdpit.f:(.text+0x4f4): undefined reference to `_gfortran_pow_r8_i4'
> /usr/local/ncarg/lib/libncarg.a(mpdbdi.o): In function `mpdbdi_':
> mpdbdi.f:(.text+0x31): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(plchmq.o): In function `plchmq_':
> plchmq.f:(.text+0x14b): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(plchlq.o): In function `plchlq_':
> plchlq.f:(.text+0x1d9): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(cpux.o): In function `cpux_':
> cpux.f:(.text+0xc4): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(cpuy.o): In function `cpuy_':
> cpuy.f:(.text+0xc9): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg_gks.a(gerhnd.o): In function `gerhnd_':
> gerhnd.f:(.text+0xdc): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg_gks.a(gzgte2.o): In function `gzgte2_':
> gzgte2.f:(.text+0x66): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg_gks.a(gzputs.o): In function `gzputs_':
> gzputs.f:(.text+0x7c): undefined reference to `_gfortran_copy_string'
> gzputs.f:(.text+0xf8): undefined reference to `_gfortran_copy_string'
> gzputs.f:(.text+0x17d): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg_gks.a(gzopwk.o):gzopwk.f:(.text+0x516): more undefined references to `_gfortran_copy_string' follow
> collect2: error: ld returned 1 exit status
> 
> The compile and link failed.
> 
> 
> 
> Thanks for your help!
> 
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-install



More information about the ncl-install mailing list