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

HDF5 linking issues with new NetCDF packages



Hi Gilles,

As mentioned in the 'netCDF Transition' thread [1] we're preparing the
netcdf transition in which we'll update from NetCDF 4.1.3 to 4.4.0.

One of the significant changes is the switch to the HDF5 MPI variant.
I'd like your opinion about the HDF5 related issues that have surfaced.

There is a common issue with linking the HDF5 libraries the new netcdf
library is built with. Several netcdf dependents FTBFS due to link
issues such as this:

 gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o ncdf4.so \
   ncdf.o ncdf2.o ncdf3.o src_ncdf4.o -L/usr/lib -lnetcdf -lhdf5_hl \
   -lhdf5 -lz -ldl -lm -lcurl -L/usr/lib/R/lib -lR
 /usr/bin/ld: cannot find -lhdf5_hl
 /usr/bin/ld: cannot find -lhdf5
 collect2: error: ld returned 1 exit status

As you documented in the hdf5 transition (#755539) [2] adding the
HDF5 library and include paths is the way to fix these issues.

The best way to fix this for the new netcdf package is probably to patch
nc-config & netcdf.pc to include the HDF5 library and include paths too.

Another issue with the switch to the HDF5 MPI variant for the new netcdf
package is that it's the only option it's built with. Because most (if
not all) of our packages are built with the HDF5 serial variant by
default, it may not be wise to not have the option in netcdf too.

I'm considering changing the new netcdf package to be more like the hdf5
package, and default to the serial variant, and have the MPI variants
available too (with mpich for only a few architectures).

What do you think about these issues?

[1] https://lists.debian.org/debian-gis/2015/07/msg00116.html
[2] https://lists.debian.org/debian-gis/2014/07/msg00051.html

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1


Reply to: