Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update FBOS to v2024.07.15 to fix arm64 + Linux build #12451

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CMake/resolve_dependency_modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ by Velox. See details on bundling below.
| re2 | 2021-04-01 | Yes |
| fmt | 10.1.1 | Yes |
| simdjson | 3.9.3 | Yes |
| folly | v2024.07.01.00 | Yes |
| fizz | v2024.07.01.00 | No |
| wangle | v2024.07.01.00 | No |
| mvfst | v2024.07.01.00 | No |
| fbthrift | v2024.07.01.00 | No |
| folly | v2024.07.15.00 | Yes |
| fizz | v2024.07.15.00 | No |
| wangle | v2024.07.15.00 | No |
| mvfst | v2024.07.15.00 | No |
| fbthrift | v2024.07.15.00 | No |
| libstemmer | 2.2.0 | Yes |
| DuckDB (testing) | 0.8.1 | Yes |
| cpr (testing) | 1.10.15 | Yes |
Expand Down
10 changes: 6 additions & 4 deletions CMake/resolve_dependency_modules/folly/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
project(Folly)
cmake_minimum_required(VERSION 3.28)

set(VELOX_FOLLY_BUILD_VERSION v2024.07.01.00)
set(VELOX_FOLLY_BUILD_VERSION v2024.07.15.00)
set(VELOX_FOLLY_BUILD_SHA256_CHECKSUM
e78584ab7ba9a687285f2849bc0141e2422a5c808ad6ab3558c83d85975e25ed)
fbed82092b4e25aabcb5f665a35b16076c28f8bd30b63209649420f90df2dbb6)
set(VELOX_FOLLY_SOURCE_URL
"https://github.com/facebook/folly/releases/download/${VELOX_FOLLY_BUILD_VERSION}/folly-${VELOX_FOLLY_BUILD_VERSION}.tar.gz"
)
Expand All @@ -38,8 +38,10 @@ FetchContent_Declare(
folly
URL ${VELOX_FOLLY_SOURCE_URL}
URL_HASH ${VELOX_FOLLY_BUILD_SHA256_CHECKSUM}
PATCH_COMMAND git apply ${CMAKE_CURRENT_LIST_DIR}/folly-no-export.patch
${glog_patch} OVERRIDE_FIND_PACKAGE SYSTEM EXCLUDE_FROM_ALL)
PATCH_COMMAND
git apply ${CMAKE_CURRENT_LIST_DIR}/folly-no-export.patch && git apply
${CMAKE_CURRENT_LIST_DIR}/fix-thread-local.patch ${glog_patch}
OVERRIDE_FIND_PACKAGE SYSTEM EXCLUDE_FROM_ALL)

set(BUILD_SHARED_LIBS ${VELOX_BUILD_SHARED})

Expand Down
33 changes: 33 additions & 0 deletions CMake/resolve_dependency_modules/folly/fix-thread-local.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
--- a/folly/detail/ThreadLocalDetail.h
+++ b/folly/detail/ThreadLocalDetail.h
@@ -109,7 +109,7 @@ struct ElementWrapper {
}
auto const fun =
+[](void* pt, TLPDestructionMode) { delete static_cast<Ptr>(pt); };
- auto const raw = reinterpret_cast<uintptr_t>(fun);
+ auto const raw = reinterpret_cast<uintptr_t>(std::launder(reinterpret_cast<char*>(fun)));
if (raw & deleter_all_mask) {
return set(p, std::ref(*fun));
}
@@ -132,7 +132,7 @@ struct ElementWrapper {
d(static_cast<Ptr>(pt), mode);
});
guard.dismiss();
- auto const raw = reinterpret_cast<uintptr_t>(obj);
+ auto const raw = reinterpret_cast<uintptr_t>(std::launder(reinterpret_cast<char*>(obj)));
DCHECK_EQ(0, raw & deleter_all_mask);
deleter = raw | deleter_obj_mask;
ptr = p;
2 changes: 1 addition & 1 deletion scripts/setup-centos9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ USE_CLANG="${USE_CLANG:-false}"
export INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"}
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)/deps-download}

FB_OS_VERSION="v2024.07.01.00"
FB_OS_VERSION="v2024.07.15.00"
FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"
THRIFT_VERSION="v0.16.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ VELOX_BUILD_SHARED=${VELOX_BUILD_SHARED:-"OFF"} #Build folly shared for use in l
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$(pwd)}
MACOS_VELOX_DEPS="bison flex gflags glog googletest icu4c libevent libsodium lz4 lzo openssl protobuf@21 snappy xz zstd"
MACOS_BUILD_DEPS="ninja cmake"
FB_OS_VERSION="v2024.07.01.00"
FB_OS_VERSION="v2024.07.15.00"
FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"
STEMMER_VERSION="2.2.0"
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function install_gcc11_if_needed {
fi
}

FB_OS_VERSION="v2024.07.01.00"
FB_OS_VERSION="v2024.07.15.00"
FMT_VERSION="10.1.1"
BOOST_VERSION="boost-1.84.0"
THRIFT_VERSION="v0.16.0"
Expand Down
Loading