libvtkIOAMR.so fails to build with MPI version of HDF5
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
In my Fedora builds of paraview 5.1.2, I'm finally properly building against the MPI version of HDF5 to fix a compile error with Xdmf2 when I didn't. However, this is leading to a build failure of libvtkIOAMR.so:
/usr/bin/g++ -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -O2 -g -DNDEBUG -Wl,--no-undefined -lc -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -shared -Wl,-soname,libvtkIOAMR.so.1 -o ../../../lib/libvtkIOAMR.so.1 CMakeFiles/vtkIOAMR.dir/vtkAMRDataSetCache.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMRBaseParticlesReader.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMRBaseReader.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMREnzoReader.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMREnzoReaderInternal.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMRFlashParticlesReader.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMRFlashReader.cxx.o CMakeFiles/vtkIOAMR.dir/vtkAMRFlashReaderInternal.cxx.o ../../../lib/libvtkFiltersAMR.so.1 ../../../lib/libvtkParallelCore.so.1 /usr/lib64/openmpi/lib/libhdf5.so -lz -ldl -lm /usr/lib64/openmpi/lib/libhdf5_hl.so ../../../lib/libvtkIOLegacy.so.1 ../../../lib/libvtkIOCore.so.1 ../../../lib/libvtkFiltersGeneral.so.1 ../../../lib/libvtkCommonComputationalGeometry.so.1 ../../../lib/libvtkFiltersCore.so.1 ../../../lib/libvtkCommonExecutionModel.so.1 ../../../lib/libvtkCommonDataModel.so.1 ../../../lib/libvtkCommonMisc.so.1 ../../../lib/libvtkCommonSystem.so.1 ../../../lib/libvtksys.so.1 -ldl ../../../lib/libvtkCommonTransforms.so.1 ../../../lib/libvtkCommonMath.so.1 ../../../lib/libvtkCommonCore.so.1 -Wl,-rpath,/builddir/build/BUILD/ParaView-v5.1.2/fedora-openmpi/lib:/usr/lib64/openmpi/lib:
CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function `MPI::Win::Set_name(char const*)':
/usr/include/openmpi-x86_64/openmpi/ompi/mpi/cxx/win_inln.h:293: undefined reference to `MPI_Win_set_name'
CMakeFiles/vtkIOAMR.dir/vtkAMREnzoParticlesReader.cxx.o: In function `MPI::Win::Set_attr(int, void const*)':
/usr/include/openmpi-x86_64/openmpi/ompi/mpi/cxx/win_inln.h:286: undefined reference to `MPI_Win_set_attr'
and lots more. It looks like anything that builds against hdf5 in MPI mode will need to link against the MPI libraries as well. This is what the vtkxdmf2 module appears to do.