fbthrift: 2025.04.21.00 -> 2025.09.15.00

Diff: https://github.com/facebook/fbthrift/compare/v2025.04.21.00...v2025.09.15.00
This commit is contained in:
Emily
2025-09-16 02:26:59 +01:00
parent feaca716ad
commit 91600d6081
2 changed files with 41 additions and 24 deletions
+12 -12
View File
@@ -1,17 +1,17 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6b2b2a810..1813c88e42 100644
index 492bcccd9a..9c907a87a8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,7 @@ endif ()
@@ -108,7 +108,7 @@
# Find required dependencies for thrift/lib
if (THRIFT_LIB_ONLY OR build_all)
find_package(Gflags REQUIRED)
- find_package(Glog REQUIRED)
+ find_package(Glog CONFIG REQUIRED)
find_package(folly CONFIG REQUIRED)
find_package(fizz CONFIG REQUIRED)
find_package(wangle CONFIG REQUIRED)
@@ -119,7 +119,6 @@ if (THRIFT_LIB_ONLY OR build_all)
find_package(ZLIB REQUIRED)
@@ -120,7 +120,6 @@
find_package(Threads)
include_directories(
${LIBGFLAGS_INCLUDE_DIR}
@@ -23,7 +23,7 @@ diff --git a/thrift/example/cpp2/CMakeLists.txt b/thrift/example/cpp2/CMakeLists
index afa28dad61..318860b3d6 100644
--- a/thrift/example/cpp2/CMakeLists.txt
+++ b/thrift/example/cpp2/CMakeLists.txt
@@ -28,7 +28,7 @@ target_link_libraries(
@@ -28,7 +28,7 @@
thriftcpp2
chatroom-cpp2
${LIBGFLAGS_LIBRARY}
@@ -33,10 +33,10 @@ index afa28dad61..318860b3d6 100644
install(
TARGETS example_server
diff --git a/thrift/lib/cpp/CMakeLists.txt b/thrift/lib/cpp/CMakeLists.txt
index 6461588a86..8b6ed1b030 100644
index 2c65e1f0a8..1e80060100 100644
--- a/thrift/lib/cpp/CMakeLists.txt
+++ b/thrift/lib/cpp/CMakeLists.txt
@@ -45,7 +45,7 @@ target_link_libraries(
@@ -43,7 +43,7 @@
PUBLIC
Folly::folly
${LIBGFLAGS_LIBRARY}
@@ -45,7 +45,7 @@ index 6461588a86..8b6ed1b030 100644
)
add_library(
@@ -121,7 +121,7 @@ target_link_libraries(
@@ -121,7 +121,7 @@
Boost::boost
Folly::folly
wangle::wangle
@@ -54,7 +54,7 @@ index 6461588a86..8b6ed1b030 100644
${OPENSSL_LIBRARIES}
)
@@ -137,7 +137,7 @@ target_link_libraries(
@@ -137,7 +137,7 @@
thriftprotocol
transport
Folly::folly
@@ -64,10 +64,10 @@ index 6461588a86..8b6ed1b030 100644
set(THRIFT1_HEADER_DIRS
diff --git a/thrift/lib/cpp2/CMakeLists.txt b/thrift/lib/cpp2/CMakeLists.txt
index f941688ab0..b3609bbc62 100644
index 03216f5d6f..5f31fc0c64 100644
--- a/thrift/lib/cpp2/CMakeLists.txt
+++ b/thrift/lib/cpp2/CMakeLists.txt
@@ -75,7 +75,7 @@ target_link_libraries(
@@ -75,7 +75,7 @@
Folly::folly
thriftmetadata
thriftprotocol
@@ -76,7 +76,7 @@ index f941688ab0..b3609bbc62 100644
${LIBGFLAGS_LIBRARY}
)
@@ -206,7 +206,7 @@ target_link_libraries(
@@ -207,7 +207,7 @@
thrift
Folly::folly
wangle::wangle
+29 -12
View File
@@ -25,7 +25,7 @@
stdenv.mkDerivation (finalAttrs: {
pname = "fbthrift";
version = "2025.04.21.00";
version = "2025.09.15.00";
outputs = [
# Trying to split this up further into `bin`, `out`, and `dev`
@@ -39,7 +39,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "facebook";
repo = "fbthrift";
tag = "v${finalAttrs.version}";
hash = "sha256-W86jBqq0wC8ZYcE7MQ76rV3axPf7efXieEot6ahonUI=";
hash = "sha256-4u3SbbmSgtvnW3/VH3CfQrEddAlkQuUl9dmnGGKL4mE=";
};
patches = [
@@ -48,16 +48,6 @@ stdenv.mkDerivation (finalAttrs: {
./remove-cmake-install-rpath.patch
./glog-0.7.patch
# Backport upstream build system fixes. Remove on next update.
(fetchpatch {
url = "https://github.com/facebook/fbthrift/commit/638384afb83e5fae29a6483d20f9443b2342ca0b.patch";
hash = "sha256-q0VgaQtwAEgDHZ6btOLSnKfkP2cXstFPxPNdX1wcdCg=";
})
(fetchpatch {
url = "https://github.com/facebook/fbthrift/commit/350955beef40abec1e9d13112c9d2b7f95c29022.patch";
hash = "sha256-SaCZ0iczj8He2wujWN08QpizsTsK6OhreroOHY9f0BA=";
})
];
nativeBuildInputs = [
@@ -101,6 +91,33 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeFeature "CMAKE_SHARED_LINKER_FLAGS" "-Wl,-undefined,dynamic_lookup")
];
# Fix a typo introduced by the following commit that causes hundreds
# of pointless rebuilds when installing:
# <https://github.com/facebook/fbthrift/commit/58038399cefc0c2256ce4ef5444dee37147cbf07>
postPatch = ''
substituteInPlace ThriftLibrary.cmake \
--replace-fail .tcch .tcc
'';
# Copied from Homebrew; fixes the following build error:
#
# [ERROR:/nix/var/nix/b/5f3kn8spg6j0z0xlags8va6sq7/source/thrift/lib/thrift/RpcMetadata.thrift:1] unordered_map::at: key not found
#
# See:
#
# * <https://github.com/facebook/fbthrift/issues/618>
# * <https://github.com/facebook/fbthrift/issues/607>
# * <https://github.com/Homebrew/homebrew-core/blob/2135255c78d026541a4106fa98580795740db694/Formula/f/fbthrift.rb#L52-L55>
#
# I dont know why we didnt need this before the bump to 202
# to 2025.09.08.00 when wed been on LLVM 19 for an entire release
# cycle already, or why were getting different errors to those
# reports, or why this fixes the build anyway. Most of what I do to
# maintain these packages is copy compilation flags from Homebrew
# that scare me. I dont have very much fun with these libraries, to
# be honest with you.
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-fno-assume-unique-vtables";
passthru.updateScript = nix-update-script { };
meta = {