Skip to content

Fix OSS install script to build all deps at v2026.03.02.00 (#532)#532

Open
ahmadelyoussef wants to merge 1 commit intofacebookresearch:v2-betafrom
ahmadelyoussef:export-D97039942-to-v2-beta
Open

Fix OSS install script to build all deps at v2026.03.02.00 (#532)#532
ahmadelyoussef wants to merge 1 commit intofacebookresearch:v2-betafrom
ahmadelyoussef:export-D97039942-to-v2-beta

Conversation

@ahmadelyoussef
Copy link
Contributor

@ahmadelyoussef ahmadelyoussef commented Mar 18, 2026

Summary:

Context: https://fb.workplace.com/groups/604299349618684/permalink/30999815716306981/

Fixed with mostly help from Claude


Fix the UCacheBench open source install script so all Facebook OSS
dependencies (folly, fbthrift, CacheLib, mcrouter, etc.) build at
v2026.03.02.00.

Key changes:

  1. CacheLib: switch from pinned commit to v2026.03.02.00 tag
    The old pinned commit (2812ee3) was incompatible with folly
    v2026.03.02.00 (missing Folly::folly_exception_tracer target).
    CacheLib v2026.03.02.00 already includes the fix for that (D92866330).

  2. Patch CacheLib for fmt v11 compatibility
    CacheLib v2026.03.02.00's CombinedEntryStatus enum is not
    formattable with fmt v11.0.2. Add a format_as() function following
    the existing pattern in navy/common/Types.h. We patch rather than
    downgrading fmt because all Facebook OSS libs are version-locked —
    mixing versions causes cascading build failures.

  3. Patch CacheLib to remove Folly::folly_exception_counter
    This CMake target was removed/made conditional in newer folly and is
    optional (debug exception counters, no functional impact). CacheLib
    v2026.03.02.00 still references it, so we strip it from CMakeLists.

  4. Switch mcrouter from autotools to CMake build
    The old autotools approach (autoreconf/configure/make) didn't
    install headers properly or produce CMake config files, requiring
    manual workarounds (hardcoded library paths, extra include dirs).
    With CMake, find_package(mcrouter) works out of the box and handles
    transitive dependencies automatically.

  5. Add mcrouter source include path to thrift generation
    The thrift compiler needs -I ${DEPS_DIR}/mcrouter to resolve
    mcrouter/lib/carbon/carbon.thrift includes when generating
    UCacheBench protocol code.

  6. Add CMAKE_MODULE_PATH for fbcode_builder Find modules
    UCacheBench's CMake needs access to FindLibEvent.cmake and other
    custom Find modules from fbcode_builder when resolving mcrouter's
    transitive dependencies.

Reviewed By: charles-typ

Differential Revision: D97039942

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 18, 2026
@meta-codesync
Copy link

meta-codesync bot commented Mar 18, 2026

@ahmadelyoussef has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97039942.

…esearch#532)

Summary:

Context: https://fb.workplace.com/groups/604299349618684/permalink/30999815716306981/

Fixed with mostly help from Claude

----

Fix the UCacheBench open source install script so all Facebook OSS
dependencies (folly, fbthrift, CacheLib, mcrouter, etc.) build at
v2026.03.02.00.

Key changes:

1. **CacheLib: switch from pinned commit to v2026.03.02.00 tag**
   The old pinned commit (2812ee3) was incompatible with folly
   v2026.03.02.00 (missing `Folly::folly_exception_tracer` target).
   CacheLib v2026.03.02.00 already includes the fix for that (D92866330).

2. **Patch CacheLib for fmt v11 compatibility**
   CacheLib v2026.03.02.00's `CombinedEntryStatus` enum is not
   formattable with fmt v11.0.2. Add a `format_as()` function following
   the existing pattern in `navy/common/Types.h`. We patch rather than
   downgrading fmt because all Facebook OSS libs are version-locked —
   mixing versions causes cascading build failures.

3. **Patch CacheLib to remove `Folly::folly_exception_counter`**
   This CMake target was removed/made conditional in newer folly and is
   optional (debug exception counters, no functional impact). CacheLib
   v2026.03.02.00 still references it, so we strip it from CMakeLists.

4. **Switch mcrouter from autotools to CMake build**
   The old autotools approach (`autoreconf`/`configure`/`make`) didn't
   install headers properly or produce CMake config files, requiring
   manual workarounds (hardcoded library paths, extra include dirs).
   With CMake, `find_package(mcrouter)` works out of the box and handles
   transitive dependencies automatically.

5. **Add mcrouter source include path to thrift generation**
   The thrift compiler needs `-I ${DEPS_DIR}/mcrouter` to resolve
   `mcrouter/lib/carbon/carbon.thrift` includes when generating
   UCacheBench protocol code.

6. **Add CMAKE_MODULE_PATH for fbcode_builder Find modules**
   UCacheBench's CMake needs access to `FindLibEvent.cmake` and other
   custom Find modules from fbcode_builder when resolving mcrouter's
   transitive dependencies.

Reviewed By: charles-typ

Differential Revision: D97039942
@meta-codesync meta-codesync bot changed the title Fix OSS install script to build all deps at v2026.03.02.00 Fix OSS install script to build all deps at v2026.03.02.00 (#532) Mar 19, 2026
@ahmadelyoussef ahmadelyoussef force-pushed the export-D97039942-to-v2-beta branch from 890e40e to 07d3f20 Compare March 19, 2026 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant