[Debian-med-packaging] Bug#835400: [lamby at debian.org: Bug#835400: libminc: FTBFS: convert.c:13:18: fatal error: hdf5.h: No such file or directory]

Andreas Tille andreas at an3as.eu
Thu Aug 25 13:10:24 UTC 2016


Thanks a lot for the super fast response, Andreas.

On Thu, Aug 25, 2016 at 01:38:11PM +0100, Ghislain Vaillant wrote:
> The upstream custom HDF5 find module is busted.
> 
> Better patch the build system to use the system CMake one.
> 
> Patch attached. Successfully tested on my pbuilder.
> 
> Ghis
> 
> 
> On 25/08/16 13:02, Andreas Tille wrote:
> >Hi Gishlain,
> >
> >this sounds somehow similar to the shark issue.  Do you have some hint
> >what should be done?
> >
> >Kind regards
> >
> >        Andreas.
> >
> >----- Forwarded message from Chris Lamb <lamby at debian.org> -----
> >
> >Date: Thu, 25 Aug 2016 11:26:43 +0100
> >From: Chris Lamb <lamby at debian.org>
> >To: submit at bugs.debian.org
> >Subject: Bug#835400: libminc: FTBFS: convert.c:13:18: fatal error: hdf5.h: No such file or directory
> >X-Debian-PR-Message: report 835400
> >X-Debian-PR-Package: src:libminc
> >X-Debian-PR-Keywords:
> >X-Debian-PR-Source: libminc
> >
> >Source: libminc
> >Version: 2.3.00-2
> >Severity: serious
> >Justification: fails to build from source
> >User: reproducible-builds at lists.alioth.debian.org
> >Usertags: ftbfs
> >X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
> >
> >Dear Maintainer,
> >
> >libminc fails to build from source in unstable/amd64:
> >
> >   [..]
> >
> >   Get:15 http://httpredir.debian.org/debian sid/main amd64 libjpeg-dev all 1:1.5.0-1 [54.8 kB]
> >   Get:16 http://httpredir.debian.org/debian sid/main amd64 libaec-dev amd64 0.3.2-1 [17.4 kB]
> >   Get:17 http://httpredir.debian.org/debian sid/main amd64 hdf5-helpers amd64 1.8.16+docs-8 [35.4 kB]
> >   Get:18 http://httpredir.debian.org/debian sid/main amd64 libhdf5-cpp-11 amd64 1.8.16+docs-8 [126 kB]
> >   Get:19 http://httpredir.debian.org/debian sid/main amd64 libhdf5-dev amd64 1.8.16+docs-8 [5032 kB]
> >   Get:20 http://httpredir.debian.org/debian sid/main amd64 libcurl4-gnutls-dev amd64 7.50.1-1 [360 kB]
> >   Get:21 http://httpredir.debian.org/debian sid/main amd64 libnetcdf-dev amd64 1:4.4.1-1 [76.5 kB]
> >   Get:22 http://httpredir.debian.org/debian sid/main amd64 libnifti2 amd64 2.0.0-2 [107 kB]
> >   Get:23 http://httpredir.debian.org/debian sid/main amd64 libnifti-dev amd64 2.0.0-2 [138 kB]
> >   Fetched 12.7 MB in 0s (75.7 MB/s)
> >   Selecting previously unselected package cmake-data.
> >   (Reading database ...
> >(Reading database ... 5%
> >(Reading database ... 10%
> >(Reading database ... 15%
> >(Reading database ... 20%
> >(Reading database ... 25%
> >(Reading database ... 30%
> >(Reading database ... 35%
> >(Reading database ... 40%
> >(Reading database ... 45%
> >(Reading database ... 50%
> >(Reading database ... 55%
> >(Reading database ... 60%
> >(Reading database ... 65%
> >(Reading database ... 70%
> >(Reading database ... 75%
> >(Reading database ... 80%
> >(Reading database ... 85%
> >(Reading database ... 90%
> >(Reading database ... 95%
> >(Reading database ... 100%
> >(Reading database ... 23248 files and directories currently installed.)
> >   Preparing to unpack .../00-cmake-data_3.6.1-1_all.deb ...
> >   Unpacking cmake-data (3.6.1-1) ...
> >   Selecting previously unselected package liblzo2-2:amd64.
> >   Preparing to unpack .../01-liblzo2-2_2.08-1.2_amd64.deb ...
> >   Unpacking liblzo2-2:amd64 (2.08-1.2) ...
> >   Selecting previously unselected package libarchive13:amd64.
> >   Preparing to unpack .../02-libarchive13_3.2.1-2_amd64.deb ...
> >   Unpacking libarchive13:amd64 (3.2.1-2) ...
> >   Selecting previously unselected package libcurl3:amd64.
> >   Preparing to unpack .../03-libcurl3_7.50.1-1_amd64.deb ...
> >   Unpacking libcurl3:amd64 (7.50.1-1) ...
> >   Selecting previously unselected package libjsoncpp1:amd64.
> >   Preparing to unpack .../04-libjsoncpp1_1.7.4-3_amd64.deb ...
> >   Unpacking libjsoncpp1:amd64 (1.7.4-3) ...
> >   Selecting previously unselected package cmake.
> >   Preparing to unpack .../05-cmake_3.6.1-1_amd64.deb ...
> >   Unpacking cmake (3.6.1-1) ...
> >   Selecting previously unselected package libgfortran3:amd64.
> >   Preparing to unpack .../06-libgfortran3_6.2.0-1_amd64.deb ...
> >   Unpacking libgfortran3:amd64 (6.2.0-1) ...
> >   Selecting previously unselected package libaec0:amd64.
> >   Preparing to unpack .../07-libaec0_0.3.2-1_amd64.deb ...
> >   Unpacking libaec0:amd64 (0.3.2-1) ...
> >   Selecting previously unselected package libsz2:amd64.
> >   Preparing to unpack .../08-libsz2_0.3.2-1_amd64.deb ...
> >   Unpacking libsz2:amd64 (0.3.2-1) ...
> >   Selecting previously unselected package libhdf5-10:amd64.
> >   Preparing to unpack .../09-libhdf5-10_1.8.16+docs-8_amd64.deb ...
> >   Unpacking libhdf5-10:amd64 (1.8.16+docs-8) ...
> >   Selecting previously unselected package libnetcdf11.
> >   Preparing to unpack .../10-libnetcdf11_1%3a4.4.1-1_amd64.deb ...
> >   Unpacking libnetcdf11 (1:4.4.1-1) ...
> >   Selecting previously unselected package zlib1g-dev:amd64.
> >   Preparing to unpack .../11-zlib1g-dev_1%3a1.2.8.dfsg-2+b1_amd64.deb ...
> >   Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2+b1) ...
> >   Selecting previously unselected package libjpeg62-turbo:amd64.
> >   Preparing to unpack .../12-libjpeg62-turbo_1%3a1.5.0-1_amd64.deb ...
> >   Unpacking libjpeg62-turbo:amd64 (1:1.5.0-1) ...
> >   Selecting previously unselected package libjpeg62-turbo-dev:amd64.
> >   Preparing to unpack .../13-libjpeg62-turbo-dev_1%3a1.5.0-1_amd64.deb ...
> >   Unpacking libjpeg62-turbo-dev:amd64 (1:1.5.0-1) ...
> >   Selecting previously unselected package libjpeg-dev.
> >   Preparing to unpack .../14-libjpeg-dev_1%3a1.5.0-1_all.deb ...
> >   Unpacking libjpeg-dev (1:1.5.0-1) ...
> >   Selecting previously unselected package libaec-dev:amd64.
> >   Preparing to unpack .../15-libaec-dev_0.3.2-1_amd64.deb ...
> >   Unpacking libaec-dev:amd64 (0.3.2-1) ...
> >   Selecting previously unselected package hdf5-helpers.
> >   Preparing to unpack .../16-hdf5-helpers_1.8.16+docs-8_amd64.deb ...
> >   Unpacking hdf5-helpers (1.8.16+docs-8) ...
> >   Selecting previously unselected package libhdf5-cpp-11:amd64.
> >   Preparing to unpack .../17-libhdf5-cpp-11_1.8.16+docs-8_amd64.deb ...
> >   Unpacking libhdf5-cpp-11:amd64 (1.8.16+docs-8) ...
> >   Selecting previously unselected package libhdf5-dev.
> >   Preparing to unpack .../18-libhdf5-dev_1.8.16+docs-8_amd64.deb ...
> >   Unpacking libhdf5-dev (1.8.16+docs-8) ...
> >   Selecting previously unselected package libcurl4-gnutls-dev:amd64.
> >   Preparing to unpack .../19-libcurl4-gnutls-dev_7.50.1-1_amd64.deb ...
> >   Unpacking libcurl4-gnutls-dev:amd64 (7.50.1-1) ...
> >   Selecting previously unselected package libnetcdf-dev.
> >   Preparing to unpack .../20-libnetcdf-dev_1%3a4.4.1-1_amd64.deb ...
> >   Unpacking libnetcdf-dev (1:4.4.1-1) ...
> >   Selecting previously unselected package libnifti2.
> >   Preparing to unpack .../21-libnifti2_2.0.0-2_amd64.deb ...
> >   Unpacking libnifti2 (2.0.0-2) ...
> >   Selecting previously unselected package libnifti-dev.
> >   Preparing to unpack .../22-libnifti-dev_2.0.0-2_amd64.deb ...
> >   Unpacking libnifti-dev (2.0.0-2) ...
> >   Setting up libaec0:amd64 (0.3.2-1) ...
> >   Setting up libnifti2 (2.0.0-2) ...
> >   Setting up libjpeg62-turbo:amd64 (1:1.5.0-1) ...
> >   Setting up libcurl3:amd64 (7.50.1-1) ...
> >   Setting up libgfortran3:amd64 (6.2.0-1) ...
> >   Setting up cmake-data (3.6.1-1) ...
> >   Setting up libnifti-dev (2.0.0-2) ...
> >   Processing triggers for libc-bin (2.23-5) ...
> >   Processing triggers for man-db (2.7.5-1) ...
> >   Setting up libjpeg62-turbo-dev:amd64 (1:1.5.0-1) ...
> >   Setting up libcurl4-gnutls-dev:amd64 (7.50.1-1) ...
> >   Setting up hdf5-helpers (1.8.16+docs-8) ...
> >   Setting up liblzo2-2:amd64 (2.08-1.2) ...
> >   Setting up libsz2:amd64 (0.3.2-1) ...
> >   Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2+b1) ...
> >   Setting up libjsoncpp1:amd64 (1.7.4-3) ...
> >   Setting up libhdf5-10:amd64 (1.8.16+docs-8) ...
> >   Setting up libhdf5-cpp-11:amd64 (1.8.16+docs-8) ...
> >   Setting up libarchive13:amd64 (3.2.1-2) ...
> >   Setting up libaec-dev:amd64 (0.3.2-1) ...
> >   Setting up libhdf5-dev (1.8.16+docs-8) ...
> >   update-alternatives: using /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode
> >   Setting up libjpeg-dev (1:1.5.0-1) ...
> >   Setting up cmake (3.6.1-1) ...
> >   Setting up libnetcdf11 (1:4.4.1-1) ...
> >   Setting up libnetcdf-dev (1:4.4.1-1) ...
> >   Setting up libminc-build-deps (2.3.00-2) ...
> >   Processing triggers for libc-bin (2.23-5) ...
> >   **************************************************************************************
> >   ** Environment                                                                      **
> >   **************************************************************************************
> >   PATH=/home/lamby/git/projects/dotfiles/dotfiles/..//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> >   HOSTNAME=ff03e8606951
> >   TERM=xterm
> >   PAGER=more
> >   DISPLAY=:0
> >   DOCKER_IMAGE=lamby-debian-sid
> >   DEB_BUILD_OPTIONS=parallel=9
> >   PIP_DOWNLOAD_CACHE=/home/lamby/.cache/pip
> >   HOME=/home/lamby
> >   LOGNAME=lamby
> >   SHLVL=1
> >   PWD=/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00
> >   OLDPWD=/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc
> >   GPG_TTY=/dev/console
> >   QUILT_PATCHES=debian/patches
> >   QUILT_NO_DIFF_INDEX=1
> >   QUILT_REFRESH_ARGS=-p ab --no-timestamps --no-index
> >   DEBEMAIL=lamby at debian.org
> >   DEBFULLNAME=Chris Lamb
> >   EDITOR=vim
> >   LESS=-cgiFx4M
> >   GPG_KEY=1E953E27D4311E58
> >   BLASTER=A220 I5 D1 H5 P330 T6
> >   _=/usr/bin/env
> >   **************************************************************************************
> >   ** Building libminc 2.3.00-2 on amd64                                               **
> >   **************************************************************************************
> >    dpkg-buildpackage -rfakeroot -D -us -uc -b
> >   dpkg-buildpackage: info: source package libminc
> >   dpkg-buildpackage: info: source version 2.3.00-2
> >   dpkg-buildpackage: info: source distribution unstable
> >   dpkg-buildpackage: info: source changed by Steve M. Robbins <smr at debian.org>
> >    dpkg-source --before-build libminc-2.3.00
> >   dpkg-buildpackage: info: host architecture amd64
> >    fakeroot debian/rules clean
> >   dh clean
> >      dh_testdir
> >      dh_auto_clean
> >      dh_clean
> >    debian/rules build
> >   dh build
> >      dh_testdir
> >      dh_update_autotools_config
> >      debian/rules override_dh_auto_configure
> >   make[1]: Entering directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00'
> >   rm -f cmake-modules/*HDF5*
> >   dh_auto_configure -- -DLIB_SUFFIX=/x86_64-linux-gnu -DBUILD_TESTING:BOOL=ON -DLIBMINC_BUILD_EZMINC_EXAMPLES:BOOL=ON -DLIBMINC_BUILD_SHARED_LIBS:BOOL=ON -DLIBMINC_MINC1_SUPPORT:BOOL=ON
> >   	cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -DLIB_SUFFIX=/x86_64-linux-gnu -DBUILD_TESTING:BOOL=ON -DLIBMINC_BUILD_EZMINC_EXAMPLES:BOOL=ON -DLIBMINC_BUILD_SHARED_LIBS:BOOL=ON -DLIBMINC_MINC1_SUPPORT:BOOL=ON
> >   -- The C compiler identification is GNU 6.2.0
> >   -- The CXX compiler identification is GNU 6.2.0
> >   -- Check for working C compiler: /usr/bin/cc
> >   -- Check for working C compiler: /usr/bin/cc -- works
> >   -- Detecting C compiler ABI info
> >   -- Detecting C compiler ABI info - done
> >   -- Detecting C compile features
> >   -- Detecting C compile features - done
> >   -- Check for working CXX compiler: /usr/bin/c++
> >   -- Check for working CXX compiler: /usr/bin/c++ -- works
> >   -- Detecting CXX compiler ABI info
> >   -- Detecting CXX compiler ABI info - done
> >   -- Detecting CXX compile features
> >   -- Detecting CXX compile features - done
> >   -- Found NetCDF headers: /usr/include
> >   -- Found NetCDF library: /usr/lib/x86_64-linux-gnu/libnetcdf.so
> >   -- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.8")
> >   -- HDF5: Using hdf5 compiler wrapper to determine C configuration
> >   -- HDF5: Using hdf5 compiler wrapper to determine CXX configuration
> >   -- Found HDF5: /usr/lib/x86_64-linux-gnu/libhdf5_cpp.so;/usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.so;/usr/lib/x86_64-linux-gnu/libpthread.so;/usr/lib/x86_64-linux-gnu/libsz.so;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libdl.so;/usr/lib/x86_64-linux-gnu/libm.so (found version "1.8.16")
> >   -- Looking for mkstemp
> >   -- Looking for mkstemp - found
> >   -- Looking for tmpnam
> >   -- Looking for tmpnam - found
> >   -- Looking for tempnam
> >   -- Looking for tempnam - found
> >   -- Looking for strerror
> >   -- Looking for strerror - found
> >   -- Looking for popen
> >   -- Looking for popen - found
> >   -- Looking for fork
> >   -- Looking for fork - found
> >   -- Looking for vfork
> >   -- Looking for vfork - found
> >   -- Looking for fdopen
> >   -- Looking for fdopen - found
> >   -- Looking for strdup
> >   -- Looking for strdup - found
> >   -- Looking for getpwnam
> >   -- Looking for getpwnam - found
> >   -- Looking for select
> >   -- Looking for select - found
> >   -- Looking for sysconf
> >   -- Looking for sysconf - found
> >   -- Looking for system
> >   -- Looking for system - found
> >   -- Looking for srand48
> >   -- Looking for srand48 - found
> >   -- Looking for drand48
> >   -- Looking for drand48 - found
> >   -- Looking for sleep
> >   -- Looking for sleep - found
> >   -- Looking for gettimeofday
> >   -- Looking for gettimeofday - found
> >   -- Looking for clock_gettime in rt
> >   -- Looking for clock_gettime in rt - found
> >   -- Looking for include file float.h
> >   -- Looking for include file float.h - found
> >   -- Looking for include file sys/dir.h
> >   -- Looking for include file sys/dir.h - found
> >   -- Looking for include file sys/ndir.h
> >   -- Looking for include file sys/ndir.h - not found
> >   -- Looking for include file sys/stat.h
> >   -- Looking for include file sys/stat.h - found
> >   -- Looking for include file sys/types.h
> >   -- Looking for include file sys/types.h - found
> >   -- Looking for include file sys/wait.h
> >   -- Looking for include file sys/wait.h - found
> >   -- Looking for include file sys/time.h
> >   -- Looking for include file sys/time.h - found
> >   -- Looking for include file values.h
> >   -- Looking for include file values.h - found
> >   -- Looking for include file unistd.h
> >   -- Looking for include file unistd.h - found
> >   -- Looking for include file dirent.h
> >   -- Looking for include file dirent.h - found
> >   -- Looking for include file memory.h
> >   -- Looking for include file memory.h - found
> >   -- Looking for include file stdlib.h
> >   -- Looking for include file stdlib.h - found
> >   -- Looking for include file fcntl.h
> >   -- Looking for include file fcntl.h - found
> >   -- Looking for include file dlfcn.h
> >   -- Looking for include file dlfcn.h - found
> >   -- Looking for include file vfork.h
> >   -- Looking for include file vfork.h - not found
> >   -- Looking for include file inttypes.h
> >   -- Looking for include file inttypes.h - found
> >   -- Looking for include file string.h
> >   -- Looking for include file string.h - found
> >   -- Looking for include file strings.h
> >   -- Looking for include file strings.h - found
> >   -- Looking for include file pwd.h
> >   -- Looking for include file pwd.h - found
> >   -- Configuring done
> >   -- Generating done
> >   CMake Warning:
> >     Manually-specified variables were not used by the project:
> >       CMAKE_INSTALL_LOCALSTATEDIR
> >       CMAKE_INSTALL_SYSCONFDIR
> >   -- Build files have been written to: /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu
> >   make[1]: Leaving directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00'
> >      dh_auto_build
> >   	make -j1
> >   make[1]: Entering directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   /usr/bin/cmake -H/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00 -B/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu --check-build-system CMakeFiles/Makefile.cmake 0
> >   /usr/bin/cmake -E cmake_progress_start /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu/CMakeFiles /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu/CMakeFiles/progress.marks
> >   make -f CMakeFiles/Makefile2 all
> >   make[2]: Entering directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   make -f CMakeFiles/minc2_static.dir/build.make CMakeFiles/minc2_static.dir/depend
> >   make[3]: Entering directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   cd /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00 /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00 /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu/CMakeFiles/minc2_static.dir/DependInfo.cmake --color=
> >   Scanning dependencies of target minc2_static
> >   make[3]: Leaving directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   make -f CMakeFiles/minc2_static.dir/build.make CMakeFiles/minc2_static.dir/build
> >   make[3]: Entering directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   [  1%] Building C object CMakeFiles/minc2_static.dir/libsrc2/convert.c.o
> >   /usr/bin/cc  -DHAVE_CONFIG_H -DHAVE_MINC1=1 -DMINC2=1 -I/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00 -I/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu -I/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/libsrc2 -I/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/libsrc -I/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/volume_io/Include -I/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/ezminc -I/usr/include/nifti  -g -O2 -fdebug-prefix-map=/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2    -fPIC   -o CMakeFiles/minc2_static.dir/libsrc2/convert.c.o   -c /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/libsrc2/convert.c
> >   /home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/libsrc2/convert.c:13:18: fatal error: hdf5.h: No such file or directory
> >    #include <hdf5.h>
> >                     ^
> >   compilation terminated.
> >   CMakeFiles/minc2_static.dir/build.make:65: recipe for target 'CMakeFiles/minc2_static.dir/libsrc2/convert.c.o' failed
> >   make[3]: *** [CMakeFiles/minc2_static.dir/libsrc2/convert.c.o] Error 1
> >   make[3]: Leaving directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   CMakeFiles/Makefile2:70: recipe for target 'CMakeFiles/minc2_static.dir/all' failed
> >   make[2]: *** [CMakeFiles/minc2_static.dir/all] Error 2
> >   make[2]: Leaving directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   Makefile:163: recipe for target 'all' failed
> >   make[1]: *** [all] Error 2
> >   make[1]: Leaving directory '/home/lamby/temp/cdt.20160825112354.7wJltpfGDK.db.libminc/libminc-2.3.00/obj-x86_64-linux-gnu'
> >   dh_auto_build: make -j1 returned exit code 2
> >   debian/rules:14: recipe for target 'build' failed
> >   make: *** [build] Error 2
> >
> >   [..]
> >
> >The full build log is attached.
> >
> >
> >Regards,
> >
> 

> From 62c9f5569195d9f4955c6d6c5c7f5f5516670d61 Mon Sep 17 00:00:00 2001
> From: Ghislain Antony Vaillant <ghisvail at gmail.com>
> Date: Thu, 25 Aug 2016 13:21:42 +0100
> Subject: [PATCH 1/2] Discover HDF5 using system CMake.
> 
> ---
>  .../patches/Use-system-FindHDF5-CMake-module.patch | 114 +++++++++++++++++++++
>  debian/patches/series                              |   1 +
>  2 files changed, 115 insertions(+)
>  create mode 100644 debian/patches/Use-system-FindHDF5-CMake-module.patch
> 
> diff --git a/debian/patches/Use-system-FindHDF5-CMake-module.patch b/debian/patches/Use-system-FindHDF5-CMake-module.patch
> new file mode 100644
> index 0000000..5dd16f0
> --- /dev/null
> +++ b/debian/patches/Use-system-FindHDF5-CMake-module.patch
> @@ -0,0 +1,114 @@
> +From: Ghislain Antony Vaillant <ghisvail at gmail.com>
> +Date: Thu, 25 Aug 2016 13:20:22 +0100
> +Subject: Use system FindHDF5 CMake module.
> +
> +---
> + CMakeLists.txt               |  5 +--
> + cmake-modules/FindHDF5.cmake | 81 --------------------------------------------
> + 2 files changed, 3 insertions(+), 83 deletions(-)
> + delete mode 100644 cmake-modules/FindHDF5.cmake
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index df996ed..8eeb50b 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -59,9 +59,10 @@ IF(NOT LIBMINC_EXTERNALLY_CONFIGURED)
> + 
> +   # external packages
> +   FIND_PACKAGE(ZLIB REQUIRED)
> +-  FIND_PACKAGE(HDF5 REQUIRED)
> ++  FIND_PACKAGE(HDF5 COMPONENTS C REQUIRED)
> +   SET(HAVE_ZLIB ON)
> +-  set(HDF5_LIBRARY ${HDF5_C_LIBRARIES})
> ++  set(HDF5_LIBRARY ${HDF5_LIBRARIES})
> ++  set(HDF5_INCLUDE_DIR ${HDF5_INCLUDE_DIRS})
> + ELSE(NOT LIBMINC_EXTERNALLY_CONFIGURED)
> +   #TODO: set paths for HDF5 etc
> + ENDIF(NOT LIBMINC_EXTERNALLY_CONFIGURED)
> +diff --git a/cmake-modules/FindHDF5.cmake b/cmake-modules/FindHDF5.cmake
> +deleted file mode 100644
> +index 6de68d0..0000000
> +--- a/cmake-modules/FindHDF5.cmake
> ++++ /dev/null
> +@@ -1,81 +0,0 @@
> +-#
> +-# this module look for HDF5 (http://hdf.ncsa.uiuc.edu) support
> +-# it will define the following values
> +-#
> +-# HDF5_INCLUDE_DIR  = where hdf5.h can be found
> +-# HDF5_LIBRARY      = the library to link against (hdf5 etc)
> +-# HDF5_FOUND        = set to true after finding the library
> +-#
> +-
> +-IF(EXISTS ${PROJECT_CMAKE}/Hdf5Config.cmake)
> +-  INCLUDE(${PROJECT_CMAKE}/Hdf5Config.cmake)
> +-ENDIF(EXISTS ${PROJECT_CMAKE}/Hdf5Config.cmake)
> +-
> +-IF(Hdf5_INCLUDE_DIRS)
> +-
> +-  FIND_PATH(HDF5_INCLUDE_DIR hdf5.h ${Hdf5_INCLUDE_DIRS})
> +-  FIND_LIBRARY(HDF5_LIBRARY hdf5 ${Hdf5_LIBRARY_DIRS})
> +-
> +-ELSE(Hdf5_INCLUDE_DIRS)
> +-
> +-  SET(TRIAL_LIBRARY_PATHS
> +-    $ENV{HDF5_HOME}/lib
> +-    /usr/apps/lib
> +-    /usr/lib 
> +-    /usr/local/lib
> +-    /opt/lib
> +-    /sw/lib
> +-    )
> +-
> +-  SET(TRIAL_INCLUDE_PATHS
> +-    $ENV{HDF5_HOME}/include
> +-    /usr/apps/include
> +-    /usr/include
> +-    /opt/include
> +-    /usr/local/include
> +-    /sw/include
> +-    )
> +-
> +-  IF($ENV{HDF5_DIR} MATCHES "hdf")
> +-    MESSAGE(STATUS "Using environment variable HDF5_DIR.")
> +-    SET(TRIAL_LIBRARY_PATHS $ENV{HDF5_DIR}/lib ${TRIAL_LIBRARY_PATHS} )
> +-    SET(TRIAL_INCLUDE_PATHS $ENV{HDF5_DIR}/include ${TRIAL_INCLUDE_PATHS} )
> +-  ENDIF($ENV{HDF5_DIR} MATCHES "hdf")
> +-  
> +-  FIND_LIBRARY(HDF5_LIBRARY hdf5 ${TRIAL_LIBRARY_PATHS})
> +-  FIND_PATH(HDF5_INCLUDE_DIR hdf5.h ${TRIAL_INCLUDE_PATHS} )
> +-
> +-ENDIF(Hdf5_INCLUDE_DIRS)
> +-
> +-## -----------------------------------------------------------------------------
> +-## Assign status of the search
> +-
> +-IF(HDF5_INCLUDE_DIR AND HDF5_LIBRARY)
> +-  SET(HDF5_FOUND 1 CACHE BOOL "Found hdf5 library")
> +-ELSE(HDF5_INCLUDE_DIR AND HDF5_LIBRARY)
> +-  SET(HDF5_FOUND 0 CACHE BOOL "Not fount hdf5 library")
> +-ENDIF(HDF5_INCLUDE_DIR AND HDF5_LIBRARY)
> +-
> +-## -----------------------------------------------------------------------------
> +-## Feedback
> +-
> +-IF (HDF5_FOUND)
> +-  IF (NOT HDF5_FIND_QUIETLY)
> +-    MESSAGE (STATUS "Found components for HDF5")
> +-    MESSAGE (STATUS "HDF5 library : ${HDF5_LIBRARY}")
> +-    MESSAGE (STATUS "HDF5 headers : ${HDF5_INCLUDE_DIR}")
> +-  ENDIF (NOT HDF5_FIND_QUIETLY)
> +-ELSE (HDF5_FOUND)
> +-  IF (HDF5_FIND_REQUIRED)
> +-    MESSAGE (FATAL_ERROR "Could not find HDF5!")
> +-  ENDIF (HDF5_FIND_REQUIRED)
> +-ENDIF (HDF5_FOUND)
> +-
> +-## -----------------------------------------------------------------------------
> +-## Variables marked as advanced
> +-
> +-MARK_AS_ADVANCED(
> +-  HDF5_INCLUDE_DIR 
> +-  HDF5_LIBRARY 
> +-  HDF5_FOUND
> +-)
> diff --git a/debian/patches/series b/debian/patches/series
> index 2c4cdb9..bcf470e 100644
> --- a/debian/patches/series
> +++ b/debian/patches/series
> @@ -2,3 +2,4 @@ build-using-system-find-dot-cmake
>  fix-uselibminc-cmake
>  use-system-nifti
>  fix-endian-issues-label-data.patch
> +Use-system-FindHDF5-CMake-module.patch
> -- 
> 2.9.3
> 


-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list