From 0fd8f271068ecc725502fe767be62f058b90bf41 Mon Sep 17 00:00:00 2001 From: Edward Tremel Date: Thu, 17 Oct 2024 16:08:48 -0400 Subject: [PATCH] Upgraded spdlog dependency to 1.12 The spdlog library introduced some non-backward-compatible changes between version 1.9.2 (packaged with Ubuntu 22.04) and version 1.12 (packaged with Ubuntu 24.04). Specifically, standard library containers are only log-printable if the new header is included, and user-defined types are only log-printable if they explicitly specialize fmt::formatter (including is no longer sufficient). --- CMakeLists.txt | 2 +- include/derecho/utils/logger.hpp | 1 + src/applications/tests/unit_tests/client_callback_mockup.hpp | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8a2defe..e585ad53 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ find_package(mutils REQUIRED) find_package(mutils-containers REQUIRED) # Target: spdlog::spdlog -find_package(spdlog 1.3.1...1.9.2 REQUIRED) +find_package(spdlog 1.12.0 REQUIRED) # Target: OpenSSL::Crypto and OpenSSL::ssl find_package(OpenSSL 1.1.1 REQUIRED) diff --git a/include/derecho/utils/logger.hpp b/include/derecho/utils/logger.hpp index c6919c03..52d04171 100644 --- a/include/derecho/utils/logger.hpp +++ b/include/derecho/utils/logger.hpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/src/applications/tests/unit_tests/client_callback_mockup.hpp b/src/applications/tests/unit_tests/client_callback_mockup.hpp index f4137bed..6b521177 100644 --- a/src/applications/tests/unit_tests/client_callback_mockup.hpp +++ b/src/applications/tests/unit_tests/client_callback_mockup.hpp @@ -76,6 +76,9 @@ enum class ClientCallbackType { std::ostream& operator<<(std::ostream& os, const ClientCallbackType& cb_type); +template <> +struct fmt::formatter : fmt::ostream_formatter {}; + /** * Structure used by StorageNode to pass callback requests from the * register_callback RPC function to the callback-sending thread.