I’m building ParaView from source on a current Arch Linux. During build, MPI is found just fine, but calling find_library(ParaView)
results in error
-- Could NOT find MPI_CXX (missing: MPI_CXX_WORKS)
CMake Error at /usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find MPI (missing: MPI_C_FOUND MPI_CXX_FOUND)
Call Stack (most recent call first):
/usr/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
/home/lhofmann/Libraries/paraview/ParaView-v5.9.1/lib/cmake/paraview-5.9/vtk/vtkm/cmake/FindMPI.cmake:1705 (find_package_handle_standard_args)
/home/lhofmann/Libraries/paraview/ParaView-v5.9.1/lib/cmake/paraview-5.9/vtk/vtkm/cmake/VTKmWrappers.cmake:18 (find_package)
/home/lhofmann/Libraries/paraview/ParaView-v5.9.1/lib/cmake/paraview-5.9/vtk/vtkm/VTKmConfig.cmake:149 (include)
/home/lhofmann/Libraries/paraview/ParaView-v5.9.1/lib/cmake/paraview-5.9/vtk/vtk-config.cmake:124 (find_package)
/home/lhofmann/Libraries/paraview/ParaView-v5.9.1/lib/cmake/paraview-5.9/paraview-config.cmake:53 (find_package)
CMakeLists.txt:108 (find_package)
ParaView v5.8.0 works just fine, when built with exact same configuration. Even if I copy FindMPI.cmake
from v5.8.0 to v5.9.1 it still fails.
I have found two workarounds:
- call
find_library(MPI)
beforefind_library(ParaView)
- delete
lib/cmake/paraview-5.9/vtk/vtkm/cmake/FindMPI.cmake
I’m not really sure if this is a problem with my system or a bug.
My cmake config is as follows:
cmake "../ParaView-${paraview_version}-src" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=../ParaView-${paraview_version} \
-DPARAVIEW_ENABLE_FFMPEG=ON \
-DPARAVIEW_ENABLE_GDAL=ON \
-DPARAVIEW_ENABLE_MOTIONFX=ON \
-DPARAVIEW_ENABLE_PDAL=ON \
-DPARAVIEW_ENABLE_VISITBRIDGE=ON \
-DPARAVIEW_ENABLE_XDMF3=ON \
-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON \
-DPARAVIEW_USE_MPI=ON \
-DPARAVIEW_USE_PYTHON=ON \
-DPARAVIEW_USE_RAYTRACING=OFF \
-DPARAVIEW_BUILD_WITH_EXTERNAL=ON \
-DVTK_MODULE_USE_EXTERNAL_VTK_gl2ps=OFF \
-DVTK_MODULE_USE_EXTERNAL_VTK_libharu=OFF \
-DVTK_SMP_IMPLEMENTATION_TYPE=TBB \
-DVTKm_ENABLE_MPI=ON \
-DVTK_MODULE_ENABLE_VTK_IOGDAL=YES \
-DVTK_MODULE_ENABLE_VTK_IOPDAL=YES \
-DCMAKE_C_FLAGS="-DH5_USE_110_API" \
-DCMAKE_CXX_FLAGS="-DH5_USE_110_API" \
-DVTK_MODULE_USE_EXTERNAL_VTK_pegtl=OFF \
-GNinja
cmake --build . --target install