[ncl-install] Compiling cpex08 on a Sun Solaris 10 system
Mary Haley
haley at ucar.edu
Wed Apr 29 15:11:40 MDT 2009
Craig,
First the "ncarg77" was a typo on my part. It should have been "which
ncargf77".
I'm not sure why "ncargex cpex08" is not working on your Sun, because
it works just fine on mine. There may be an issue if you are using a
significantly older or newer version of the compiler.
Anyway, you need to include some additional libraries. Try "-lfsu" at
first:
f90 -O -o cpex08 cpexcc.f cpex08.f -L/wrf/test/lib
-L/usr/openwin/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lfsu
This may cause more undefined's. If so try:
f90 -O -o cpex08 cpexcc.f cpex08.f -L/wrf/test/lib
-L/usr/openwin/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
-lf77compat -lfsu -lsunmath -lfui -lm
I would hope that you don't need all of these. It may be necessary,
however, unless you want to try rebuilding NCAR Graphics from source
code so you can use your version of the compiler.
--Mary
On Wed, 29 Apr 2009, Craig Miller wrote:
> Hi Mary
>
> The NCL binaries that we downloaded from the EGS site were those for the
> Solaris 10 (not OPeNDAP-enabled), which were in the file
> ncl_ncarg-5.1.0.SunOS_5.10.tar.gz. Typing 'which ncargex' returns
> '/wrf/ncl/bin/ncargex', while typing 'which ncarg77' returns 'Command not
> found'. Forcing it to use the f90 compiler gets rid of all the errors, except
> the following two:
>
> Undefined first referenced
> symbol in file
> __f95_signf /wrf/ncl/lib/libncarg.a(cptrev.o)
> __f95_sign /wrf/ncl/lib/libncarg.a(mdpint.o)
> ld: fatal: Symbol referencing errors. No output written to cpex08
> cpexcc.f:
> cpex08.f:
> Linking:
>
>
> Just out of curiosity I downloaded the Solaris 10 binaries for the previous
> release of NCL (5.0.0, in the file ncl_ncarg-5.0.0.SunOS_5.10.tar.gz), and
> tried repeating everything. In this case it appears that the f90 compiler is
> invoked directly by ncargex with the following result:
>
>
> NCAR Graphics Fortran Example <cpex08>
>
> Copying cpex08.f
>
> Copying cpexcc.f
>
> Compiling and linking...
> f90 -O -o cpex08 cpexcc.f cpex08.f -L/wrf/test/lib
> -L/usr/openwin/lib -lncarg -lncarg_gks -lncarg_c -lX11 -lXext
> Undefined first referenced
> symbol in file
> __f95_signf
> /wrf/test/lib/libncarg_gks.a(gzclpo.o)
> __f90_parse_format_f77compat /wrf/test/lib/libncarg.a(cpnumb.o)
> ld: fatal: Symbol referencing errors. No output written to cpex08
> cpexcc.f:
> cpex08.f:
> Linking:
>
> The compile and link failed.
>
>
>
> Typing 'which ncargex' and 'which ncarg77' returns the same result as above
> (i.e. the directory in which ncargex resides, and 'Command not found' for
> 'which ncarg77'.
>
> Interestingly enough, trying to compile WPS with NCAR graphics (f90 compiler
> used) using the latest release of NCL (5.1.0) returns the same two f95
> errors, as well as the additional errors you get when leaving the option
> '-lpng' out of the command
>
> f90 -O -o cpex08 cpexcc.f cpex08.f -L/wrf/ncl/lib -L/usr/openwin/lib \
> -lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lpng -lz
>
> when trying to compile cpex08, while using the previous release (5.0.0) only
> returns the two errors encountered when executing the command 'ncargex
> cpex08' with this same release.
>
> Checking the compiler links on the machine that we are trying to run NCL on
> shows that f77 invokes the f77 compiler, while f90 and f95 invoke the f90
> compiler.
>
> Craig
>
>
>
More information about the ncl-install
mailing list