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
Open
Fix OSS install script to build all deps at v2026.03.02.00 (#532)#532ahmadelyoussef wants to merge 1 commit intofacebookresearch:v2-betafrom
ahmadelyoussef wants to merge 1 commit intofacebookresearch:v2-betafrom
Conversation
|
@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
890e40e to
07d3f20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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_tracertarget).CacheLib v2026.03.02.00 already includes the fix for that (D92866330).
Patch CacheLib for fmt v11 compatibility
CacheLib v2026.03.02.00's
CombinedEntryStatusenum is notformattable with fmt v11.0.2. Add a
format_as()function followingthe existing pattern in
navy/common/Types.h. We patch rather thandowngrading fmt because all Facebook OSS libs are version-locked —
mixing versions causes cascading build failures.
Patch CacheLib to remove
Folly::folly_exception_counterThis 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.
Switch mcrouter from autotools to CMake build
The old autotools approach (
autoreconf/configure/make) didn'tinstall 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 handlestransitive dependencies automatically.
Add mcrouter source include path to thrift generation
The thrift compiler needs
-I ${DEPS_DIR}/mcrouterto resolvemcrouter/lib/carbon/carbon.thriftincludes when generatingUCacheBench protocol code.
Add CMAKE_MODULE_PATH for fbcode_builder Find modules
UCacheBench's CMake needs access to
FindLibEvent.cmakeand othercustom Find modules from fbcode_builder when resolving mcrouter's
transitive dependencies.
Reviewed By: charles-typ
Differential Revision: D97039942