[ncl-install] NCL-install problem

Mary Haley haley at ucar.edu
Mon Mar 23 08:25:31 MDT 2009


Hi,

If you only need to use NCL, then I wouldn't worry about not being
able to compile NCAR Graphics programs. This is not required for NCL
usage.

However, if you need to compile NCAR Graphics programs, then you will
need to do one of two things:

   1. Download a "libgfortran" that is compatible with the version of
      gfortran that the NCAR Graphics libraries were built with.

   2. Build NCL/NCAR Graphics from source code - not a trival task!

For #1, please go to: http://www.ncl.ucar.edu/FAQ/#basics_006
and read "2." where it talks about installing the "compat-libgfortran"
runtime library. Once you have this runtime library, you
will need to use the -L option on your compile line to
point to this.

For example, if you install the library in say, /xxxx/yyyy/lib,
then your compile line will need to look like this:

  gfortran -fPIC -fno-second-underscore -fno-range-check -O -o cpex08 cpexcc.f
  cpex08.f -L/xxx/yyy/lib -L/usr/local/ncarg/lib -L/usr/X11R6/lib -lncarg
  -lncarg_gks -lncarg_c -lX11 -lXext -lpng -lz -lgfortran

--Mary





On Sun, 22 Mar 2009, Shiny Guo wrote:

> hi,
>    A few days before I downloaded
> "ncl_ncarg-5.1.0.Linux_i686_gcc412.tar.gz(binary)" from ucar.edu. I
> installed it according to "http://www.ncl.ucar.edu/Download/install.shtml".
> I tested "ng4ex gsun01" and it worked well. I know the NCL was installed
> properly. But when i typed "ncargex cpex08" and it said as following. How
> can i do? Thanks a million!
> ------------------------------------------------------------------------------------------------------------------------
> Compiling and linking...
> gfortran -fPIC -fno-second-underscore -fno-range-check -O -o cpex08 cpexcc.f
> cpex08.f -L/usr/local/ncarg/lib -L/usr/X11R6/lib -lncarg -lncarg_gks
> -lncarg_c -lX11 -lXext -lpng -lz -lgfortran
> /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crt1.o: In function `_start':
> (.text+0x18): undefined reference to `main'
> /usr/local/ncarg/lib/libncarg.a(cpcldm.o): In function `cpcldm_':
> cpcldm.f:(.text+0x8ab): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0xaf5): undefined reference to `_gfortran_pow_r4_i4'
> cpcldm.f:(.text+0xb79): undefined reference to `_gfortran_pow_r4_i4'
> cpcldm.f:(.text+0xf36): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0xfc8): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0x10bd): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0x11c4): undefined reference to `_gfortran_copy_string'
> cpcldm.f:(.text+0x127f): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpcldm.o):cpcldm.f:(.text+0x134b): more
> undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(cppkcl.o): In function `cppkcl_':
> cppkcl.f:(.text+0x465): undefined reference to `_gfortran_pow_r4_i4'
> cppkcl.f:(.text+0x52b): undefined reference to `_gfortran_pow_r4_i4'
> cppkcl.f:(.text+0x553): undefined reference to `_gfortran_pow_r4_i4'
> cppkcl.f:(.text+0x6f6): undefined reference to `_gfortran_copy_string'
> cppkcl.f:(.text+0x739): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cppklb.o): In function `cppklb_':
> cppklb.f:(.text+0x47e): undefined reference to `_gfortran_pow_r4_i4'
> cppklb.f:(.text+0x563): undefined reference to `_gfortran_pow_r4_i4'
> cppklb.f:(.text+0x5ea): undefined reference to `_gfortran_copy_string'
> cppklb.f:(.text+0x60c): undefined reference to `_gfortran_copy_string'
> cppklb.f:(.text+0x845): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpsetr.o): In function `cpsetr_':
> cpsetr.f:(.text+0x7b): undefined reference to `_gfortran_copy_string'
> cpsetr.f:(.text+0x9c): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpsetr.o):cpsetr.f:(.text+0x4cc): more
> undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(cpinit.o): In function `cpinit_':
> cpinit.f:(.text+0x12f8): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(cpinrc.o): In function `cpinrc_':
> cpinrc.f:(.text+0xa1): undefined reference to `_gfortran_pow_r4_i4'
> cpinrc.f:(.text+0xd5): undefined reference to `_gfortran_copy_string'
> cpinrc.f:(.text+0x1b3): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpnumb.o): In function `cpnumb_':
> cpnumb.f:(.text+0xee): undefined reference to `_gfortran_copy_string'
> cpnumb.f:(.text+0x472): undefined reference to `_gfortran_copy_string'
> cpnumb.f:(.text+0x602): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpnumb.o):cpnumb.f:(.text+0xa0f): more
> undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(dpgetc.o): In function `dpgetc_':
> dpgetc.f:(.text+0x61): undefined reference to `_gfortran_internal_malloc'
> dpgetc.f:(.text+0xb3): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0xbb): undefined reference to `_gfortran_internal_free'
> dpgetc.f:(.text+0x161): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x1e6): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x26b): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x2f9): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x30f): undefined reference to `_gfortran_internal_malloc'
> dpgetc.f:(.text+0x361): undefined reference to `_gfortran_copy_string'
> dpgetc.f:(.text+0x369): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(dpgetr.o): In function `dpgetr_':
> dpgetr.f:(.text+0x61): undefined reference to `_gfortran_internal_malloc'
> dpgetr.f:(.text+0xb3): undefined reference to `_gfortran_copy_string'
> dpgetr.f:(.text+0xbb): undefined reference to `_gfortran_internal_free'
> dpgetr.f:(.text+0x773): undefined reference to `_gfortran_internal_malloc'
> dpgetr.f:(.text+0x7c5): undefined reference to `_gfortran_copy_string'
> dpgetr.f:(.text+0x7cd): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(dpsetc.o): In function `dpsetc_':
> dpsetc.f:(.text+0xa6): undefined reference to `_gfortran_internal_malloc'
> dpsetc.f:(.text+0xf6): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x101): undefined reference to `_gfortran_internal_free'
> dpsetc.f:(.text+0x19f): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x21f): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x29f): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x33f): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x352): undefined reference to `_gfortran_internal_malloc'
> dpsetc.f:(.text+0x3a2): undefined reference to `_gfortran_copy_string'
> dpsetc.f:(.text+0x3ad): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(dpsetr.o): In function `dpsetr_':
> dpsetr.f:(.text+0xa6): undefined reference to `_gfortran_internal_malloc'
> dpsetr.f:(.text+0xf6): undefined reference to `_gfortran_copy_string'
> dpsetr.f:(.text+0x101): undefined reference to `_gfortran_internal_free'
> dpsetr.f:(.text+0xa2e): undefined reference to `_gfortran_internal_malloc'
> dpsetr.f:(.text+0xa7e): undefined reference to `_gfortran_copy_string'
> dpsetr.f:(.text+0xa89): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(mdpbla.o): In function `.L372':
> mdpbla.f:(.text+0x2928): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdpita.o): In function `mdpita_':
> mdpita.f:(.text+0x314): undefined reference to `_gfortran_pow_r8_i4'
> mdpita.f:(.text+0x386): undefined reference to `_gfortran_pow_r8_i4'
> /usr/local/ncarg/lib/libncarg.a(mdpitm.o): In function `mdpitm_':
> mdpitm.f:(.text+0x318): undefined reference to `_gfortran_pow_r8_i4'
> mdpitm.f:(.text+0x38a): undefined reference to `_gfortran_pow_r8_i4'
> /usr/local/ncarg/lib/libncarg.a(mdlnam.o): In function `mdlnam_':
> mdlnam.f:(.text+0x83): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0xcf): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0x111): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x135): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x13d): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x1dd): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0x222): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0x25e): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x26c): undefined reference to `_gfortran_internal_malloc'
> mdlnam.f:(.text+0x2ac): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x2e7): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x301): undefined reference to `_gfortran_internal_free'
> mdlnam.f:(.text+0x416): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x61b): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x6b3): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x7ce): undefined reference to `_gfortran_copy_string'
> mdlnam.f:(.text+0x840): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdlnam.o):mdlnam.f:(.text+0xd29): more
> undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(mdlndr.o): In function `mdlndr_':
> mdlndr.f:(.text+0x83): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0xcf): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0x111): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x135): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x13d): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x1dd): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0x222): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0x25e): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x26c): undefined reference to `_gfortran_internal_malloc'
> mdlndr.f:(.text+0x2ac): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x2e7): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x301): undefined reference to `_gfortran_internal_free'
> mdlndr.f:(.text+0x416): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x61b): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x6b3): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x732): undefined reference to `_gfortran_copy_string'
> mdlndr.f:(.text+0x796): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(lbsetr.o):lbsetr.f:(.text+0x73): more
> undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(plchhq.o): In function `plchhq_':
> plchhq.f:(.text+0x23a): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(pcgetc.o): In function `pcgetc_':
> pcgetc.f:(.text+0xe3): undefined reference to `_gfortran_copy_string'
> pcgetc.f:(.text+0x192): undefined reference to `_gfortran_copy_string'
> pcgetc.f:(.text+0x1bf): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(pcfopn.o): In function `pcfopn_':
> pcfopn.f:(.text+0x47): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0xa8): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x132): undefined reference to `_gfortran_internal_malloc'
> pcfopn.f:(.text+0x18e): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x19c): undefined reference to `_gfortran_internal_free'
> pcfopn.f:(.text+0x31b): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x348): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x38d): undefined reference to `_gfortran_internal_malloc'
> pcfopn.f:(.text+0x3e5): undefined reference to `_gfortran_copy_string'
> pcfopn.f:(.text+0x3ed): undefined reference to `_gfortran_internal_free'
> pcfopn.f:(.text+0x453): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(sfsgfa.o): In function `sfsgfa_':
> sfsgfa.f:(.text+0x495): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(seter.o): In function `seter_':
> seter.f:(.text+0x38c): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(bcgetr.o): In function `bcgetr_':
> bcgetr.f:(.text+0x34): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(bcsetr.o): In function `bcsetr_':
> bcsetr.f:(.text+0x34): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(icfell.o): In function `icfell_':
> icfell.f:(.text+0x9f): undefined reference to `_gfortran_copy_string'
> icfell.f:(.text+0xbf): undefined reference to `_gfortran_internal_malloc'
> icfell.f:(.text+0x105): undefined reference to `_gfortran_internal_malloc'
> icfell.f:(.text+0x147): undefined reference to `_gfortran_internal_free'
> icfell.f:(.text+0x165): undefined reference to `_gfortran_copy_string'
> icfell.f:(.text+0x16d): undefined reference to `_gfortran_internal_free'
> icfell.f:(.text+0x192): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(cpinrk.o): In function `cpinrk_':
> cpinrk.f:(.text+0x2d): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(mdgetc.o): In function `mdgetc_':
> mdgetc.f:(.text+0xa3): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0x103): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0x167): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0x1c4): undefined reference to `_gfortran_copy_string'
> mdgetc.f:(.text+0x228): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdgetc.o):mdgetc.f:(.text+0x289): more
> undefined references to `_gfortran_copy_string' follow
> /usr/local/ncarg/lib/libncarg.a(mdpcem.o): In function `mdpcem_':
> mdpcem.f:(.text+0x2c): undefined reference to `_gfortran_internal_malloc'
> mdpcem.f:(.text+0x7a): undefined reference to `_gfortran_copy_string'
> mdpcem.f:(.text+0x82): undefined reference to `_gfortran_internal_free'
> /usr/local/ncarg/lib/libncarg.a(mdpio.o): In function `mdpio_':
> mdpio.f:(.text+0x113): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(mdpit.o): In function `mdpit_':
> mdpit.f:(.text+0x39b): undefined reference to `_gfortran_pow_r8_i4'
> mdpit.f:(.text+0x40d): undefined reference to `_gfortran_pow_r8_i4'
> /usr/local/ncarg/lib/libncarg.a(mpdbdi.o): In function `mpdbdi_':
> mpdbdi.f:(.text+0x3e): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg.a(plchmq.o): In function `plchmq_':
> plchmq.f:(.text+0x161): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(plchlq.o): In function `plchlq_':
> plchlq.f:(.text+0x1ee): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(cpux.o): In function `cpux_':
> cpux.f:(.text+0xe8): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg.a(cpuy.o): In function `cpuy_':
> cpuy.f:(.text+0xf7): undefined reference to `_gfortran_pow_r4_i4'
> /usr/local/ncarg/lib/libncarg_gks.a(gerhnd.o): In function `gerhnd_':
> gerhnd.f:(.text+0x101): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg_gks.a(gzgte2.o): In function `gzgte2_':
> gzgte2.f:(.text+0x72): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg_gks.a(gzputs.o): In function `gzputs_':
> gzputs.f:(.text+0x69): undefined reference to `_gfortran_copy_string'
> gzputs.f:(.text+0xed): undefined reference to `_gfortran_copy_string'
> gzputs.f:(.text+0x185): undefined reference to `_gfortran_copy_string'
> /usr/local/ncarg/lib/libncarg_gks.a(gzopwk.o):gzopwk.f:(.text+0x49e): more
> undefined references to `_gfortran_copy_string' follow
> collect2: ld ·µ»Ø 1
>
> The compile and link failed.
> ---------------------------------------------------------------------------------------------------------------------
>


More information about the ncl-install mailing list