Bug#835710: netcdf: FTBFS: nc4internal.h:18:18: fatal error: hdf5.h: No such file or directory

Sebastiaan Couwenberg sebastic at xs4all.nl
Sun Aug 28 13:40:17 UTC 2016


Control: tags -1 pending

Hi Lucas,

Thanks for your work on archive rebuilds.

On 08/28/16 11:07, Lucas Nussbaum wrote:
> During a rebuild of all packages in sid, your package failed to build on
> amd64.
>
> Relevant part (hopefully):
>> cd /<<PKGBUILDDIR>>/obj-x86_64-linux-gnu/libsrc4 && /usr/bin/cc  -DCURL_STATICLIB=1 -DH5_BUILT_AS_DYNAMIC_LIB -DHAVE_CONFIG_H -I/<<PKGBUILDDIR>>/include -I/<<PKGBUILDDIR>>/oc2 -I/<<PKGBUILDDIR>>/libsrc -I/<<PKGBUILDDIR>>/obj-x86_64-linux-gnu  -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -fPIC   -o CMakeFiles/netcdf4.dir/nc4attr.c.o   -c /<<PKGBUILDDIR>>/libsrc4/nc4attr.c
>> In file included from /<<PKGBUILDDIR>>/libsrc4/nc4attr.c:15:0:
>> /<<PKGBUILDDIR>>/include/nc4internal.h:18:18: fatal error: hdf5.h: No such file or directory
>>  #include <hdf5.h>
>>                   ^
>> compilation terminated.
>> libsrc4/CMakeFiles/netcdf4.dir/build.make:89: recipe for target 'libsrc4/CMakeFiles/netcdf4.dir/nc4attr.c.o' failed
>> make[3]: *** [libsrc4/CMakeFiles/netcdf4.dir/nc4attr.c.o] Error 1

It turns out that CMake >= 3.6.0 no longer defined the deprecated 
HDF4_INCLUDE_DIR variable in FindHDF5.cmake. I've added a patch to 
support both by setting HDF5_INCLUDE_DIR to the value of 
HDF5_INCLUDE_DIRS if the former is not defined but the latter is.

The patch has been forwarded upstream, and a nearly identical patch 
included in PDAL (#835723) to fix the issue better than appending the 
include path to CXXFLAGS.

Kind Regards,

Bas

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



More information about the Pkg-grass-devel mailing list