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

Re: 19981005: netCDF compile error



Martin,

> To: address@hidden
> From: address@hidden (Martin Ridal)
> Organization: Stockholm University / Department of Meteorology
> Keywords: 199810051559.JAA02854

In the above message, you wrote:

> Problem: I try to compile necdf using a fortran 90 compiler.
> This does not work quite the way I want it to.
> 
> Attached is make.log and macros.make that I use according to
> one of the examples given in the INSTALL document.
> 
> > uname -a
> SunOS newton 5.6 Generic_105181-03 sun4u sparc SUNW,Ultra-5_10
> 
> > f90 -V
> f90: WorkShop Compilers 4.2 10/22/96 FORTRAN 90 1.2

I just built the netCDF release on one of our SunOS 5.6 systems using
the SC4.2 f90 compiler 1.2.  It built fine.  I suspect, therefore, that
it can be built on your system -- but that some small thing is incorrect.

> Making `all' in directory /home/martin/netcdf/src/libsrc
> 
> c89 -c -O -I.  -DNDEBUG attr.c

Hmm...  Normally, we like to see the full pathname of the compiler being
use (so there's no confusion).  This means, for example, that instead of
setting the CC environment variable like this

    $ CC=c89 export CC

    or

    % setenv CC c89

you should set it like this

    $ CC=/opt/SUNWspro/bin/c89 export CC

    or

    % setenv CC /opt/SUNWspro/bin/c89

> c89 -c -O -I.  -DNDEBUG dim.c
> c89 -c -O -I.  -DNDEBUG error.c
> c89 -c -O -I.  -DNDEBUG -DVERSION=`cat ../VERSION` libvers.c
> c89 -c -O -I.  -DNDEBUG nc.c
> c89 -c -O -I.  -DNDEBUG ncio.c
> c89 -c -O -I.  -DNDEBUG ncx.c
> c89 -c -O -I.  -DNDEBUG putget.c
> c89 -c -O -I.  -DNDEBUG string.c
> c89 -c -O -I.  -DNDEBUG v1hpg.c
> c89 -c -O -I.  -DNDEBUG v2i.c
> c89 -c -O -I.  -DNDEBUG var.c
> ar cru libnetcdf.a attr.o  dim.o  error.o  libvers.o  nc.o  ncio.o  ncx.o  
> putget.o  string.o  v1hpg.o  v2i.o  var.o
> ranlib libnetcdf.a
> m4 -B7168 -DAPI=C ../man/netcdf.m4 >netcdf.3  || rm netcdf.3

Odd.  My "make.log" file doesn't have the last command above.  What
version of the netCDF package are you trying to build (i.e. what is the
content of the file VERSION)?

> 
> Returning to directory /home/martin/netcdf/src
> 
> 
> Making `all' in directory /home/martin/netcdf/src/nc_test

My "make" doesn't go into the "nc_test" subdirectory until I do a "make
test".  I suspect, therefore, that you have an older version of the
netCDF package.  The current release is version 3.4.

If you don't have version 3.4, then I suggest you obtain and try to
build it.  Besides having code improvements, later releases also
incorporate modifications to the build procedure.

Please let me know if this helps.

> 
> c89 -c -O -I../libsrc  -DNDEBUG nc_test.c
> c89 -c -O -I../libsrc  -DNDEBUG error.c
> c89 -c -O -I../libsrc  -DNDEBUG test_get.c
> c89 -c -O -I../libsrc  -DNDEBUG test_put.c
> c89 -c -O -I../libsrc  -DNDEBUG test_read.c
> c89 -c -O -I../libsrc  -DNDEBUG test_write.c
> c89 -c -O -I../libsrc  -DNDEBUG util.c
> c89 -o nc_test -O  nc_test.o  error.o  test_get.o  test_put.o  test_read.o  
> test_write.o  util.o -L../libsrc -lnetcdf -lm 
> 
> Returning to directory /home/martin/netcdf/src
> 
> 
> Making `all' in directory /home/martin/netcdf/src/fortran
> 
> sed 's/@FILBYTE@/-127/g'      \
>     netcdf.in >netcdf.inc
> c89 -c -O -I../libsrc  -DNDEBUG fort-attio.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-control.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-dim.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-genatt.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-geninq.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-genvar.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-lib.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-misc.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-v2compat.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-vario.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-var1io.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-varaio.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-varmio.c
> c89 -c -O -I../libsrc  -DNDEBUG fort-varsio.c
> ar cru ../libsrc/libnetcdf.a fort-attio.o      fort-control.o  fort-dim.o     
>  fort-genatt.o   fort-geninq.o   fort-genvar.o   fort-lib.o      fort-misc.o  
>    fort-v2compat.o         fort-vario.o    fort-var1io.o   fort-varaio.o   
> fort-varmio.o   fort-varsio.o
> ranlib ../libsrc/libnetcdf.a
> m4 -B7168 -DAPI=FORTRAN ../man/netcdf.m4 >netcdf.3f || rm netcdf.3f
> 
> Returning to directory /home/martin/netcdf/src
> 
> 
> Making `all' in directory /home/martin/netcdf/src/nf_test
> 
> *** Error code 1
> *** Error code 1
> *** Error code 1

--------
Steve Emmerson   <http://www.unidata.ucar.edu>