#2235: ExternalLibraries/HDF5 fails to correctly set up include paths when auto-detecting library
Reporter:Roland Haas
Status:open
Milestone:
Version:
Type:bug
Priority:minor
Component:Cactus

Changes (by Roland Haas):

The current HDF5 ExternalLibaries detect.sh script does not correctly set HDF5_INC_PATH and HDF5_LIB_PATH on OSX Mojave using Hombrew and gcc-8.

This is the result of multiple issues:

  1. Homebrew does not provide a pkg-config file for HDF5: https://github.com/Homebrew/homebrew-core/issues/28826
  2. 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
  3. we hard-code the list of "system" include paths (and library paths) in Cactus/lib/sbin/strip-incdirs.sh

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.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2235/externallibraries-hdf5-fails-to-correctly