Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FindHDF5 module fails on Debian Stretch #71

Open
cfhammill opened this issue Apr 27, 2016 · 17 comments
Open

FindHDF5 module fails on Debian Stretch #71

cfhammill opened this issue Apr 27, 2016 · 17 comments

Comments

@cfhammill
Copy link
Contributor

cfhammill commented Apr 27, 2016

I'm trying to build libminc on debian stretch and it is failing. The FindHDF5 module does not look in the right places to find hdf5 installed through apt.

The serial include and lib directories for 64 bit install are:
/usr/include/hdf5/serial
/usr/lib/x86_64-linux-gnu/hdf5/serial

The cmake module FindHDF5 provided by kitware (https://github.com/Kitware/CMake/blob/master/Modules/FindHDF5.cmake) is able to find it by using the compiler wrappers h5cc/h5pcc, but seems to require SelectLibraryConfigurations.cmake and FindPackageHandleStandardArgs.cmake and their dependencies.

cfhammill added a commit to cfhammill/libminc that referenced this issue Apr 27, 2016
cfhammill added a commit to cfhammill/libminc that referenced this issue May 2, 2016
cfhammill added a commit to cfhammill/libminc that referenced this issue May 2, 2016
vfonov added a commit that referenced this issue May 2, 2016
Unsatisfying solution to issue #71
@ghisvail
Copy link

ghisvail commented Sep 2, 2016

Considering that HDF5 detection is provided by CMake via their own FindHDF5.cmake, the embedded version should probably be dropped now.

That's the fix we will be likely to go for in Debian.

@vfonov
Copy link
Member

vfonov commented Sep 2, 2016

Well, looks like FindHDF5 is not quite working: https://travis-ci.org/BIC-MNI/libminc/jobs/157120684

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

s/HDF5_INCLUDE_DIR/HDF5_INCLUDE_DIRS

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

HDF5_INCLUDE_DIR is broken and deprecated anyway.

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

You have it used in different files though:

https://github.com/BIC-MNI/libminc/search?utf8=%E2%9C%93&q=HDF5_INCLUDE_DIR

So you might want to use a stub like this set(HDF5_INCLUDE_DIR ${HDF5_INCLUDE_DIRS}).

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

Your call.

@vfonov
Copy link
Member

vfonov commented Sep 2, 2016

Contents of FindHDF5 in Cmake :

This module will define the following variables:

...

HDF5_INCLUDE_DIR - Location of the hdf5 includes (deprecated)

'''

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

I know, I am just saying telling it is currently broken. I recently had to fix a bunch of Debian packages which were relying on HDF5_INCLUDE_DIR and started to FTBFS with CMake 3.6.

The most important word in your quote remains deprecated.

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

Commit d641c4f should have fixed it.

@vfonov
Copy link
Member

vfonov commented Sep 2, 2016

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

The error is explicit enough.

CMake Error at CMakeLists.txt:25 (CMAKE_MINIMUM_REQUIRED):

  CMake 3.0 or higher is required.  You are running version 2.8.7

-- Configuring incomplete, errors occurred!

@vfonov
Copy link
Member

vfonov commented Sep 2, 2016

because they don't have modern cmake, that includes FindHDF5

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

They should, CMake 2.8.7 has a FindHDF5 module.

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

FYI, HDF5_INCLUDE_DIRS is available since CMake 2.8.1.

@ghisvail
Copy link

ghisvail commented Sep 2, 2016

Looks like it worked in the end:

https://travis-ci.org/BIC-MNI/libminc/builds/157162205

@gdevenyi
Copy link
Contributor

gdevenyi commented Sep 8, 2016

Hi,

This snippet I patched into ANTs' travis config will get an up-to-date cmake

https://github.com/stnava/ANTs/blob/master/.travis.yml#L18-L22

vfonov added a commit to BIC-MNI/minc-toolkit-v2 that referenced this issue Sep 8, 2016
@shai-ikko
Copy link
Contributor

(Debian Stretch is not very relevant anymore; I don't know if the commits merged finally fixed this issue on Stretch, but there seems to be no problem to build MINC on a modern Debian-based distro)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants