Skip to content

Commit bc527c3

Browse files
ahmadelyousseffacebook-github-bot
authored andcommitted
fix liburing version in ubuntu 22.04 since it is not enough to build folly
Differential Revision: D115634471
1 parent a798023 commit bc527c3

2 files changed

Lines changed: 38 additions & 0 deletions

File tree

packages/tao_bench/install_tao_bench_aarch64.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,23 @@ if ! [ -f "/usr/local/bin/cmake" ]; then
7979
ln -s /usr/bin/cmake /usr/local/bin/cmake
8080
fi
8181

82+
# Folly requires APIs newer than Ubuntu 22.04's liburing 2.1; pin 2.12 for reproducible builds.
83+
LIBURING_VERSION="2.12"
84+
if [ "$LINUX_DIST_ID" = "ubuntu" ] && ! PKG_CONFIG_LIBDIR="${TAO_BENCH_DEPS}/lib/pkgconfig" \
85+
pkg-config --atleast-version="${LIBURING_VERSION}" liburing; then
86+
LIBURING_ROOT="${TAO_BENCH_ROOT}/liburing-${LIBURING_VERSION}"
87+
if ! [ -d "${LIBURING_ROOT}" ]; then
88+
git clone --branch "liburing-${LIBURING_VERSION}" --depth 1 \
89+
https://github.com/axboe/liburing.git "${LIBURING_ROOT}"
90+
fi
91+
pushd "${LIBURING_ROOT}"
92+
./configure --prefix="${TAO_BENCH_DEPS}"
93+
make -j"${NUM_BUILD_JOBS}"
94+
make liburing.pc
95+
make install
96+
popd
97+
fi
98+
8299
# Install openssl
83100
if ! [ -d "openssl" ]; then
84101
git clone --branch "${OPENSSL_BRANCH}" --depth 1 https://github.com/openssl/openssl.git
@@ -129,6 +146,8 @@ sed -i 's/FOLLY_ALWAYS_INLINE//g' "${TAO_BENCH_ROOT}/folly/folly/experimental/sy
129146
# Remove boost.log and boost.python from the build — they fail on aarch64 with GCC 14
130147
# (log: build failure; python: incompatible with NumPy 2.0) and neither is needed by folly
131148
sed -i '/^--with-log$/d;/^--with-python$/d' build/fbcode_builder/manifests/boost
149+
CMAKE_PREFIX_PATH="${TAO_BENCH_DEPS}" \
150+
PKG_CONFIG_PATH="${TAO_BENCH_DEPS}/lib/pkgconfig" \
132151
OPENSSL_ROOT_DIR="${TAO_BENCH_DEPS}" ./build/fbcode_builder/getdeps.py --allow-system-packages build \
133152
--extra-cmake-defines '{"CMAKE_LIBRARY_ARCHITECTURE": "aarch64"}' \
134153
--scratch-path "${FOLLY_BUILD_ROOT}"

packages/tao_bench/install_tao_bench_x86_64.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,23 @@ if ! [ -f "/usr/local/bin/cmake" ]; then
7575
ln -s /usr/bin/cmake /usr/local/bin/cmake
7676
fi
7777

78+
# Folly requires APIs newer than Ubuntu 22.04's liburing 2.1; pin 2.12 for reproducible builds.
79+
LIBURING_VERSION="2.12"
80+
if [ "$LINUX_DIST_ID" = "ubuntu" ] && ! PKG_CONFIG_LIBDIR="${TAO_BENCH_DEPS}/lib/pkgconfig" \
81+
pkg-config --atleast-version="${LIBURING_VERSION}" liburing; then
82+
LIBURING_ROOT="${TAO_BENCH_ROOT}/liburing-${LIBURING_VERSION}"
83+
if ! [ -d "${LIBURING_ROOT}" ]; then
84+
git clone --branch "liburing-${LIBURING_VERSION}" --depth 1 \
85+
https://github.com/axboe/liburing.git "${LIBURING_ROOT}"
86+
fi
87+
pushd "${LIBURING_ROOT}"
88+
./configure --prefix="${TAO_BENCH_DEPS}"
89+
make -j"${NUM_BUILD_JOBS}"
90+
make liburing.pc
91+
make install
92+
popd
93+
fi
94+
7895
# Install openssl
7996
if ! [ -d "openssl" ]; then
8097
git clone --branch "${OPENSSL_BRANCH}" --depth 1 https://github.com/openssl/openssl.git
@@ -121,6 +138,8 @@ pushd folly
121138
git checkout v2024.06.24.00
122139
git apply "${BENCHPRESS_ROOT}/packages/tao_bench/folly_zlib_uri.patch"
123140
sed -i 's/FOLLY_ALWAYS_INLINE//g' "${TAO_BENCH_ROOT}/folly/folly/experimental/symbolizer/StackTrace.cpp"
141+
CMAKE_PREFIX_PATH="${TAO_BENCH_DEPS}" \
142+
PKG_CONFIG_PATH="${TAO_BENCH_DEPS}/lib/pkgconfig" \
124143
OPENSSL_ROOT_DIR="${TAO_BENCH_DEPS}" ./build/fbcode_builder/getdeps.py --allow-system-packages build \
125144
--scratch-path "${FOLLY_BUILD_ROOT}"
126145
popd

0 commit comments

Comments
 (0)