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

[netCDF #VUQ-446360]: netcdf 4.1.1 installation errors



Hi Pavel,

> I try to install netcdf 4.1.1. on my Linux pc with the Sent OS 5 operational
> system.
> The following commands are used:
> 
> 1)  ./configure --prefix=/usr/local/netcdf411
> 
> 2) make check install
> 
> I obtained the following installation errors:
> make[2]: *** [nf_test] Error 1
> make[2]: Leaving directory `/home/pavel/WRF_v321/netcdf-4.1.1/nf_test'
> make[1]: *** [check-am] Error 2
> make[1]: Leaving directory `/home/pavel/WRF_v321/netcdf-4.1.1/nf_test'
> make: *** [check-recursive] Error 1
> 
> Attached are two files:  config.log and make_check_install.log with full
> details.
> 
> I use gfortran gcc version 4.4.0 20090514 (Red Hat 4.4.0-6).

The config.log and make_check_install.log you sent showed you were
actually building with g95 rather than gfortran.  If you have both g95
and gfortran installed but prefer to use gfortran, you need to set the
environment variable FC to gfortran before running the configure
script.
 
> Could you help with netcdf4.1.1 installation?

Your make_check_install.log showed no g95 compiles were run initially
during the build, and nothing was built in the "fortran" subdirectory:

> make  check-am
> make[2]: Entering directory `/home/pavel/WRF_v321/netcdf-4.1.1/f90'
> make[2]: Nothing to be done for `check-am'.
> make[2]: Leaving directory `/home/pavel/WRF_v321/netcdf-4.1.1/f90'
> make[1]: Leaving directory `/home/pavel/WRF_v321/netcdf-4.1.1/f90'
> Making check in fortran
> make[1]: Entering directory `/home/pavel/WRF_v321/netcdf-4.1.1/fortran'
> make  check-am
> make[2]: Entering directory `/home/pavel/WRF_v321/netcdf-4.1.1/fortran'
> make[2]: Leaving directory `/home/pavel/WRF_v321/netcdf-4.1.1/fortran'
> make[1]: Leaving directory `/home/pavel/WRF_v321/netcdf-4.1.1/fortran'

Then later the first failure occurs in testing the Fortran API after
the C library was been built and tested successfully:

> Making check in nf_test
> make[1]: Entering directory `/home/pavel/WRF_v321/netcdf-4.1.1/nf_test'
> make  nf_test tst_f77_v2         ftest tst_f90
> make[2]: Entering directory `/home/pavel/WRF_v321/netcdf-4.1.1/nf_test'
> /bin/sh ../libtool --tag=F77   --mode=link g95 -I../fortran        
> -I../libsrc -I../fortran  -I../f90 -g -O2         -L/usr/kerberos/lib64 
> -lcurl -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto 
> -lz    -o nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o 
> test_write.o util.o fortlib.o        ../libsrc/libnetcdf.la  
> libtool: link: g95 -I../fortran -I../libsrc -I../fortran -I../f90 -g -O2 -o 
> nf_test test_get.o test_put.o nf_error.o nf_test.o test_read.o test_write.o 
> util.o fortlib.o  -L/usr/kerberos/lib64 ../libsrc/.libs/libnetcdf.a -lcurl 
> -ldl -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lidn -lssl -lcrypto -lz
> test_get.o: In function `test_nf_get_att_double':
> /home/pavel/WRF_v321/netcdf-4.1.1/nf_test/test_get.F:5511: undefined 
> reference to `nf_open_'

Maybe the directory in which you are building is left over from a
previous build with a different compiler.  For example, perhaps it was
built with FC=gfortran, and now you're running "make check install"
with g95, which uses different conventions for calling C from fortran
than gfortran, hence gets undefined references trying to link with the
Fortran library built by a different compiler.  The solution is to run
"make clean" before running the configure script, followed by "make
check install".

However, if you run "make clean" first, you might later run into this
problem in version 4.1.1:

  http://www.unidata.ucar.edu/netcdf/docs/known_problems.html#texi2dvi

but a workaround is described there.

--Russ

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



Ticket Details
===================
Ticket ID: VUQ-446360
Department: Support netCDF
Priority: Normal
Status: Closed