Re: ncargex cpex08 fails to compile and link

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sun Aug 28 2011 - 07:27:57 MDT

Dear Santiago,

Just for the record: If all you care about is running NCL, then it is
not important that you get the "ncargex cpex08" command to work. This
is for users who need to compile NCAR Graphics C or Fortran programs.

However, if you still want to fix this, it might be a quick fix.

Since your X11, png, z, etc, libraries are in /usr/lib/x86_64-linux-
gnu, try editing $NCARG_ROOT/bin/ncargf77 and changing the /usr/X11R6/
lib64 path to /usr/lib/x86_64-linux-gnu. You can also do this in

The "/usr/lib/x86_64-linux-gnu" path doesn't look right to me, though.
This looks like the place where your files get installed, but then
they are usually soft-linked to another directory like /usr/X11R6/lib
or /usr/lib64

Just in case, please see these notes about installing X11 for Linux:


On Aug 26, 2011, at 8:05 PM, Santiago Gaja Ferrer wrote:

> Hi,
> 1) I just installed the precomplied version of NCL:
> ncl_ncarg-5.1.0.Linux_x86_64_gcc411.tar.gz
> 2) I set the paths in my .bashrc
> 3) "ng4ex gsun01n" works well
> 4) "ncl gsun01.ncl" works well
> 5)" ncargex cpex08 -clean" send this error:
> 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/home/santiago/NCARG/lib -L/usr/X11R6/lib64 -lncarg -lncarg_gks -
> lncarg_c -lX11 -lXext -lpng -lz
> /usr/bin/ld: cannot find -lX11
> /usr/bin/ld: cannot find -lXext
> /usr/bin/ld: cannot find -lpng
> /usr/bin/ld: cannot find -lz
> collect2: ld returned 1 exit status
> The compile and link failed.
> I noticed that I donīt have the /usr/X11R6/lib64 directory....
> my libraries: libX11, libXext, libpng and libz are in other
> directory (/usr/lib/x86_64-linux-gnu), where can I change the
> directory path (-L/usr/X11R6/lib64) to my lib directory (/usr/lib/
> x86_64-linux-gnu)?
> Regards
> Santiago Gaja
> _______________________________________________
> ncl-install mailing list
> List instructions, subscriber options, unsubscribe:

ncl-install mailing list
List instructions, subscriber options, unsubscribe:
Received on Sun Aug 28 07:28:00 2011

This archive was generated by hypermail 2.1.8 : Tue Aug 30 2011 - 13:29:52 MDT