The current HDF5 ExternalLibaries detect.sh script does not correctly set
HDF5_LIB_PATH on OSX Mojave using Hombrew and gcc-8.
This is the result of multiple issues:
- Homebrew does not provide a pkg-config file for HDF5: https://github.com/Homebrew/homebrew-core/issues/28826
- gcc-8 from Homebrew on Mojave does not by default look in /usr/local/include for include files (see the output of
gcc-8 -xc -E -v /dev/null), https://github.com/Homebrew/homebrew-core/issues/35181
- we hard-code the list of "system" include paths (and library paths) in
This is an issue when using
generic.cfg only, the (hand-crafted)
osx-homebrew.cfg works around this issue like so:
# 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
indicating that the issue existed before.
MacPorts is not affected b/c it stores its include files in /opt/local which is not stripped out.