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

[netCDF #NFI-982086]: netcdf4 and NCO



> I'm not 100% if this is an issue with netcdf or NCO but based on the results
> of the configure script it seems likely to be more netcdf4 than NCO. I
> successfully installed netcdf4 (with netcdf4 enabled) yesterday (once I
> realized, thanks to Russ, that I need hdf5 1.8x). I built it with PGI
> (actually it did not work for me with gfortran or ifort, but that's another
> issue) and I ran "make tests" and everything seemed fine. Today I decided I
> need to recompile the NCO operators (3.9.8) with netcdf4 support and I
> pointed it to my netcdf4 directory ( setenv NETCDF4_ROOT
> /usr/local/netcdf4-pgi) and it eventually returns the following:
> 
> % ./configure --prefix=/usr/local/nco-netcdf4 --enable-netcdf4
> .....
> 
> #################################
> #  Testing for HDF5 support     #
> #################################
> NETCDF4_ROOT is set and exists---assuming it is real
> checking for nc4_enddef_netcdf4_file in -lnetcdf... no
> #############################################
> # Testing for netCDF4 support               #
> #############################################
> DEBUG: LIBS =
> checking netcdf.h usability... yes
> checking netcdf.h presence... yes
> checking for netcdf.h... yes
> configure: Checking default compiler flags
> checking for nc_open in -lnetcdf... no
> configure: Bad news: Simple program does not compile and link to libnetcdf.a
> with default compiler flags. Will try with 64-bit ABI flags...
> checking for nc_close in -lnetcdf... no
> ERROR: Unable to compile and link executable with "libnetcdf.a" with
> LDFLAGS=-L/usr/local/netcdf4-pgi/lib/ -L/usr/local/netcdf4-pgi/lib   -m64
> 1. If netCDF is not installed, then download and install it:
> http://www.unidata.ucar.edu/packages/netcdf
> 2. If netCDF is installed correctly, set NETCDF_LIB to directory with
> libnetcdf.a
> 3. If configure fails here with NETCDF_LIB set correctly, try changing CC
> and/or CFLAGS until compilation and linking to libnetcdf.a works
> Currently CC="gcc -std=gnu99" and CFLAGS="-g -O2 -m64" do not work with
> libnetcdf.a
> Set environment variables CC and CFLAGS to working values and then re-run
> ./configure
> configure: error: Mandatory netCDF link test failed
> 
> 
> So, it appears that there is something missing in my netcdf libs.
> Sugggestions?
> 
> thanks, David
> 
> --
> 

Howdy David,

Take a look at the config.log file and see what error messages it is getting, 
and how it is trying to link to the netCDF library. In general, whenever there 
is a problem in configure, look at config.log to get much more output and 
information.

Thanks,

Ed

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