-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: The OSS autotools build has been nonfunctional for about a year. While facebook/mcrouter#449 would be a better long-term approach to fixing the build since it would also bring it in sync with other Meta OSS projects and enable testing in CI, fixing the existing build until there's movement on that front would at least provide a signal on whether the OSS version is buildable at all. So: * Introduce new Ubuntu 24.04 build files and use them in CI. I'll remove build files, Dockerfiles etc. for ancient Ubuntu and CentOS versions in a followup PR. * Pin fmtlib to 11.0.2, like fbcode_builder does, and skip building its test suite to not waste time. * Use Ninja to generate and build CMake-based dependencies. * Use googletest, gmock and zstd as packaged by Ubuntu rather than building their older versions from source. * Introduce and use a new define `MCROUTER_OSS_BUILD` to mark OSS-specific conditional compilation blocks. This could probably replace the existing `LIBMC_FBTRACE_DISABLE` and `DISABLE_COMPRESSION` defines too, as long as those aren't used outside of the OSS build. * Fix OSS build failures that have gone undetected due to CI being broken: * Add a shim for the SR-specific method `HostInfoLocation::hostUniqueKey` (used since 85facb9200dea75e661447ed11e05806f42de65f). * Remove redundant CarbonRouterInstance deletion logging that was using a Meta-specific include (used since 6c2142acd8e69edd40eed70a93ea17ee2909287d). * Disable client identity propagation in the OSS build since it relies on Meta-specific code (used since 2f32271533fdf54ce71cfb65f6fda3c621f076a4). Fixes facebook/mcrouter#453, fixes facebook/mcrouter#444, fixes facebook/mcrouter#447 etc. X-link: facebook/mcrouter#457 Reviewed By: lenar-f Differential Revision: D67428119 Pulled By: disylh fbshipit-source-id: a22e7616d9b82875611e45bf1df40a771db569d9
- Loading branch information
1 parent
5715ae5
commit 8148af7
Showing
13 changed files
with
127 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
41 changes: 41 additions & 0 deletions
41
third-party/mcrouter/src/mcrouter/scripts/Makefile_ubuntu-24.04
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
RECIPES_DIR := ./recipes | ||
|
||
all: .folly-done .fizz-done .wangle-done .fmt-done .mvfst-done .fbthrift-done .gtest-done | ||
${RECIPES_DIR}/mcrouter.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ | ||
|
||
mcrouter: | ||
${RECIPES_DIR}/mcrouter.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ | ||
|
||
deps: .folly-done .fizz-done .wangle-done .fmt-done .mvfst-done .fbthrift-done | ||
touch $@ | ||
|
||
.folly-done: .fmt-done | ||
${RECIPES_DIR}/folly.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ | ||
|
||
.fizz-done: .folly-done | ||
${RECIPES_DIR}/fizz.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ | ||
|
||
.wangle-done: .folly-done .fizz-done | ||
${RECIPES_DIR}/wangle.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ | ||
|
||
.fmt-done: | ||
${RECIPES_DIR}/fmtlib.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ | ||
|
||
.mvfst-done: .wangle-done | ||
${RECIPES_DIR}/mvfst.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ | ||
|
||
.fbthrift-done: .folly-done .fizz-done .wangle-done .fmt-done .mvfst-done | ||
${RECIPES_DIR}/fbthrift.sh $(PKG_DIR) $(INSTALL_DIR) $(INSTALL_AUX_DIR) | ||
touch $@ |
54 changes: 54 additions & 0 deletions
54
third-party/mcrouter/src/mcrouter/scripts/install_ubuntu_24.04.sh
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
set -ex | ||
|
||
BASE_DIR="$1" | ||
TARGET="${2:-all}" | ||
|
||
[ -n "$BASE_DIR" ] || ( echo "Base dir missing"; exit 1 ) | ||
|
||
sudo apt-get update | ||
|
||
sudo apt-get install -y \ | ||
autoconf \ | ||
binutils-dev \ | ||
bison \ | ||
cmake \ | ||
flex \ | ||
g++ \ | ||
gcc \ | ||
git \ | ||
libboost1.83-all-dev \ | ||
libbz2-dev \ | ||
libdouble-conversion-dev \ | ||
libevent-dev \ | ||
libfast-float-dev \ | ||
libgflags-dev \ | ||
libgoogle-glog-dev \ | ||
libgmock-dev \ | ||
libgtest-dev \ | ||
libjemalloc-dev \ | ||
liblz4-dev \ | ||
liblzma-dev \ | ||
liblzma5 \ | ||
libsnappy-dev \ | ||
libsodium-dev \ | ||
libssl-dev \ | ||
libtool \ | ||
libunwind8-dev \ | ||
libxxhash-dev \ | ||
libzstd-dev \ | ||
make \ | ||
ninja-build \ | ||
pkg-config \ | ||
python3-dev \ | ||
ragel \ | ||
sudo | ||
|
||
cd "$(dirname "$0")" || ( echo "cd fail"; exit 1 ) | ||
|
||
./get_and_build_by_make.sh "Makefile_ubuntu-24.04" "$TARGET" "$BASE_DIR" |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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