<html>#2235: ExternalLibraries/HDF5 fails to correctly set up include paths when auto-detecting library
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'>   Status:</td><td>open</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'>  Version:</td><td></td></tr>
<tr><td style='text-align:right'>     Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Cactus</td></tr>
</table>

<p>Changes (by Roland Haas):</p>
<p>The current HDF5 ExternalLibaries detect.sh script does not correctly set <code>HDF5_INC_PATH</code> and <code>HDF5_LIB_PATH</code> on OSX Mojave using Hombrew and gcc-8.</p>
<p>This is the result of multiple issues:</p>
<ol>
<li>Homebrew does not provide a pkg-config file for HDF5: <a href="https://github.com/Homebrew/homebrew-core/issues/28826" rel="nofollow" class="ap-connect-link">https://github.com/Homebrew/homebrew-core/issues/28826</a></li>
<li>gcc-8 from Homebrew on Mojave does not by default look in /usr/local/include for include files (see the output of <code>gcc-8 -xc -E -v /dev/null</code>), <a data-is-external-link="true" href="https://github.com/Homebrew/homebrew-core/issues/35181" rel="nofollow">https://github.com/Homebrew/homebrew-core/issues/35181</a></li>
<li>we hard-code the list of "system" include paths (and library paths) in <code>Cactus/lib/sbin/strip-incdirs.sh</code></li>
</ol>
<p>This is an issue when using <code>generic.cfg</code> only, the (hand-crafted) <code>osx-homebrew.cfg</code> works around this issue like so:</p>
<div class="codehilite"><pre><span></span># We need to explicitly set HDF5_INC_DIRS and HDF5_LIB_DIRS explicitly
# to prevent the configure scripts from stripping them. We also then
# need to set HDF5_LIBS manually.
HDF5_DIR  = /usr/local
HDF5_INC_DIRS  = /usr/local/include
HDF5_LIB_DIRS  = /usr/local/lib
HDF5_LIBS = hdf5hl_fortran hdf5_fortran hdf5_hl hdf5
</pre></div>


<p>indicating that the issue existed before.</p>
<p>MacPorts is not affected b/c it stores its include files in /opt/local which is not stripped out.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2235/externallibraries-hdf5-fails-to-correctly'>https://bitbucket.org/einsteintoolkit/tickets/issues/2235/externallibraries-hdf5-fails-to-correctly</a></p>
</html>