<p>This is how Homebrew builds Armadillo with HDF5 support:</p>

<pre><code>cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/armadillo/4.600.2 -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DDETECT_HDF5=ON
</code></pre>

<p>so we do use <code>-DDETECT_HDF5=ON</code>. The log suggests that the HDF5 lib is correctly detected:</p>

<pre><code>-- HDF5_FOUND = TRUE
-- Set ARMA_HDF5_INCLUDE_DIR to /usr/local/include
...
-- *** ARMA_LIBS = -framework Accelerate;/usr/local/lib/libhdf5.dylib;/usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib;/usr/local/lib/libarpack.dylib
</code></pre>

<p>The Armadillo dynamic lib also indicates that it is correctly linked against the HDF5 lib:</p>

<pre><code>$ otool -L /usr/local/Cellar/armadillo/4.600.2/lib/libarmadillo.dylib
/usr/local/Cellar/armadillo/4.600.2/lib/libarmadillo.dylib:
    /usr/local/lib/libarmadillo.4.dylib (compatibility version 4.0.0, current version 4.60.2)
    /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0)
    /usr/local/lib/libhdf5.9.dylib (compatibility version 10.0.0, current version 10.0.0)
    /usr/local/lib/libsz.2.dylib (compatibility version 3.0.0, current version 3.0.0)
    /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
    /usr/local/opt/arpack/libexec/lib/libarpack.2.dylib (compatibility version 3.0.0, current version 3.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
</code></pre>

<p>So as far as I can tell, Armadillo is built correctly against HDF5. But every time I build MLPack and run the tests I get</p>

<pre><code>[WARN ] Cannot determine type of file 'noextension'; no extension is present.  Load failed.
[WARN ] No extension given with filename 'noextension'; type unknown.  Save failed.
[WARN ] Cannot open file 'nonexistentfile_______________.csv'; load failed.
[WARN ] Loading 'test_file.bin' as raw binary formatted data; but this may not be the actual filetype!
Mat::load(): unsupported file type
Mat::load(): couldn't load from the given stream
[WARN ] Loading from 'test_file.h5' failed.
/tmp/mlpack-iTRtWh/mlpack-mlpack-1.0.12/src/mlpack/tests/load_save_test.cpp:411: fatal error in "LoadHDF5Test": critical check data::Load("test_file.h5", test) == true failed
[WARN ] Save to 'test_file.h5' failed.
/tmp/mlpack-iTRtWh/mlpack-mlpack-1.0.12/src/mlpack/tests/load_save_test.cpp:459: fatal error in "SaveHDF5Test": critical check data::Save("test_file.h5", test) == true failed
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/mlpack/mlpack/issues/403#issuecomment-77245513">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AJ4bFJUua1svb77NWILxDFJhs4h3PgHJks5nx2ksgaJpZM4DfUCf.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/mlpack/mlpack/issues/403#issuecomment-77245513"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>