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

[netCDF #PPF-156580]: bug in nc-config hdf5 library path



> Hello,
> 
> There seems to be a bug in nc-config's setting of the library search
> path for the HDF5 libraries.
> 
> I configured netcdf version 4.0.1 as:
> CC=mpicc CXX=mpicxx FC=mpif77 F90=mpif90 ./configure
> --prefix=/usr/local/netcdf-4.0.1 --with-hdf5=/usr/local/hdf5-1.8.2
> --enable-netcdf-4
> 
> But nc-config gives the wrong HDF5 library search path (it is missing /lib):
> 
> /usr/local/netcdf-4.0.1/bin/nc-config --libs
> -L/usr/local/netcdf-4.0.1/lib -lnetcdf -L/usr/local/hdf5-1.8.2 -lhdf5_hl
> -lhdf5 -lz
> 
> I believe the following patch fixes the problem:
> 
> # diff -u configure.ac.orig configure.ac
> --- configure.ac.orig 2009-03-26 08:10:02.000000000 -0400
> +++ configure.ac      2009-08-12 10:08:08.000000000 -0400
> @@ -1159,7 +1159,7 @@
> fi
> if test "x$enable_netcdf_4" = xyes ; then
> if test "x$HDF5DIR" != x ; then
> -      NC_LIBS="$NC_LIBS -L$HDF5DIR"
> +      NC_LIBS="$NC_LIBS -L$HDF5DIR/lib"
> fi
> NC_LIBS="$NC_LIBS -lhdf5_hl -lhdf5 $SZLIB_LIBS"
> if test "x$ZLIBDIR" != x ; then
> 
> Sincerely,
> Hal
> 
> 

Thanks Hal!

This has already been fixed in the netCDF codebase. To get the latest version 
of nc-config (and the rest of the library) try the netCDF daily snapshot 
release:
ftp://ftp.unidata.ucar.edu/pub/netcdf/snapshot/netcdf-4-daily.tar.gz

Thanks, and keep on netCDFing!

Ed

Ticket Details
===================
Ticket ID: PPF-156580
Department: Support netCDF
Priority: Normal
Status: Closed