Skip to content
Merged
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
27 changes: 27 additions & 0 deletions pkgs/by-name/ed/edencommon/glog-0.7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d7b3454df..2ce7b5af1a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,8 +50,7 @@
"${CMAKE_CURRENT_SOURCE_DIR}/build/fbcode_builder/CMake"
${CMAKE_MODULE_PATH})

-find_package(Glog MODULE REQUIRED)
-include_directories(${GLOG_INCLUDE_DIR})
+find_package(Glog CONFIG REQUIRED)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth making pull requests for those.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They require signing a CLA and there’s an open Folly issue with a link to the AUR patch that they’ve completely ignored for half a year. These libraries are all thrown‐over‐the‐wall source dumps exported from Facebook’s monorepo that are a pain to build externally; their provided build scripts just download fixed versions of all their dependencies into place, so I’m not sure they care. Agreed that it would be nice for them to fix it upstream though and perhaps I’ll find the time to jump through all the hoops, but I just wanted to get thousands of builds unblocked on staging-next for now.


find_package(Gflags REQUIRED)
include_directories(${GFLAGS_INCLUDE_DIR})
diff --git a/eden/common/testharness/CMakeLists.txt b/eden/common/testharness/CMakeLists.txt
index bef7421906..f35067efa9 100644
--- a/eden/common/testharness/CMakeLists.txt
+++ b/eden/common/testharness/CMakeLists.txt
@@ -19,7 +19,7 @@
${BOOST_LIBRARIES}
Folly::folly_test_util
${LIBGMOCK_LIBRARIES}
- ${GLOG_LIBRARY}
+ glog::glog
)

target_include_directories(
16 changes: 10 additions & 6 deletions pkgs/by-name/ed/edencommon/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

stdenv.mkDerivation (finalAttrs: {
pname = "edencommon";
version = "2024.12.09.00";
version = "2025.01.06.00";

outputs = [
"out"
Expand All @@ -32,13 +32,17 @@ stdenv.mkDerivation (finalAttrs: {
owner = "facebookexperimental";
repo = "edencommon";
tag = "v${finalAttrs.version}";
hash = "sha256-2kn7RCFNpsfyXFWhV7ikXiCCLMND185JRyxAnNq/1ro=";
hash = "sha256-9JCyXFWglnIuDw5jSSqcnuMfQ2JXMdNwFVyyBccjoag=";
};

patches = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
# Test discovery timeout is bizarrely flaky on `x86_64-darwin`
./increase-test-discovery-timeout.patch
];
patches =
[
./glog-0.7.patch
]
++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [
# Test discovery timeout is bizarrely flaky on `x86_64-darwin`
./increase-test-discovery-timeout.patch
];

nativeBuildInputs = [
cmake
Expand Down
29 changes: 29 additions & 0 deletions pkgs/by-name/fb/fb303/glog-0.7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 477b8d6a55..cfeae9ab3f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,7 +56,7 @@

find_package(Gflags REQUIRED)

-find_package(Glog MODULE REQUIRED)
+find_package(Glog CONFIG REQUIRED)

find_package(folly CONFIG REQUIRED)

@@ -88,7 +88,6 @@

target_include_directories(fb303 PUBLIC
${GFLAGS_INCLUDE_DIR}
- ${GLOG_INCLUDE_DIR}
${DOUBLE_CONVERSION_INCLUDE_DIR}
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
$<INSTALL_INTERFACE:${INCLUDE_INSTALL_DIR}>
@@ -98,6 +97,7 @@
fb303_thrift_cpp
Folly::folly
FBThrift::thrift
+ glog::glog
)

install(
8 changes: 6 additions & 2 deletions pkgs/by-name/fb/fb303/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

stdenv.mkDerivation (finalAttrs: {
pname = "fb303";
version = "2024.12.09.00";
version = "2025.01.06.00";

outputs = [
"out"
Expand All @@ -30,9 +30,13 @@ stdenv.mkDerivation (finalAttrs: {
owner = "facebook";
repo = "fb303";
tag = "v${finalAttrs.version}";
hash = "sha256-XG/qW+XT1BVN8ZLTN2lqNBxi0x8fx3n/779BJN2lE4E=";
hash = "sha256-SW1dRo1Wr14eHzYPg7Wm4QypFpNGXeaFlreEVWWyWgs=";
};

patches = [
./glog-0.7.patch
];

nativeBuildInputs = [
cmake
ninja
Expand Down
87 changes: 87 additions & 0 deletions pkgs/by-name/fb/fbthrift/glog-0.7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6b2b2a810..1813c88e42 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -106,7 +106,7 @@ endif ()
# 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(Threads)
include_directories(
${LIBGFLAGS_INCLUDE_DIR}
- ${GLOG_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIR}
${ZSTD_INCLUDE_DIRS}
${Xxhash_INCLUDE_DIR}
diff --git a/thrift/example/cpp2/CMakeLists.txt b/thrift/example/cpp2/CMakeLists.txt
index afa28dad61..318860b3d6 100644
--- a/thrift/example/cpp2/CMakeLists.txt
+++ b/thrift/example/cpp2/CMakeLists.txt
@@ -28,7 +28,7 @@ target_link_libraries(
thriftcpp2
chatroom-cpp2
${LIBGFLAGS_LIBRARY}
- ${GLOG_LIBRARIES}
+ glog::glog
)
install(
TARGETS example_server
diff --git a/thrift/lib/cpp/CMakeLists.txt b/thrift/lib/cpp/CMakeLists.txt
index 6461588a86..8b6ed1b030 100644
--- a/thrift/lib/cpp/CMakeLists.txt
+++ b/thrift/lib/cpp/CMakeLists.txt
@@ -45,7 +45,7 @@ target_link_libraries(
PUBLIC
Folly::folly
${LIBGFLAGS_LIBRARY}
- ${GLOG_LIBRARIES}
+ glog::glog
)

add_library(
@@ -121,7 +121,7 @@ target_link_libraries(
Boost::boost
Folly::folly
wangle::wangle
- ${GLOG_LIBRARIES}
+ glog::glog
${OPENSSL_LIBRARIES}
)

@@ -137,7 +137,7 @@ target_link_libraries(
thriftprotocol
transport
Folly::folly
- ${GLOG_LIBRARIES}
+ glog::glog
)

set(THRIFT1_HEADER_DIRS
diff --git a/thrift/lib/cpp2/CMakeLists.txt b/thrift/lib/cpp2/CMakeLists.txt
index f941688ab0..b3609bbc62 100644
--- a/thrift/lib/cpp2/CMakeLists.txt
+++ b/thrift/lib/cpp2/CMakeLists.txt
@@ -75,7 +75,7 @@ target_link_libraries(
Folly::folly
thriftmetadata
thriftprotocol
- ${GLOG_LIBRARIES}
+ glog::glog
${LIBGFLAGS_LIBRARY}
)

@@ -206,7 +206,7 @@ target_link_libraries(
thrift
Folly::folly
wangle::wangle
- ${GLOG_LIBRARIES}
+ glog::glog
thrift-core
)

6 changes: 4 additions & 2 deletions pkgs/by-name/fb/fbthrift/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

stdenv.mkDerivation (finalAttrs: {
pname = "fbthrift";
version = "2024.12.09.00";
version = "2025.01.06.00";

outputs = [
# Trying to split this up further into `bin`, `out`, and `dev`
Expand All @@ -39,13 +39,15 @@ stdenv.mkDerivation (finalAttrs: {
owner = "facebook";
repo = "fbthrift";
tag = "v${finalAttrs.version}";
hash = "sha256-u0XsGasHaHKXJoADpszwZ/4LnChYofXBdFNZ6UjFUqg=";
hash = "sha256-VIWUh238MJDGxf6j/yanom9SNnNjBBzGbpg/SAquN5E=";
};

patches = [
# Remove a line that breaks the build due to the CMake classic of
# incorrect path concatenation.
./remove-cmake-install-rpath.patch

./glog-0.7.patch
];

nativeBuildInputs = [
Expand Down
30 changes: 30 additions & 0 deletions pkgs/by-name/fi/fizz/glog-0.7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
diff --git a/fizz/CMakeLists.txt b/fizz/CMakeLists.txt
index c60177c2b9..425326c529 100644
--- a/fizz/CMakeLists.txt
+++ b/fizz/CMakeLists.txt
@@ -50,7 +50,7 @@
find_package(fmt CONFIG REQUIRED)

find_package(OpenSSL REQUIRED)
-find_package(Glog REQUIRED)
+find_package(Glog CONFIG REQUIRED)
find_package(Threads REQUIRED)
find_package(Zstd REQUIRED)
if (UNIX AND NOT APPLE)
@@ -198,7 +198,6 @@
${sodium_INCLUDE_DIR}
${ZSTD_INCLUDE_DIR}
PRIVATE
- ${GLOG_INCLUDE_DIRS}
${FIZZ_INCLUDE_DIRECTORIES}
)

@@ -212,7 +211,7 @@
ZLIB::ZLIB
${ZSTD_LIBRARY}
PRIVATE
- ${GLOG_LIBRARIES}
+ glog::glog
${GFLAGS_LIBRARIES}
${FIZZ_LINK_LIBRARIES}
${CMAKE_DL_LIBS}
8 changes: 6 additions & 2 deletions pkgs/by-name/fi/fizz/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

stdenv.mkDerivation (finalAttrs: {
pname = "fizz";
version = "2024.12.09.00";
version = "2025.01.06.00";

outputs = [
"bin"
Expand All @@ -38,9 +38,13 @@ stdenv.mkDerivation (finalAttrs: {
owner = "facebookincubator";
repo = "fizz";
tag = "v${finalAttrs.version}";
hash = "sha256-fdaNIGndj3tCbMHE+nVtw+aTxrlaftz6gs9VFs1ANqs=";
hash = "sha256-ENMWP4CkJHe6Z0qsRNkmgw8NcYQvduAs7jIZLwirsCs=";
};

patches = [
./glog-0.7.patch
];

nativeBuildInputs = [
cmake
ninja
Expand Down
12 changes: 10 additions & 2 deletions pkgs/by-name/fo/folly/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
stdenv,

fetchFromGitHub,
fetchpatch,

cmake,
ninja,
Expand Down Expand Up @@ -39,7 +40,7 @@

stdenv.mkDerivation (finalAttrs: {
pname = "folly";
version = "2024.12.09.00";
version = "2025.01.06.00";

# split outputs to reduce downstream closure sizes
outputs = [
Expand All @@ -51,7 +52,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "facebook";
repo = "folly";
tag = "v${finalAttrs.version}";
hash = "sha256-uX63Zg0Dy5kHdDFYAX7kbVTXUyrWNsdz867VJ0191YI=";
hash = "sha256-GxHOs6jfjiKQWWFs03O/sI92OvpPsf+Xilnawb8Nygs=";
};

nativeBuildInputs = [
Expand Down Expand Up @@ -121,6 +122,13 @@ stdenv.mkDerivation (finalAttrs: {
# The base template for std::char_traits has been removed in LLVM 19
# https://releases.llvm.org/19.1.0/projects/libcxx/docs/ReleaseNotes.html
./char_traits.patch

# <https://github.com/facebook/folly/issues/2171>
(fetchpatch {
name = "folly-fix-glog-0.7.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-cmake-find-glog.patch?h=folly&id=4b68f47338d4b20111e3ffa1291433120bb899f0";
hash = "sha256-QGNpS5UNEm+0PW9+agwUVILzpK9t020KXDGyP03OAwE=";
})
];

# https://github.com/NixOS/nixpkgs/issues/144170
Expand Down
26 changes: 26 additions & 0 deletions pkgs/by-name/mv/mvfst/glog-0.7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a878c7c473..c76c989f91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -52,7 +52,7 @@
find_package(fmt REQUIRED)
find_package(folly REQUIRED)
find_package(Fizz REQUIRED)
-find_package(Glog REQUIRED)
+find_package(Glog CONFIG REQUIRED)
find_package(Threads)

SET(GFLAG_DEPENDENCIES "")
diff --git a/cmake/QuicTest.cmake b/cmake/QuicTest.cmake
index e7d9f0c0c3..5f4525189c 100644
--- a/cmake/QuicTest.cmake
+++ b/cmake/QuicTest.cmake
@@ -50,7 +50,7 @@
target_link_libraries(${QUIC_TEST_TARGET} PUBLIC
"${QUIC_TEST_DEPENDS}"
${LIBGMOCK_LIBRARIES}
- ${GLOG_LIBRARY}
+ glog::glog
)

# Per https://github.com/facebook/mvfst/pull/9, disable some warnings
8 changes: 6 additions & 2 deletions pkgs/by-name/mv/mvfst/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

stdenv.mkDerivation (finalAttrs: {
pname = "mvfst";
version = "2024.12.09.00";
version = "2025.01.06.00";

outputs = [
"bin"
Expand All @@ -33,9 +33,13 @@ stdenv.mkDerivation (finalAttrs: {
owner = "facebook";
repo = "mvfst";
tag = "v${finalAttrs.version}";
hash = "sha256-AZauUGOJxspBLSg3bAV3xviYkH4wm7aPJ8SrD+mPHBM=";
hash = "sha256-xgqVksPcm9CStAK32oNz7DT0CVzFb8ANohNxtyP0iT0=";
};

patches = [
./glog-0.7.patch
];

nativeBuildInputs = [
cmake
ninja
Expand Down
Loading