paraview-config issue with CMake v3.23
When I build ParaView (either straight from this repository or using the superbuild) using CMake v3.23, the created paraview-config
script seems to fail with errors although the configuration and build completes with no issues.
For example, here are the steps I used with the superbuild for a GitHub action on the Ubuntu 20.04 GitHub runner (which used CMake v3.23.0 at the time of the run). The relevant CMake options are:
-GNinja \
-DPARAVIEW_BUILD_EDITION=CATALYST_RENDERING \
-DENABLE_osmesa=ON \
-DUSE_SYSTEM_osmesa=ON \
-DENABLE_python3=ON \
-DUSE_SYSTEM_python3=ON \
-DENABLE_mpi=ON \
-DUSE_SYSTEM_mpi=ON \
-DENABLE_llvm=ON \
-DUSE_SYSTEM_llvm=ON \
-Dparaview_SOURCE_SELECTION=5.10.1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
and the error messages I got from the command (in this run)
./paraview-config --cppflags -c PythonCatalyst
are
CMake Error at /home/runner/work/paraview-build/paraview-build/build/install/lib/cmake/paraview-5.10/vtk/VTK-targets.cmake:485 (set_target_properties):
The link interface of target "VTK::mpi" contains:
MPI::MPI_C
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
/home/runner/work/paraview-build/paraview-build/build/install/lib/cmake/paraview-5.10/vtk/vtk-config.cmake:138 (include)
/home/runner/work/paraview-build/paraview-build/build/install/lib/cmake/paraview-5.10/paraview-config.cmake:66 (find_package)
CMakeLists.txt:5 (find_package)
CMake Error at /home/runner/work/paraview-build/paraview-build/build/install/lib/cmake/paraview-5.10/vtk/VTK-targets.cmake:583 (set_target_properties):
The link interface of target "VTK::opengl" contains:
OSMesa::OSMesa
but the target was not found. Possible reasons include:
* There is a typo in the target name.
* A find_package call is missing for an IMPORTED target.
* An ALIAS target is missing.
Call Stack (most recent call first):
/home/runner/work/paraview-build/paraview-build/build/install/lib/cmake/paraview-5.10/vtk/vtk-config.cmake:138 (include)
/home/runner/work/paraview-build/paraview-build/build/install/lib/cmake/paraview-5.10/paraview-config.cmake:66 (find_package)
CMakeLists.txt:5 (find_package)
CMake Generate step failed. Build files cannot be regenerated correctly.
Traceback (most recent call last):
File "./paraview-config", line 267, in <module>
extract_paraview_flags(opts.components, cmake=opts.cmake,
File "./paraview-config", line 165, in extract_paraview_flags
subprocess.check_call(configure_cmd, cwd=builddir,
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '-GUnix Makefiles', '/tmp/tmptlbajkm6/src', '-DCMAKE_PREFIX_PATH:STRING=/home/runner/work/paraview-build/paraview-build/build/install']' returned non-zero exit status 1.
Manually installing CMake v3.21.6 (like this) resolves the issue (see this run).
I have also been able to reproduce this from a normal (i.e. non-superbuild) build on a SLES 12 system (with relevant packages built by Spack) and CMake v3.23.0 with the following build options
-GNinja \
-DPARAVIEW_BUILD_EDITION=CATALYST_RENDERING \
-DVTK_USE_X=OFF \
-DVTK_OPENGL_HAS_OSMESA=ON \
-DPARAVIEW_USE_PYTHON=ON \
-DPARAVIEW_USE_MPI=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DVTK_SMP_IMPLEMENTATION_TYPE=OpenMP
Have I missed something obvious or has something in CMake v3.23 broken this script?