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

[netCDF #NFI-982086]: netcdf4 and NCO



Hi David,

> config.log gives the following:
> 
> configure:20068: Bad news: Simple program does not compile and link to
> libnetcdf.a with default compiler flags. Will try with 64-bit ABI flags...
> configure:20099: checking for nc_close in -lnetcdf
> configure:20134: gcc -std=gnu99 -o conftest -g -O2 -m64
> -I/usr/local/netcdf4-gfort/include  -L/usr/local/netcdf4-gfort/lib  -m64
> conftest.c -lnetcdf   >&5
> /usr/local/netcdf4-gfort/lib/libnetcdf.a(nc4file.o): In function
> `sync_netcdf4_file':
> /usr/local/src/netcdf-4.0/libsrc4/nc4file.c:658: undefined reference to
> `H5Fflush'
> /usr/local/netcdf4-gfort/lib/libnetcdf.a(nc4file.o): In function
> `close_netcdf4_file':
> /usr/local/src/netcdf-4.0/libsrc4/nc4file.c:725: undefined reference to
> `H5Fclose'
> /usr/local/netcdf4-gfort/lib/libnetcdf.a(nc4file.o): In function
> `nc_open_file':
> /usr/local/src/netcdf-4.0/libsrc4/nc4file.c:427: undefined reference to
> `H5Eset_auto1'
> /usr/local/netcdf4-gfort/lib/libnetcdf.a(nc4file.o): In function
> `nc4_open_file':
> /usr/local/src/netcdf-4.0/libsrc4/nc4file.c:324: undefined reference to
> `H5check_version'
> /usr/local/src/netcdf-4.0/libsrc4/nc4file.c:338: undefined reference to
> `H5open'
> /usr/local/src/netcdf-4.0/libsrc4/nc4file.c:338: undefined reference to
> `H5P_CLS_FILE_ACCESS_g'
> /usr/local/src/netcdf-4.0/libsrc4/nc4file.c:338: undefined reference to
> `H5Pcreate'
> 
> and much, much more. Which is interesting -- as when I build netcdf4 it
> seems to be happy with everything. I try compiling code with the resultant
> netcdf4 libs and got pretty much the same output as well. So this appears to
> be an issue with hdf5?

I wonder if this is a result of a subtle inconsistency in configure flags
that is confusing the issue.  The netCDF-4 configure requires that you use
"--enable-netcdf-4" (note the hyphen before the "4") whereas the NCO
configure instead requires "--enable-netcdf4" (no hyphen before the "4").
Perhaps when you built the netCDF-4 library, you used "--enable-netcdf4",
which would not generate an error message but would instead build the
default netCDF-3 release, without netCDF-4 (or HDF5) support.

We will consider how to either allow "--enable-netcdf4" as a synonym for
"--enable-netcdf-4" or at least emitting an error message when specifying
"--enable-netcdf4".  

If this was the problem, thanks for making us aware of it.

--Russ

--Russ


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



Ticket Details
===================
Ticket ID: NFI-982086
Department: Support netCDF
Priority: High
Status: Closed