Gentoo is applying hdf5-1.8.9-mpicxx.patch: --- a/src/H5public.h +++ b/src/H5public.h @@ -58,6 +58,8 @@ # include <stddef.h> #endif #ifdef H5_HAVE_PARALLEL +# define OMPI_SKIP_MPICXX /* Make sure that cxx specific headers are not included */ +# define MPICH_SKIP_MPICXX # include <mpi.h> #ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ # include <mpio.h> This causes warnings if one has already defined OMPI_SKIP_MPICXX (or presumably MPICH_SKIP_MPICXX): /home/supernova/wthrowe/gentoo/usr/include/H5public.h:61:12: warning: 'OMPI_SKIP_MPICXX' macro redefined [-Wmacro-redefined] # define OMPI_SKIP_MPICXX /* Make sure that cxx specific headers are not included */ ^ <command line>:1:9: note: previous definition is here #define OMPI_SKIP_MPICXX 1 ^ 1 warning generated. (Some of our source files use OpenMPI without using HDF5, so we can't just rely on the HDF5 headers to define this macro.) The patch should only define these macros if they are not already defined. Something like: # include <stddef.h> #endif #ifdef H5_HAVE_PARALLEL +# ifndef OMPI_SKIP_MPICXX +# define OMPI_SKIP_MPICXX /* Make sure that cxx specific headers are not included */ +# endif +# ifndef MPICH_SKIP_MPICXX +# define MPICH_SKIP_MPICXX +# endif # include <mpi.h> #ifndef MPI_FILE_NULL /*MPIO may be defined in mpi.h already */ # include <mpio.h>
This patch was introduced with bug 420777.