error: conflicting types for ‘MPI_Comm’
While trying to build Paraview 5.7.0 for Fedora, I get the following error building the openmpi version:
In file included from /builddir/build/BUILD/ParaView-v5.7.0/VTK/ThirdParty/h5part/vtkh5part/src/H5Part.h:15, from /builddir/build/BUILD/ParaView-v5.7.0/VTK/ThirdParty/h5part/vtkh5part/src/H5Block.c:59: /builddir/build/BUILD/ParaView-v5.7.0/VTK/ThirdParty/h5part/vtkh5part/src/H5PartTypes.h:23:24: error: conflicting types for ‘MPI_Comm’ 23 | typedef unsigned long MPI_Comm; | ^~~~~~~~ In file included from /usr/include/openmpi-x86_64/H5public.h:60, from /usr/include/openmpi-x86_64/hdf5.h:22, from /builddir/build/BUILD/ParaView-v5.7.0/VTK/ThirdParty/h5part/vtkh5part/src/H5Block.c:58: /usr/include/openmpi-x86_64/mpi.h:400:37: note: previous declaration of ‘MPI_Comm’ was here 400 | typedef struct ompi_communicator_t *MPI_Comm; | ^~~~~~~~
Looking at the H5PartTypes.h code:
#ifndef PARALLEL_IO typedef unsigned long MPI_Comm; #endif
It appears like PARALLEL_IO should be defined when building an MPI version of h5part, but I don't see any internal mechanism to define this.