Skip to content

Refresh platform010 build dependencies and remove TBB#14882

Closed
pdillinger wants to merge 1 commit into
facebook:mainfrom
pdillinger:update_dependencies_2026
Closed

Refresh platform010 build dependencies and remove TBB#14882
pdillinger wants to merge 1 commit into
facebook:mainfrom
pdillinger:update_dependencies_2026

Conversation

@pdillinger

Copy link
Copy Markdown
Contributor

Refresh the fbcode platform010 toolchain and library pins to current third-party2 versions, and remove the now-unused Intel TBB dependency.

Toolchain / deps:

  • Fix update_dependencies.sh: the gcc and binutils trees moved from centos8-native to centos9-native, so the old paths resolved to nothing and a re-run emitted empty GCC_BASE/BINUTILS_BASE. Point them at centos9-native.
  • Bump clang 15 -> 21; binutils 2.37 -> 2.43; libunwind 1.4 -> 1.8; valgrind 3.19 -> 3.22; plus hash-only refreshes for the LATEST-tracked libs. Regenerate dependencies_platform010.sh.
  • Keep GCC pinned at 11.x. The only newer GCC in third-party2 (13.x) is built for glibc >= 2.35 (its libgcc_s needs _dl_find_object@GLIBC_2.35), but platform010 ships glibc 2.34, so GCC 13 will not link/run here.
  • zlib stays 1.2.8 (the only version with an x86_64 platform010 build).
  • Document why GCC/libgcc/glibc/zlib remain pinned in update_dependencies.sh.

Remove TBB (no longer used) from the build system: the get_lib_base entry, both fbcode_config*.sh, build_detect_platform detection, the CMake WITH_TBB option / find_dependency, and cmake/modules/FindTBB.cmake. Dockerfiles and the HISTORY.md changelog are left untouched. (TBB was used by the old clock cache, long ago removed.)

Although this change was originally motivated by upgrading gcc for its libasan not to hit process lifetime thread limits, upgrading gcc proved impractical under platform010.

Bonus: fix USBAN+gcc build by making GetParam() valid by the time it is called in several test class constructors.

Test Plan: a variety of local builds (gcc, clang; various sanitizers) using fbcode tooling

No production code changes

Refresh the fbcode platform010 toolchain and library pins to current
third-party2 versions, and remove the now-unused Intel TBB dependency.

Toolchain / deps:
- Fix update_dependencies.sh: the gcc and binutils trees moved from
  centos8-native to centos9-native, so the old paths resolved to nothing
  and a re-run emitted empty GCC_BASE/BINUTILS_BASE. Point them at
  centos9-native.
- Bump clang 15 -> 21; binutils 2.37 -> 2.43; libunwind 1.4 -> 1.8;
  valgrind 3.19 -> 3.22; plus hash-only refreshes for the LATEST-tracked
  libs. Regenerate dependencies_platform010.sh.
- Keep GCC pinned at 11.x. The only newer GCC in third-party2 (13.x) is
  built for glibc >= 2.35 (its libgcc_s needs _dl_find_object@GLIBC_2.35),
  but platform010 ships glibc 2.34, so GCC 13 will not link/run here.
- zlib stays 1.2.8 (the only version with an x86_64 platform010 build).
- Document why GCC/libgcc/glibc/zlib remain pinned in update_dependencies.sh.

Remove TBB (no longer used) from the build system: the get_lib_base entry,
both fbcode_config*.sh, build_detect_platform detection, the CMake WITH_TBB
option / find_dependency, and cmake/modules/FindTBB.cmake. Dockerfiles and
the HISTORY.md changelog are left untouched. (TBB was used by the old
clock cache, long ago removed.)

Although this change was originally motivated by upgrading gcc for its
libasan not to hit process lifetime thread limits, upgrading gcc proved
impractical under platform010.

Bonus: fix USBAN+gcc build by making GetParam() valid by the time it is
called in several test class constructors.

Test Plan: a variety of local builds (gcc, clang; various sanitizers)
using fbcode tooling

No production code changes
@pdillinger pdillinger requested a review from anand1976 June 24, 2026 22:41
@meta-cla meta-cla Bot added the CLA Signed label Jun 24, 2026
@meta-codesync

meta-codesync Bot commented Jun 24, 2026

Copy link
Copy Markdown

@pdillinger has imported this pull request. If you are a Meta employee, you can view this in D109631787.

@github-actions

Copy link
Copy Markdown

✅ clang-tidy: No findings on changed lines

Completed in 509.0s.

@github-actions

Copy link
Copy Markdown

🟡 Codex Code Review

Auto-triggered after CI passed — reviewing commit 9b2ff8e


Codex review failed before producing findings.

WARNING: proceeding, even though we could not create PATH aliases: Refusing to create helper binaries under temporary dir "/tmp" (codex_home: AbsolutePathBuf("/tmp/codex-home"))
error: the argument '--base <BRANCH>' cannot be used with '[PROMPT]'

Usage: codex exec review --commit <SHA> --base <BRANCH> --title <TITLE> --model <MODEL> --config <key=value> --dangerously-bypass-approvals-and-sandbox --output-last-message <FILE> [PROMPT]

For more information, try '--help'.

ℹ️ About this response

Generated by Codex CLI.
Review methodology: claude_md/code_review.md

Limitations:

  • Codex may miss context from files not in the diff
  • Large PRs may be truncated
  • Always apply human judgment to AI suggestions

Commands:

  • /codex-review [context] — Request a code review
  • /codex-query <question> — Ask about the PR or codebase
@github-actions

Copy link
Copy Markdown

✅ Claude Code Review

Auto-triggered after CI passed — reviewing commit 9b2ff8e


Summary

Clean build infrastructure PR that refreshes platform010 dependency versions, removes the unused TBB dependency, and fixes a real UBSAN issue with C++ base class initialization order in test code. No production code changes. The changes are well-scoped and correctly implemented.

High-severity findings (0):

No high-severity findings.

Full review (click to expand)

Findings

🔴 HIGH

None.

🟡 MEDIUM

M1. Dockerfiles still install libtbb-dev -- build_tools/ubuntu{20,22,24}_image/Dockerfile
  • Issue: The PR removes TBB from all build system files but the CI Dockerfiles still install libtbb-dev. While the PR description explicitly states "Dockerfiles and the HISTORY.md changelog are left untouched," this creates a minor maintenance inconsistency -- the package is installed but never used.
  • Root cause: Intentional scoping decision per PR description. The TBB package in Dockerfiles is harmless (just unused disk space in CI images) and can be cleaned up separately.
  • Suggested fix: Consider a follow-up PR to remove libtbb-dev from Dockerfiles. Not blocking.
M2. Whitespace-only changes in update_dependencies.sh mixed with functional changes
  • Issue: The diff includes trailing whitespace cleanup on several lines of update_dependencies.sh. While the cleanup is good practice, mixing formatting changes with functional changes makes the diff harder to review.
  • Suggested fix: Nit only. No action needed.

🟢 LOW / NIT

L1. ROCKSDB_DISABLE_TBB environment variable no longer documented -- build_tools/build_detect_platform
  • Issue: The removal of the TBB detection block also removes the only place where ROCKSDB_DISABLE_TBB was checked. If any external scripts set this variable, they will silently have no effect. This is expected behavior.
  • Suggested fix: No action needed unless external documentation references this variable.
L2. Inheritance reorder is correct and complete for identified cases
  • Verification: The C++ standard specifies base classes are initialized in declaration order. The fix correctly moves WithParamInterface<...> before the test base class so GetParam() is valid when called in the test base constructor. GCC UBSAN correctly flags the member function call on an unconstructed subobject. All 5 identified classes are correctly fixed.
L3. Clang version bump 15 -> 21 is a significant jump
  • Issue: 6-major-version jump could introduce new warnings or behavior changes, but local testing with fbcode tooling mitigates this. The version is documented with a "bump deliberately" comment.

Cross-Component Analysis

Context Affected? Assessment
Production code NO No production source files changed
CMake builds YES TBB option cleanly removed; FindTBB.cmake deleted
Make builds YES TBB detection removed from build_detect_platform
fbcode builds YES TBB removed from both config scripts; deps refreshed
Public API NO No API changes
Backwards compat YES Users who relied on -DWITH_TBB=ON in CMake will get an error, but TBB was already non-functional (no source code used it)

Positive Observations

  1. Excellent documentation: New comments in update_dependencies.sh explaining why GCC, libgcc, glibc, and zlib are pinned prevent future maintainers from blindly bumping versions.
  2. Correct UB fix: The inheritance reorder is the proper C++ fix for the UBSAN issue.
  3. Clean TBB removal: Thorough across all build systems while correctly retaining -ldl with an updated comment.
  4. Appropriate scoping: Dockerfiles and HISTORY.md correctly identified as out of scope.

ℹ️ About this response

Generated by Claude Code.
Review methodology: claude_md/code_review.md

Limitations:

  • Claude may miss context from files not in the diff
  • Large PRs may be truncated
  • Always apply human judgment to AI suggestions

Commands:

  • /claude-review [context] — Request a code review
  • /claude-query <question> — Ask about the PR or codebase
@meta-codesync meta-codesync Bot closed this in 8c0790b Jun 25, 2026
@meta-codesync meta-codesync Bot added the Merged label Jun 25, 2026
@meta-codesync

meta-codesync Bot commented Jun 25, 2026

Copy link
Copy Markdown

@pdillinger merged this pull request in 8c0790b.

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

1 participant