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

Re: HDF5 linking issues with new NetCDF packages

Hi Bas,

Sebastiaan Couwenberg a écrit le 30/07/2015 16:38 :
> 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.

IIUC MPI shouldn't be the only option or you'll have to use mpirun for
every executable depending on netcdf.

> 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).

I can't think of a better solution. If you want to provide an MPI
variant of netcdf you'll have to ship the serial variant as well.

> What do you think about these issues?

Sorting out the libhdf5 build process to have all variant co-installable
was really painful, but it was worth it. We also added symbols
versioning to be able - in theory - to link an executable with both
serial and mpi variants.

I'd be pleased to give you a hand in this process, but I'll be in vac
from today until the 25th of august. I'll keep an eye on my emails anyway.

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



Attachment: signature.asc
Description: OpenPGP digital signature

Reply to: