tbeu / matio

MATLAB MAT File I/O Library
https://matio.sourceforge.io
BSD 2-Clause "Simplified" License
334 stars 97 forks source link

Can't get HDF5 to work #80

Closed donkahlero closed 6 years ago

donkahlero commented 6 years ago

Hello together. I have an issue w/ getting HDF5 support to work and would be happy for some help in that regard.

As of the HDF5 install itself, I followed the regular instructions on their webpage, resulting in an installation in /opt:

taco@Tuxedo ~ $ ls /opt/HDF_Group/HDF5/1.10.1 
bin  include  lib  share

I ran configure like this (with various variants): ./configure --with-default-api-version=v110 --enable-mat73=yes --with-hdf5=/opt/HDF_Group/HDF5/1.10.1/

But I always end up like this:

   MATIO Configuration Summary       
==============================================================
           C Compiler: gcc
               CFLAGS:  -g -O2
     Shared Libraries: yes
     Static Libraries: yes
  default MAT version: MAT_FT_MAT5

Features --------------------------------------------
  MAT v7.3 file support: no
Extended sparse support: yes

Packages --------------------------------------------
                 zlib: -lz
                 hdf5: 
               MATLAB: /usr/local/bin/matlab

What am I doing wrong here? Cheers!

tbeu commented 6 years ago

Hm, it works for my cases. You may want to have a look at the .travis.yaml in the repo to check how I do it for Travis CI.

donkahlero commented 6 years ago

Alright! I figured it out. Just for anyone else that faces the same issue:

Create some temp folder (e.g. ~/tmp) Clone zlib; configure it; install it (as in the stated travis yml). For installing I used /opt/zlib

git clone --depth 5 https://github.com/madler/zlib
cd zlib
sudo mkdir -p /opt/zlib
./configure ./configure --prefix=/opt/zlib --eprefix=/opt/zlib
sudo make install

Then just as described in .install_hdf5_1_10.sh:

git clone --branch hdf5_1_10_1 https://git.hdfgroup.org/scm/hdffv/hdf5.git hdf5_1_10_1
cd hdf5_1_10_1                                                                   
./configure --quiet --enable-shared --enable-build-mode=debug --disable-deprecated-symbols --disable-hl --disable-strict-format-checks --disable-memory-alloc-sanity-check --disable-instrument --disable-parallel --disable-trace --disable-internal-debug --enable-optimization=debug --disable-asserts --with-pic --with-default-api-version=v110 --with-zlib=/opt/zlib CFLAGS="-w"
make install -C src
sudo mv ./hdf5 /opt/

And then the usual installation suff with ./configure --with-default-api-version=v110 --enable-mat73=yes --with-hdf5=/opt/hdf5/ --with-zlib=/opt/zlib

Thanks! :)