Skip to content

Export 3rdparty_tbb when using a system TBB - #7575

Open
Tobias-Fischer wants to merge 1 commit into
isl-org:mainfrom
Tobias-Fischer:fix-system-tbb-export
Open

Tobias-Fischer wants to merge 1 commit into
isl-org:mainfrom
Tobias-Fischer:fix-system-tbb-export

Conversation

@Tobias-Fischer

Copy link
Copy Markdown

Type

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Configuring with -DUSE_SYSTEM_TBB=ON fails at install-export generation:

install(EXPORT "Open3DTargets" ...) includes target "Open3D" which requires
target "3rdparty_tbb" that is not in any export set.

open3d_find_package_3rdparty_library() only adds a target to the install export set when it is declared PUBLIC, and the USE_SYSTEM_TBB branch omits it. TBB is part of Open3D's public interface — utility::ProgressBar uses it from installed headers — so the target does need exporting.

The strongest argument that this is an oversight rather than intent: the OPEN3D_USE_ONEAPI_PACKAGES branch a little earlier in the same file already declares its equivalent target PUBLIC. This just brings the two into line.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style to my code. — n/a, CMake only.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test results here. — test results below.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

One word added. Only the USE_SYSTEM_TBB path is affected; the bundled TBB path is untouched.

Test results

Carried as a patch in the conda-forge open3d-feedstock since Open3D 0.20.0, where USE_SYSTEM_TBB=ON is used. With it, Open3D 0.20.0 builds and its packaging tests pass on linux-64, linux-aarch64, osx-64, osx-arm64 and win-64. Without it, configuration fails with the error above on every platform.

Credit

The patch was written by Tobias Fischer (@Tobias-Fischer) for the conda-forge feedstock.

Note

I checked for existing reports before filing and did not find one covering this; happy to close as a duplicate if I missed it.


🤖 This pull request was written by Claude Code (Claude Opus 5), acting on behalf of @Tobias-Fischer, who has reviewed it.

https://claude.ai/code/session_017R4DS6whKCY8xGcA61kni2

open3d_find_package_3rdparty_library() only adds a target to the install
export set when it is declared PUBLIC. The USE_SYSTEM_TBB branch omits
PUBLIC, so configuring with -DUSE_SYSTEM_TBB=ON fails:

  Target "Open3D" INTERFACE_LINK_LIBRARIES property contains path ...
  which is prefixed in the source directory
  install(EXPORT "Open3DTargets" ...) includes target "Open3D" which
  requires target "3rdparty_tbb" that is not in any export set.

TBB appears in Open3D's public interface -- utility::ProgressBar uses it
in installed headers -- so the target has to be exported. The
OPEN3D_USE_ONEAPI_PACKAGES branch a little further up already declares the
equivalent target PUBLIC, so this just brings the two into line.

Found while packaging Open3D for conda-forge, where this has been carried
as a patch by Tobias Fischer (@Tobias-Fischer).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017R4DS6whKCY8xGcA61kni2
@update-docs

update-docs Bot commented Sep 19, 2026

Copy link
Copy Markdown

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant