InsightSoftwareConsortium / ITK

Insight Toolkit (ITK) -- Official Repository. ITK builds on a proven, spatially-oriented architecture for processing, segmentation, and registration of scientific images in two, three, or more dimensions.
https://itk.org
Apache License 2.0
1.43k stars 665 forks source link

ITK 5.0_rc1 fails to build #572

Closed TheChymera closed 5 years ago

TheChymera commented 5 years ago

Description

itk fails to build

Steps to Reproduce

cmake --no-warn-unused-cli -C /var/tmp/portage/sci-libs/itk-5.0_rc1/work/itk-5.0_rc1_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON -DITK_USE_SYSTEM_DCMTK=ON -DITK_USE_SYSTEM_DOUBLECONVERSION=ON -DITK_USE_SYSTEM_GCCXML=ON -DITK_USE_SYSTEM_HDF5=ON -DITK_USE_SYSTEM_JPEG=ON -DITK_USE_SYSTEM_PNG=ON -DITK_USE_SYSTEM_SWIG=ON -DITK_USE_SYSTEM_TIFF=ON -DITK_USE_SYSTEM_ZLIB=ON -DITK_BUILD_DEFAULT_MODULES=ON -DITK_COMPUTER_MEMORY_SIZE=1 -DWRAP_ITK_JAVA=OFF -DWRAP_ITK_TCL=OFF -Ddouble-conversion_INCLUDE_DIRS=/usr/include/double-conversion -Ddouble-conversion_LIBRARIES=-ldouble-conversion -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DITK_USE_REVIEW=OFF -DITKV3_COMPATIBILITY=OFF -DITK_WRAP_PYTHON=OFF -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_INSTALL_DO_STRIP=OFF -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sci-libs/itk-5.0_rc1/work/itk-5.0_rc1_build/gentoo_toolchain.cmake  /var/tmp/portage/sci-libs/itk-5.0_rc1/work/ITK-5.0rc01

Actual behavior

build.log

dzenanz commented 5 years ago

The problem is mismatched version of system's HDF5. Here is the relevant part of the build log:

/var/tmp/portage/sci-libs/itk-5.0_rc1/work/ITK-5.0rc01/Modules/ThirdParty/MINC/src/libminc/libsrc2/volume.c: In function ‘_hdf_open’:
/var/tmp/portage/sci-libs/itk-5.0_rc1/work/ITK-5.0rc01/Modules/ThirdParty/MINC/src/libminc/libsrc2/volume.c:120:32: error: ‘H5F_LIBVER_V18’ undeclared (first use in this function); did you mean ‘H5F_LIBVER_LATEST’?
   H5Pset_libver_bounds(prp_id, H5F_LIBVER_V18, H5F_LIBVER_V18);
                                ^~~~~~~~~~~~~~
                                H5F_LIBVER_LATEST
/var/tmp/portage/sci-libs/itk-5.0_rc1/work/ITK-5.0rc01/Modules/ThirdParty/MINC/src/libminc/libsrc2/volume.c:120:32: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/sci-libs/itk-5.0_rc1/work/ITK-5.0rc01/Modules/ThirdParty/MINC/src/libminc/libsrc2/volume.c: In function ‘_hdf_create’:
/var/tmp/portage/sci-libs/itk-5.0_rc1/work/ITK-5.0rc01/Modules/ThirdParty/MINC/src/libminc/libsrc2/volume.c:223:30: error: ‘H5F_LIBVER_V18’ undeclared (first use in this function); did you mean ‘H5F_LIBVER_LATEST’?
   H5Pset_libver_bounds(fpid, H5F_LIBVER_V18, H5F_LIBVER_V18);
                              ^~~~~~~~~~~~~~
                              H5F_LIBVER_LATEST

You should use HDF5 1.10.2 or newer, or 1.8.x or earlier. Or use the version built into ITK. Versions 1.10.0 and 1.10.1 have a versioning problem. See the discussion about it.

dzenanz commented 5 years ago

I thought that the error message would have been clearer. @gdevenyi can you figure out why the error message is generic, and not the one we wrote which says something like HDF5 versions 1.10.0 and 1.10.1 are unsupported?