AcademySoftwareFoundation / AcademySoftwareFoundation/openvdb

[BUG] Remove FindTBB.cmake

Open
#1,741 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
3.4k
Forks
774
Avg merge
3d 9h
Merged PRs (30d)
34

Description

OpenVDB should not provide a FindTBB.cmake (or any Find*.cmake for that matter) because it overrides local TBBConfig.cmake and may miss some components.

In my specific case, it results to the following:

```
-- OpenVDB ABI Version: 10
CMake Error at /usr/lib/cmake/TBB/TBBTargets.cmake:42 (message):
Some (but not all) targets in this export set were already defined.

Targets Defined: TBB::tbb

Targets not yet defined: TBB::tbbmalloc, TBB::tbbmalloc_proxy,
TBB::tbbbind_2_5, TBB::irml

Call Stack (most recent call first):
/usr/lib/cmake/TBB/TBBConfig.cmake:1 (include)
/home/glow/dev/f3d/deps/install/lib/cmake/vtk-9.3/FindTBB.cmake:75 (find_package)
/home/glow/dev/f3d/deps/install/lib/cmake/OpenVDB/FindOpenVDB.cmake:493 (find_package)
/home/glow/dev/f3d/deps/install/lib/cmake/vtk-9.3/VTK-vtk-module-find-packages.cmake:209 (find_package)
/home/glow/dev/f3d/deps/install/lib/cmake/vtk-9.3/vtk-config.cmake:159 (include)
cmake/f3dPlugin.cmake:170 (find_package)
plugins/vdb/CMakeLists.txt:25 (f3d_plugin_build)

```

Although the FindTBB.cmake providen by OpenVDB does not appear in the stack, removing it solves the issue.

Removing FindTBB.cmake seems to be finxing the issue, but you must be providing it for a reason, so some care may need to be taken for removal.

Contributor guide

Open the contributing guide

Research direction

Start by locating OpenVDB's FindTBB.cmake and the related Find*.cmake files, then read OpenVDB/FindOpenVDB.cmake where it invokes find_package. Check how removing FindTBB.cmake affects package configuration and the reported TBBConfig.cmake target conflict. Done means local TBBConfig.cmake is used without duplicate targets or missing components.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, cpp
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.