After sucessfully (?) setting things up with cmake, I get an error when i try to ninja-build. The error is:
ninja: error: ‘vtkm::tbb-NOTFOUND’, needed by ‘lib/libvtkm_cont-pv5.9.so.1’, missing and no known rule to make it
More details below. I would really appreciate some help. I have been looking around for a solution for quite some time now, but I am at a loss for how to solve this.
gfield@gfield-desktop:/usr/local/src/paraview-build$ sudo cmake -GNinja -DPARAVIEW_USE_PYTHON=ON -DPARAVIEW_USE_MPI=ON -DVTK_SMP_IMPLEMENTATION_TYPE=TBB -DCMAKE_BUILD_TYPE=Release ../paraview-source
-- Using 'QtHelp' without 'QtWebEngine' will ignore embedded javascript and *.js files for documentation
-- Found Python3: /usr/bin/python3.8 (found suitable version "3.8.5", minimum required is "3.2") found components: Interpreter Development.Module Development.Embed
CMake Warning at VTK/Rendering/OpenGL2/CMakeLists.txt:359 (message):
X11::Xcursor not found; custom cursors will be ignored.
-- Bitwidth Mapping: preferring `long` over `long long` for c++11 compatibility
-- Bitwidth Mapping Results:
-- conduit::int8 native type: signed char
-- conduit::int16 native type: signed short
-- conduit::int32 native type: signed int
-- conduit::int64 native type: signed long
-- conduit::uint8 native type: unsigned char
-- conduit::uint16 native type: unsigned short
-- conduit::uint32 native type: unsigned int
-- conduit::uint64 native type: unsigned long
-- conduit::float32 native type: float
-- conduit::float64 native type: double
-- Found Python3: /usr/include/python3.8 (found version "3.8") found components: Development Development.Module Development.Embed
-- Enabled modules: VTK(159), ParaView(50 + 12)
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/paraview-build
gfield@gfield-desktop:/usr/local/src/paraview-build$ sudo ninja
ninja: error: 'vtkm::tbb-NOTFOUND', needed by 'lib/libvtkm_cont-pv5.9.so.1', missing and no known rule to make it
It would appear as though VTK-m did not find TBB. It should error in that case instead of making this occur. I have an issue to improve VTK-m’s third party handling.
VTK-m is in ParaView because it is in VTK itself (vendored and such). I don’t know why VTK-m isn’t finding TBB out of the box. Some --debug-find output around VTK-m’s FindTBB searchings could help.
ninja explain: deps for 'CMakeFiles/vtkPVAdaptorsPagosaPython.dir/CMakeFiles/vtkPV
AdaptorsPagosaPython/vtkPVAdaptorsPagosaModulePython.cxx.o' are missing
ninja explain: deps for 'VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPython.c.o' are missing
ninja explain: VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPython.c.o is dirty
ninja explain: deps for 'VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonClass.c.o' are missing
ninja explain: VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonClass.c.o is dirty
ninja explain: deps for 'VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonConstant.c.o' are missing
ninja explain: VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonConstant.c.o is dirty
ninja explain: deps for 'VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonEnum.c.o' are missing
ninja explain: VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonEnum.c.o is dirty
ninja explain: deps for 'VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonMethod.c.o' are missing
ninja explain: VTK/Wrapping/Tools/CMakeFiles/WrapPython.dir/vtkWrapPythonMethod.c.o is dirty
The corresponding directories can be found in my build-directory, but they seem to be empty. I have tried building in my source-directory as well, but that does not work. I get the following error message:
CMake Error at CMakeLists.txt:36 (message):
ParaView requires an out-of-source build. Please create a separate binary
directory and run CMake there.
(I have one directory called paraview-source/, and one called paraview-build/, both located at /usr/local/src/.)
Could something have gone awry in the first step (i.e. setting up makefiles with cmake)? I’m still at a loss of what to do.
Why are you running as sudo? You really shouldn’t build as sudo (install can make sense). (Later info shows you’re building in /usr/local…why not build in your $HOME?)
It seems that you once configured ParaView from its source directory. Remove CMakeCache.txt and CMakeFiles from the source tree and try again.
Finding TBB has nothing to do with ninja -d explain. You can run cmake --debug-find $other_configure_args to get that information.
FYI, I’m seeing the same problem with Ubuntu 20.04. It happens with 655528fc9b64cd3a59eb00212c8b18afebda8264 (3/11), but not with 1e857afe005c24c79fb2146180005ae7e992e929 (3/5).
The difference is that in VTK, we now try to use TBBConfig.cmake if possible. Could someone please get a backtrace as to how TBB is being found within VTK-m with this change? Using --debug-find and snipping to around VTK-m’s find_package(TBB) would be ideal.
Hello! I haven’t had time to work on this for a couple of days, but here comes a few answers.
1. Why are you running as sudo? You really shouldn’t build as sudo (install can make sense). (Later info shows you’re building in /usr/local…why not build in your $HOME?)
I have gotten the impression that it is a good habit to keep local software (intended for any user) in /usr/local. I’m no expert Linux user though, so I could be wrong.
2. It seems that you once configured ParaView from its source directory. Remove CMakeCache.txt and CMakeFiles from the source tree and try again.
I tried building in the source directory (didn’t work), when the out-of-source build didn’t work. I have now removed the mentioned files and directories from the source directory.
3. Finding TBB has nothing to do with ninja -d explain. You can run cmake --debug-find $other_configure_args to get that information.
I have ran cmake --debug-output (couldn’t find --debug-find). There’s over 10,000 output lines, but only 30 of them contain “tbb”. Below I printed a snapshot. (The others are more or less identical, but with other sub-directories of /usr/local/src/paraview-build/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/). I can’t find any relevant errors/warnings.
Entering /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/CMakeLists.txt
Entering /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb/internal
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb/CMakeLists.txt
Entering /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb/internal/testing
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb/internal/CMakeLists.txt
Returning to /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb/internal
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb/internal/CMakeLists.txt
Returning to /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/tbb/CMakeLists.txt
Returning to /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/exec/CMakeLists.txt
…
-- Generating /usr/local/src/paraview-build/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/CMakeLists.txt
-- Generating /usr/local/src/paraview-build/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/internal/CMakeLists.txt
-- Generating /usr/local/src/paraview-build/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/testing
Called from: [1] /usr/local/src/paraview-source/VTK/ThirdParty/vtkm/vtkvtkm/vtk-m/vtkm/cont/tbb/testing/CMakeLists.txt
sudo is usually left for the install step. Building can happen anywhere and should not be done with root permissions.
Ah, that’s a newer CMake feature then. It was added in CMake 3.17. You can download a newer version from CMake’s release page; there’s no need to install it globally because you can just extract the Linux tarball and use it from wherever that is.