and fails:
CMake Error at /ascldap/users/tesari/local/cmake/3.14.4/share/cmake-3.14/Modules/FindBoost.cmake:1148 (message): When requesting a specific version of Boost, you must provide at least the major and minor version numbers, e.g., 1.34
Hmm. It seems that our version extraction failed when compiling VTK itself. "@Boost_MAJOR_VERSION@.@Boost_MINOR_VERSION@.@Boost_SUBMINOR_VERSION@" should be configured to get the version number. If you log what’s going on with _vtk_find_package_version in vtkModule.cmake when configuring VTK around line 3600, what do you see?
I don’t think line 3600 is exact (it depends on what version of the file you’re looking at). There’s logic around there that sets the _vtk_find_package_version variable:
string(FIND "${_vtk_find_package_VERSION_VAR}" "@" _vtk_find_package_idx)
if (_vtk_find_package_idx EQUAL -1)
if (NOT DEFINED "${_vtk_find_package_VERSION_VAR}")
message(FATAL_ERROR
"The `${_vtk_find_package_VERSION_VAR}` variable is not defined.")
endif ()
set(_vtk_find_package_version "${${_vtk_find_package_VERSION_VAR}}")
else ()
string(CONFIGURE "${_vtk_find_package_VERSION_VAR}" _vtk_find_package_version)
endif ()
message(FATAL_ERROR ...) # add this line
I moved message(FATAL_ERROR ...)
where you pointed, no difference. Configuration is successful, with no interruption and no error messages. As to the configuration failure of the release branch, shall I open a separate ticket?
I was using the system version of Boost, I think 1.40. I build a
custom version, 1.70.0, and rebuild paraview from scratch. Now
configuration failed at the message(FATAL_ERROR) with _vtk_find_package_version = 2.7.16. Below is
the error related to VTK-vtk-module-find-packages:
-- Found Boost 1.70.0 at
/ascldap/users/tesari/local/boost_1_70_0/lib/cmake/Boost-1.70.0
-- Requested configuration: QUIET REQUIRED COMPONENTS
system;filesystem;python
-- Found boost_headers 1.70.0 at
/ascldap/users/tesari/local/boost_1_70_0/lib/cmake/boost_headers-1.70.0
-- Found boost_system 1.70.0 at
/ascldap/users/tesari/local/boost_1_70_0/lib/cmake/boost_system-1.70.0
-- Boost toolset is unknown (compiler 3.8)
-- libboost_system.so.1.70.0
-- Adding boost_system dependencies: headers
-- Found boost_filesystem 1.70.0 at
/ascldap/users/tesari/local/boost_1_70_0/lib/cmake/boost_filesystem-1.70.0
-- Boost toolset is unknown (compiler 3.8)
-- libboost_filesystem.so.1.70.0
-- Adding boost_filesystem dependencies: headers
-- Found boost_python 1.70.0 at
/ascldap/users/tesari/local/boost_1_70_0/lib/cmake/boost_python-1.70.0
-- Boost toolset is unknown (compiler 3.8)
-- libboost_python27.so.1.70.0
-- Adding boost_python dependencies: headers
-- Boost found.
-- Found Boost components:
system;filesystem;python
-- Boost_FOUND = 1
-- Boost_INCLUDE_DIRS =
/ascldap/users/tesari/local/boost_1_70_0/include
-- Boost_LIBRARY_DIRS =
/ascldap/users/tesari/local/boost_1_70_0/lib
-- Boost_LIBRARIES =
-- Boost_VERSION = 1.70.0
-- Boost_LIB_VERSION =
-- Boost_MAJOR_VERSION =
-- Boost_MINOR_VERSION =
-- Boost_SUBMINOR_VERSION=
-- Boost_VERSION_STRING =
-- Boost_LIBRARY_DIR=/ascldap/users/tesari/local/boost_1_70_0/lib
PACKAGE_PREFIX_DIR=
CATALYST_ROOT=/ascldap/users/tesari/projects/paraview/build
CMake Error at
/ascldap/users/tesari/local/cmake/3.14.4/share/cmake-3.14/Modules/FindBoost.cmake:1148
(message):
When requesting a specific version of Boost, you must provide at
least the
major and minor version numbers, e.g., 1.34
Call Stack (most recent call first):
/ascldap/users/tesari/projects/paraview/build/lib64/cmake/paraview-5.6/vtk/VTK-vtk-module-find-packages.cmake:360
(find_package)
/ascldap/users/tesari/projects/paraview/build/lib64/cmake/paraview-5.6/vtk/vtk-config.cmake:115
(include)
/ascldap/users/tesari/projects/paraview/build/lib64/cmake/paraview-5.6/paraview-config.cmake:41
(find_package)
/ascldap/users/tesari/projects/paraview/build/paraview-config.cmake:1
(include)
CMakeLists.txt:360 (find_package)
CMake Error at
/ascldap/users/tesari/local/cmake/3.14.4/share/cmake-3.14/Modules/FindBoost.cmake:2155
(message):
Unable to find the requested Boost libraries.
Boost version: 1.70.0
Boost include path:
/ascldap/users/tesari/local/boost_1_70_0/include
Detected version of Boost is too new. Requested version was
0.0.
Call Stack (most recent call first):
/ascldap/users/tesari/projects/paraview/build/lib64/cmake/paraview-5.6/vtk/VTK-vtk-module-find-packages.cmake:360
(find_package)
/ascldap/users/tesari/projects/paraview/build/lib64/cmake/paraview-5.6/vtk/vtk-config.cmake:115
(include)
/ascldap/users/tesari/projects/paraview/build/lib64/cmake/paraview-5.6/paraview-config.cmake:41
(find_package)
/ascldap/users/tesari/projects/paraview/build/paraview-config.cmake:1
(include)
CMakeLists.txt:360 (find_package)
-- Could not find the VTK package due to a missing dependency:
Boost
CMake Error at CMakeLists.txt:360 (find_package):
Found package configuration file:
/ascldap/users/tesari/projects/paraview/build/paraview-config.cmake
but it set ParaView_FOUND to FALSE so package "ParaView" is
considered to
be NOT FOUND. Reason given by package:
Could not find the ParaView package with the following required
components:
vtkPVPythonCatalyst.
-- Configuring incomplete, errors occurred!
Hmm. If you change the instances of VERSION_VAR "@Boost_…" in the following files:
Infovis/Boost/CMakeLists.txt
Infovis/BoostGraphAlgorithms/CMakeLists.txt
ThirdParty/xdmf3/vtkxdmf3/core/CMakeLists.txt
with VERSION_VAR Boost_VERSION, and then rebuild ParaView, does that solve the issue? We may need to do some different logic for different versions of FindBoost here.
and rebuilt paraview. Now configuration pass VTK-vtk-module-find-packages,
but fail with ‘Could not find …
vtkPVPythonCatalyst’.
vtkPVPythonCatalyst is
present under …/build/lib64/python2.7/site-packages/paraview/module,
and have it LD_LIBRARY_PATH and PYTHONPATH (see below).
I suspect you forgot to paste the information you mention. However, find_package doesn’t care about LD_LIBRARY_PATH or PYTHONPATH anyways. There should be more information in the error message that it couldn’t find the component. The actual issue here is that the component is called PythonCatalyst (the vtkPV is just a library name differentiator; it shows up in CMake as ParaView::PythonCatalyst which is where the component name comes from).
I have some issue building my code, e.g. “Cannot
find vtkNew.h” . When I use a Catalyst build, I have
something like:
find_package(ParaView 5.6 NO_PACKAGE_ROOT_PATH
REQUIRED COMPONENTS vtkPVPythonCatalyst)
include("${PARAVIEW_USE_FILE}")
When building the code with Paraview, there is no ${PARAVIEW_USE_FILE}. Is
there ${ParaView_INCLUDE_DIR }?
Where can I look what variables are set by find_package(ParaView)?
So I downloaded 1.70.0 from boost.org and built/installed it. Using CMake 3.14.4, VTK got find_package(Boost) set up properly in the VTK-vtk-module-find-packages.cmake file, so debugging to figure out why the Boost_MAJOR_VERSION and related variables are not defined in your case would be required, but I can’t reproduce myself it here with the information available here.
When building the code with Paraview, there is no ${PARAVIEW_USE_FILE}.
This is no longer a thing. ParaView is ready-to-use right after find_package now. It is also consumed by targets now, so ParaView_INCLUDE_DIR isn’t necessary anymore. Instead, just link to ParaView::Catalyst or whichever targets you’d like to use (vtk_module_autoinit may be required for some usecases). The list of available variables can be found at the top of paraview-config.cmake: https://gitlab.kitware.com/paraview/paraview/blob/master/CMake/paraview-config.cmake.in
Uh, that could certainly be a problem. I also see -- Boost found. there which is a Boost found without a version number. I suspect something is quite wrong with your Boost install(s). Make sure that all Boost variables in the cache for ParaView and your project are consistently using a single Boost version.