diff options
-rw-r--r-- | var/spack/repos/builtin/packages/hdf5/h5public-skip-mpicxx.patch | 11 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/hdf5/package.py | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/h5public-skip-mpicxx.patch b/var/spack/repos/builtin/packages/hdf5/h5public-skip-mpicxx.patch new file mode 100644 index 0000000000..d609345527 --- /dev/null +++ b/var/spack/repos/builtin/packages/hdf5/h5public-skip-mpicxx.patch @@ -0,0 +1,11 @@ +--- a/src/H5public.h 2019-08-28 18:51:39.393781356 -0400 ++++ b/src/H5public.h 2019-08-28 20:59:50.315181711 -0400 +@@ -57,6 +57,8 @@ + # include <stddef.h> + #endif + #ifdef H5_HAVE_PARALLEL ++# define MPICH_SKIP_MPICXX 1 ++# define OMPI_SKIP_MPICXX 1 + # include <mpi.h> + #ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ + # include <mpio.h> diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 1e83dc8335..6c482e8a3f 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -111,6 +111,11 @@ class Hdf5(AutotoolsPackage): sha256='57cee5ff1992b4098eda079815c36fc2da9b10e00a9056df054f2384c4fc7523', when='@1.10.2%gcc@8:') + # Disable MPI C++ interface when C++ is disabled, otherwise downstream + # libraries fail to link; see https://github.com/spack/spack/issues/12586 + patch('h5public-skip-mpicxx.patch', when='+mpi~cxx', + sha256='b61e2f058964ad85be6ee5ecea10080bf79e73f83ff88d1fa4b602d00209da9c') + filter_compiler_wrappers('h5cc', 'h5c++', 'h5fc', relative_root='bin') def url_for_version(self, version): |