[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 970404: problem in compilation



>To: address@hidden
>From: address@hidden
>Subject: problem in compilation
>Organization: Dipartimento di Scienze della Terra, Universita' di Genova
>Keywords: 199704041430.HAA19984

Hi Marino,

> I've triyed to compile netCDF v.2.3.2 and as always when I've started use
> SPARCStation4 and solaris I' some problems

We have a newer version available that avoids some of these problems,
version 2.4.3 from 

  ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf.tar.Z

> Some info
> - - C compiler gcc-2.7.2, os 5.5.1, solaris 2.5.1
> Sorry, but I've no experience in compilation!
> A. I haven't Fortran compiler. Need I g77?

No, you can omit the Fortran interface by instructing the "configure"
script that you don't have a Fortran compiler.  I think this was done
for version 2.3.2 by editing the CUSTOMIZE file to set FC="", or set FC
to the empty string in the environment before invoking "configure".  The
INSTALL file describes how to do this.

> A. Running make in /usr/local/my_dir, all it is right until ncgen
> processing, when appear this msg:
> 
> lex ncgen.l
> sh: lex: not found
> *** Error code 1
> make: Fatal error: Command failed for target `ncgenyy.c'
> Current working directory /usr/local/unidata/ncgen
> *** Error code 1
> make: Fatal error: Command failed for target `ncgen/all'
> 
> Browsing in the Makefile I didn't find ncgenvyy.c.. is a problem.
> I linked lex from /usr/ccs/bin/ to /usr/bin/ but nothing happens. 

If you have /usr/ccs/bin, this should be in your PATH environment
variable before you invoke the "configure" script, so it can find tools
such as "lex" and generate the Makefiles with their locations set
correctly.  Probably the /usr/ccs/bin/lex would have been found and
worked OK if you had run "configure" again to remake the Makefiles.

>                                                             I tested
> with 'make test' all object compiled and all is ok as say this msg:
> many thanks
> 
> # make test
> 
> making `test' in directory /usr/local/unidata/xdr
> 
> ./xdrtest > xdrtest_out.new
> diff xdrtest_out.new testout.sav
> *** XDR passes formatted test ***
> cmp test.xdr test_xdr.sav
> *** XDR passes binary test ***
> 
> returning to directory /usr/local/unidata
> 
> 
> making `test' in directory /usr/local/unidata/libsrc
> 
> /usr/xpg4/bin/ar rcuv libnetcdf.a array.o attr.o cdf.o dim.o file.o
> iarray.o error.o  globdef.o putget.o putgetg.o sharray.o string.o var.o 
> xdrposix.o
> ./cdftest > cdftest_out.new
> nccreate: filename "test.cdf": File exists
> trying again
> diff cdftest_out.new testout.sav
> *** netCDF passes formatted test ***
> cmp test.cdf test_cdf.sav
> *** netCDF passes binary test ***
> 
> returning to directory /usr/local/unidata
> 
> 
> making `test' in directory /usr/local/unidata/nctest
> 
> ./nctest
> *** Testing nccreate ...        ok ***
> *** Testing ncopen ...          ok ***
> *** Testing ncredef ...         ok ***
> *** Testing ncendef ...         ok ***
> *** Testing ncclose ...         ok ***
> *** Testing ncinquire ...       ok ***
> *** Testing ncsync ...          ok ***
> *** Testing ncabort ...         ok ***
> *** Testing ncdimdef ...        ok ***
> *** Testing ncdimid ...         ok ***
> *** Testing ncdiminq ...        ok ***
> *** Testing ncdimrename ...     ok ***
> *** Testing ncvardef ...        ok ***
> *** Testing ncvarid ...         ok ***
> *** Testing ncvarinq ...        ok ***
> *** Testing ncvarput1 ...       ok ***
> *** Testing ncvarget1 ...       ok ***
> *** Testing ncvarput ...        ok ***
> *** Testing ncvarget ...        ok ***
> *** Testing ncvarputg ...       ok ***
> *** Testing ncvargetg ...       ok ***
> *** Testing ncrecinq ...        ok ***
> *** Testing ncrecput ...        ok ***
> *** Testing ncrecget ...        ok ***
> *** Testing ncvarrename ...     ok ***
> *** Testing ncattput ...        ok ***
> *** Testing ncattinq ...        ok ***
> *** Testing ncattget ...        ok ***
> *** Testing ncattcopy ...       ok ***
> *** Testing ncattname ...       ok ***
> *** Testing ncattrename ...     ok ***
> *** Testing ncattdel ...        ok ***
> *** Testing nctypelen ...       ok ***
> 
> returning to directory /usr/local/unidata
> 
> 
> making `test' in directory /usr/local/unidata/fortran
> 
> `test' not made because no FORTRAN compiler
> 
> returning to directory /usr/local/unidata
> 
> 
> making `test' in directory /usr/local/unidata/ncdump
> 
> ../ncgen/ncgen -o test0.nc -n test0.cdl
> sh: ../ncgen/ncgen: not found
> *** Error code 1
> make: Fatal error: Command failed for target `test'
> Current working directory /usr/local/unidata/ncdump
> *** Error code 1
> make: Fatal error: Command failed for target `ncdump/test'

So the library you made is apparently working fine for C.  If you don't
need the ncdump or ncgen utilities, you can just install it with "make
install".  However, if you want the ncdump and ncgen utilities, you
should reset your PATH to include /usr/ccs/bin/, "make clean", "rm
config.cache" and start over with running "configure" after telling it
you don't have a Fortran compiler.  Or, you could get the 2.4.3 version
and build from that, but that will also require lex.

--Russ

_____________________________________________________________________

Russ Rew                                         UCAR Unidata Program
address@hidden                     http://www.unidata.ucar.edu