[ncl-install] problem compiling the NCAR graphics ubuntu 10.04 with gcc/gfortran 4.4.3

Saulo Soares saulo at hawaii.edu
Thu Mar 3 13:47:56 MST 2011


Hi NCL list,

I have a problem compiling the NCAR graphics.
I downloaded the binary for 64 bit machine running ubuntu:
ncl_ncarg-5.2.1.Linux_Debian_x86_64_gcc412.tar.gz

However my gcc/gfortran version is 4.4.3, much newer, so when I run:
$ ncargex cpex08 -clean
NCAR Graphics Fortran  Example <cpex08>

  Copying cpex08.f

  Copying cpexcc.f

Compiling and linking...
gfortran -fPIC -fno-second-underscore -fno-range-check -O -o cpex08 cpexcc.f
cpex08.f -L/home/saulo/NCL/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
-lgfortran

I get a bunch of this error:

/home/saulo/NCL/lib/libncarg.a(mdgetc.o): In function `mdgetc_':
mdgetc.f:(.text+0x8d): undefined reference to `_gfortran_copy_string'

I google solutions to this from the ncl list and it was suggested that
getting libgfortran.so.1 and linking it to gcc/lib/libgfortran.so could do
the trick.
I did that but now the compiler complains about a reference that is in the
newer gcc/gfortran version:

/usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../../lib/crt1.o: In function
`_start':
(.text+0x20): undefined reference to `main'
/tmp/ccM2T3gF.o: In function `MAIN__':
cpex08.f:(.text+0x4d5): undefined reference to `_gfortran_set_options'
collect2: ld returned 1 exit status

The compile and link failed.

Does anyone knows a solution to this? Or do I have to compile from source?
Or is it possible to make the gcc symbolic link
/usr/lib/gcc/x86_64-linux-gnu/4.4/libgfortran.so point to 2 different
libraries (link to both libgfortran.so.1 and libgfortran.so.3)  at the same
time?

Thanks!!
Aloha
Saulo Soares
Phd candidate
Dept Oceanography
University of Hawaii at Manoa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-install/attachments/20110303/5f79fc97/attachment.html 


More information about the ncl-install mailing list