# Build problem: 'vtkm::tbb-NOTFOUND'

**URL:** https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659
**Category:** ParaView Support
**Created:** [March 9, 2021, 4:36pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659 "2021-03-09T16:36:16Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![gfield](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/3be4f8/32.png) [@gfield](https://discourse.paraview.org/u/gfield)
#### Post date: [March 9, 2021, 4:36pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/1 "2021-03-09T16:36:16Z")

</div>

Hello!

I’m trying to build ParaView on Ubuntu 20.04 LTS. I’ve followed the instructions on [ParaView/build.md at master · Kitware/ParaView · GitHub](https://github.com/Kitware/ParaView/blob/master/Documentation/dev/build.md)

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
```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 9, 2021, 7:33pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/2 "2021-03-09T19:33:18Z")

</div>

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](https://gitlab.kitware.com/vtk/vtk-m/-/issues/609) to improve VTK-m’s third party handling.

Cc: @vbolea @sujin

---

<div class="post-metadata">

### Author: ![gfield](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/3be4f8/32.png) [@gfield](https://discourse.paraview.org/u/gfield)
#### Post date: [March 9, 2021, 9:43pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/3 "2021-03-09T21:43:15Z")

</div>

Do you have any idea of how to fix this issue?

Before building, I installed all of the prerequisite packages listed in [ParaView/build.md](https://github.com/Kitware/ParaView/blob/master/Documentation/dev/build.md)

```
sudo apt-get install git cmake build-essential libgl1-mesa-dev libxt-dev qt5-default libqt5x11extras5-dev libqt5help5 qttools5-dev qtxmlpatterns5-dev-tools libqt5svg5-dev python3-dev python3-numpy libopenmpi-dev libtbb-dev ninja-build

```

When I list installed packages related to vtk and tbb I find

```
gfield@gfield-desktop:/usr/local/src/OpenFOAM-v2012$ apt list --installed *vtk*
Listing... Done
libvtk6.3/focal,now 6.3.0+dfsg2-5build2 amd64 [installed,automatic]
libvtk7-dev/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed]
libvtk7-java/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed,automatic]
libvtk7-jni/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed,automatic]
libvtk7.1p-qt/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed,automatic]
libvtk7.1p/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed,automatic]
python3-vtk7/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed,automatic]
tcl-vtk7/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed,automatic]
vtk7/focal,now 7.1.1+dfsg2-2ubuntu1 amd64 [installed,automatic]

```

and

```
gfield@gfield-desktop:/usr/local/src/OpenFOAM-v2012$ apt list --installed *tbb*
Listing... Done
libtbb-dev/focal,now 2020.1-2 amd64 [installed]
libtbb2/focal,now 2020.1-2 amd64 [installed,automatic]

```

Do I need to install/build VTK-m before building ParaView? How come that is not listed as a dependency?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 9, 2021, 10:43pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/4 "2021-03-09T22:43:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![gfield](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/3be4f8/32.png) [@gfield](https://discourse.paraview.org/u/gfield)
#### Post date: [March 10, 2021, 7:11pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/5 "2021-03-10T19:11:42Z")

</div>

Hmm. I ran

```
sudo ninja -d explain

```

A snapshot of the output is

```
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.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 10, 2021, 7:47pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/6 "2021-03-10T19:47:07Z")

</div>

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`?)
2. It seems that you once configured ParaView from its source directory. Remove `CMakeCache.txt` and `CMakeFiles` from the source tree and try again.
3. Finding TBB has nothing to do with `ninja -d explain`. You can run `cmake --debug-find $other_configure_args` to get that information.

---

<div class="post-metadata">

### Author: ![Yasushi\_Saito](https://discourse.paraview.org/user_avatar/discourse.paraview.org/yasushi_saito/32/3469_2.png) [@Yasushi\_Saito](https://discourse.paraview.org/u/Yasushi_Saito)
#### Post date: [March 12, 2021, 1:12am UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/7 "2021-03-12T01:12:16Z")

</div>

FYI, I’m seeing the same problem with Ubuntu 20.04. It happens with 655528fc9b64cd3a59eb00212c8b18afebda8264 (3/11), but not with 1e857afe005c24c79fb2146180005ae7e992e929 (3/5).

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 12, 2021, 2:51pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/8 "2021-03-12T14:51:32Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![gfield](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/3be4f8/32.png) [@gfield](https://discourse.paraview.org/u/gfield)
#### Post date: [March 14, 2021, 8:46am UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/9 "2021-03-14T08:46:24Z")

</div>

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
```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 14, 2021, 5:01pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/10 "2021-03-14T17:01:48Z")

</div>

> [@gfield](#):
>
> 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.

`sudo` is usually left for the _install_ step. Building can happen anywhere and should not be done with root permissions.

> [@gfield](#):
>
> I have ran cmake --debug-output (couldn’t find --debug-find).

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](https://github.com/Kitware/CMake/releases); there’s no need to install it globally because you can just extract the Linux tarball and use it from wherever that is.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 15, 2021, 4:16pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/11 "2021-03-15T16:16:27Z")

</div>

I stumbled onto this today. Let me know if you want steps to reproduce @ben.boeckel

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [March 15, 2021, 4:58pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/12 "2021-03-15T16:58:30Z")

</div>

I’m looking for `--debug-find` output around VTK-m’s TBB searching to know why it fails.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [March 16, 2021, 2:05pm UTC](https://discourse.paraview.org/t/build-problem-vtkm-tbb-notfound/6659/13 "2021-03-16T14:05:21Z")

</div>

Not sure what you mean, I’ve opened an issue:

[https://gitlab.kitware.com/paraview/paraview/-/issues/20557](https://gitlab.kitware.com/paraview/paraview/-/issues/20557)
