From ee3cc7dc14f2d2f4bdfe784ceabf72ea393fc9c5 Mon Sep 17 00:00:00 2001 From: Grzegorz Bazior Date: Fri, 31 Mar 2023 17:33:28 +0200 Subject: [PATCH] 1. Added path to fix building benchmark library on MacOS 2. Removed incorrect patches to vcpkg libraries after VCPKG version bump 3. Fixed building for irohad and iroha-cli after after VCPKG version bump (and 3rd part libraries version bump) Signed-off-by: Grzegorz Bazior --- iroha-cli/main.cpp | 1 + irohad/ametsuchi/impl/flat_file/flat_file.cpp | 1 + irohad/ametsuchi/impl/rocksdb_common.hpp | 18 +-- irohad/ametsuchi/impl/rocksdb_wsv_command.cpp | 7 +- irohad/util/shepherd.cpp | 6 +- libs/common/to_string.hpp | 2 +- .../impl/proto_block_json_converter.cpp | 4 +- .../protobuf/json_proto_converter.hpp | 2 +- ...ed-patch-to-enable-building-on-MacOS.patch | 59 ++++++++++ .../0002-rxcpp-from-master-2020-08-22.patch | 69 ------------ .../0005-disable-prometheus-logs.patch | 69 ------------ .../0006-prometheus-remove-self-metrics.patch | 105 ------------------ ...07-repaired-ambiguous-template-usage.patch | 42 ------- ...standard-header-to-benchmark-library.patch | 45 -------- 14 files changed, 82 insertions(+), 348 deletions(-) create mode 100644 vcpkg/patches/0002-Added-patch-to-enable-building-on-MacOS.patch delete mode 100644 vcpkg/patches/0002-rxcpp-from-master-2020-08-22.patch delete mode 100644 vcpkg/patches/0005-disable-prometheus-logs.patch delete mode 100644 vcpkg/patches/0006-prometheus-remove-self-metrics.patch delete mode 100644 vcpkg/patches/0007-repaired-ambiguous-template-usage.patch delete mode 100644 vcpkg/patches/0008-added-missing-standard-header-to-benchmark-library.patch diff --git a/iroha-cli/main.cpp b/iroha-cli/main.cpp index 96c5d87cb43..f131d09a781 100644 --- a/iroha-cli/main.cpp +++ b/iroha-cli/main.cpp @@ -8,6 +8,7 @@ #include #include #include +#include #include "backend/protobuf/proto_block_json_converter.hpp" #include "backend/protobuf/queries/proto_query.hpp" diff --git a/irohad/ametsuchi/impl/flat_file/flat_file.cpp b/irohad/ametsuchi/impl/flat_file/flat_file.cpp index 7d6826933f1..05cf25476d6 100644 --- a/irohad/ametsuchi/impl/flat_file/flat_file.cpp +++ b/irohad/ametsuchi/impl/flat_file/flat_file.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include "common/files.hpp" #include "common/result.hpp" diff --git a/irohad/ametsuchi/impl/rocksdb_common.hpp b/irohad/ametsuchi/impl/rocksdb_common.hpp index f8ea25e1372..71df3a8f7da 100644 --- a/irohad/ametsuchi/impl/rocksdb_common.hpp +++ b/irohad/ametsuchi/impl/rocksdb_common.hpp @@ -590,7 +590,7 @@ namespace iroha::ametsuchi { Args &&... args) { assert(format != nullptr); return expected::makeError( - DbError{code, fmt::format(format, std::forward(args)...)}); + DbError{code, fmt::format(fmt::runtime(format), std::forward(args)...)}); } template @@ -1019,7 +1019,7 @@ namespace iroha::ametsuchi { S const &fmtstring, Args &&... args) { keyBuffer().clear(); - fmt::format_to(keyBuffer(), fmtstring, std::forward(args)...); + fmt::format_to(std::back_inserter(keyBuffer()), fmtstring, std::forward(args)...); valueBuffer().clear(); rocksdb::Slice const slice(keyBuffer().data(), keyBuffer().size()); @@ -1052,7 +1052,7 @@ namespace iroha::ametsuchi { S const &fmtstring, Args &&... args) { keyBuffer().clear(); - fmt::format_to(keyBuffer(), fmtstring, std::forward(args)...); + fmt::format_to(std::back_inserter(keyBuffer()), fmtstring, std::forward(args)...); rocksdb::Slice const slice(keyBuffer().data(), keyBuffer().size()); if (auto c = cache(); c && c->isCacheable(slice.ToStringView()) @@ -1074,7 +1074,7 @@ namespace iroha::ametsuchi { S const &fmtstring, Args &&... args) { keyBuffer().clear(); - fmt::format_to(keyBuffer(), fmtstring, std::forward(args)...); + fmt::format_to(std::back_inserter(keyBuffer()), fmtstring, std::forward(args)...); rocksdb::Slice const slice(keyBuffer().data(), keyBuffer().size()); if (auto c = cache(); c && c->isCacheable(slice.ToStringView())) { @@ -1092,7 +1092,7 @@ namespace iroha::ametsuchi { S const &fmtstring, Args &&... args) { keyBuffer().clear(); - fmt::format_to(keyBuffer(), fmtstring, std::forward(args)...); + fmt::format_to(std::back_inserter(keyBuffer()), fmt::runtime(fmtstring), std::forward(args)...); rocksdb::ReadOptions ro; ro.fill_cache = false; @@ -1112,7 +1112,7 @@ namespace iroha::ametsuchi { S const &fmtstring, Args &&... args) { keyBuffer().clear(); - fmt::format_to(keyBuffer(), fmtstring, std::forward(args)...); + fmt::format_to(std::back_inserter(keyBuffer()), fmtstring, std::forward(args)...); return enumerate(it, std::forward(func)); } @@ -1482,15 +1482,17 @@ namespace iroha::ametsuchi { return value; } - template + template inline expected::Result, DbError> dbCall( RocksDbCommon &common, RocksDBPort::ColumnFamilyType cf_type, + const StrFormat& formatstr, Args &&... args) { auto status = executeOperation( common, - [&] { return fmt::format(std::forward(args)...); }, + [&] { return fmt::format(fmt::runtime(formatstr), std::forward(args)...); }, cf_type, + formatstr, std::forward(args)...); RDB_ERROR_CHECK(status); return loadValue(common, status); diff --git a/irohad/ametsuchi/impl/rocksdb_wsv_command.cpp b/irohad/ametsuchi/impl/rocksdb_wsv_command.cpp index f3fb4a573f2..3089e4d0bea 100644 --- a/irohad/ametsuchi/impl/rocksdb_wsv_command.cpp +++ b/irohad/ametsuchi/impl/rocksdb_wsv_command.cpp @@ -11,7 +11,6 @@ #include "ametsuchi/impl/executor_common.hpp" #include "ametsuchi/impl/rocksdb_common.hpp" #include "ametsuchi/ledger_state.hpp" -#include "backend/protobuf/permissions.hpp" #include "interfaces/common_objects/account.hpp" #include "interfaces/common_objects/account_asset.hpp" #include "interfaces/common_objects/asset.hpp" @@ -149,9 +148,10 @@ namespace iroha::ametsuchi { return {}; }, [&]() { + using underlying_type_for_grantable = std::underlying_type_t; return fmt::format("Insert account {} grantable permission {} for {}", account_id, - permission, + static_cast(permission), permittee_account_id); }); } @@ -189,9 +189,10 @@ namespace iroha::ametsuchi { return {}; }, [&]() { + using underlying_type_for_grantable = std::underlying_type_t; return fmt::format("Delete account {} grantable permission {} for {}", account_id, - permission, + static_cast(permission), permittee_account_id); }); } diff --git a/irohad/util/shepherd.cpp b/irohad/util/shepherd.cpp index f64cd90f621..a867e810dbf 100644 --- a/irohad/util/shepherd.cpp +++ b/irohad/util/shepherd.cpp @@ -4,8 +4,7 @@ */ #include - -#include "util/proto_status_tools.hpp" +#include #include #include "common/irohad_version.hpp" @@ -49,7 +48,8 @@ DEFINE_bool(status, false, "Watch daemon statuses."); DEFINE_validator(status, &validateSingleAction); bool printStatus(const iroha::utility_service::Status &status) { - ::fmt::print("{}", status); + using underlying_statys_type = typename std::underlying_type_t>; + ::fmt::print("{}", static_cast(status)); return true; } diff --git a/libs/common/to_string.hpp b/libs/common/to_string.hpp index a7f4a7b93a0..4b921d15222 100644 --- a/libs/common/to_string.hpp +++ b/libs/common/to_string.hpp @@ -77,7 +77,7 @@ namespace iroha { template inline auto toString(const T &o) -> std::enable_if_t< - boost::optional_detail::is_optional_related::value, + boost::optional_detail::is_optional_or_tag::value, std::string> { return detail::toStringDereferenced(o); } diff --git a/shared_model/backend/protobuf/impl/proto_block_json_converter.cpp b/shared_model/backend/protobuf/impl/proto_block_json_converter.cpp index e428e10fb81..ca7e9ce6fb9 100644 --- a/shared_model/backend/protobuf/impl/proto_block_json_converter.cpp +++ b/shared_model/backend/protobuf/impl/proto_block_json_converter.cpp @@ -24,7 +24,7 @@ ProtoBlockJsonConverter::serialize(const interface::Block &block) const google::protobuf::util::MessageToJsonString(proto_block, &result); if (not status.ok()) { - return iroha::expected::makeError(status.error_message()); + return iroha::expected::makeError(status.message()); } return iroha::expected::makeValue(result); } @@ -35,7 +35,7 @@ ProtoBlockJsonConverter::deserialize( iroha::protocol::Block block; auto status = google::protobuf::util::JsonStringToMessage(json, &block); if (not status.ok()) { - return iroha::expected::makeError(status.error_message()); + return iroha::expected::makeError(status.message()); } std::unique_ptr result = std::make_unique(std::move(block.block_v1())); diff --git a/shared_model/converters/protobuf/json_proto_converter.hpp b/shared_model/converters/protobuf/json_proto_converter.hpp index 1effd86e8c9..1998fa020d5 100644 --- a/shared_model/converters/protobuf/json_proto_converter.hpp +++ b/shared_model/converters/protobuf/json_proto_converter.hpp @@ -45,7 +45,7 @@ namespace shared_model { if (status.ok()) { return result; } - return status.error_message(); + return status.message(); } } // namespace protobuf } // namespace converters diff --git a/vcpkg/patches/0002-Added-patch-to-enable-building-on-MacOS.patch b/vcpkg/patches/0002-Added-patch-to-enable-building-on-MacOS.patch new file mode 100644 index 00000000000..0dd6a010342 --- /dev/null +++ b/vcpkg/patches/0002-Added-patch-to-enable-building-on-MacOS.patch @@ -0,0 +1,59 @@ +From 344a8b3963b3a9075d1e779107b4ce6ea7f73a63 Mon Sep 17 00:00:00 2001 +From: Grzegorz Bazior +Date: Fri, 31 Mar 2023 17:26:11 +0200 +Subject: [PATCH] Added patch to enable building on MacOS + +Signed-off-by: Grzegorz Bazior +--- + ports/benchmark/fixedBuildingForMac.patch | 26 +++++++++++++++++++++++ + ports/benchmark/portfile.cmake | 1 + + 2 files changed, 27 insertions(+) + create mode 100644 ports/benchmark/fixedBuildingForMac.patch + +diff --git a/ports/benchmark/fixedBuildingForMac.patch b/ports/benchmark/fixedBuildingForMac.patch +new file mode 100644 +index 000000000..36a45adf7 +--- /dev/null ++++ b/ports/benchmark/fixedBuildingForMac.patch +@@ -0,0 +1,26 @@ ++From b976cab799c7fb20a5ceadd368431125ac0d99c4 Mon Sep 17 00:00:00 2001 ++From: Grzegorz Bazior ++Date: Fri, 31 Mar 2023 16:20:55 +0200 ++Subject: [PATCH] Fixed building for MacOS - there were unused variable ++ ++Signed-off-by: Your Name ++--- ++ CMakeLists.txt | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/CMakeLists.txt b/CMakeLists.txt ++index 9ab265e..0cc0e4a 100644 ++--- a/CMakeLists.txt +++++ b/CMakeLists.txt ++@@ -20,7 +20,7 @@ option(BENCHMARK_ENABLE_TESTING "Enable testing of the benchmark library." ON) ++ option(BENCHMARK_ENABLE_EXCEPTIONS "Enable the use of exceptions in the benchmark library." ON) ++ option(BENCHMARK_ENABLE_LTO "Enable link time optimisation of the benchmark library." OFF) ++ option(BENCHMARK_USE_LIBCXX "Build and test using libc++ as the standard library." OFF) ++-option(BENCHMARK_ENABLE_WERROR "Build Release candidates with -Werror." ON) +++option(BENCHMARK_ENABLE_WERROR "Build Release candidates with -Werror." OFF) ++ option(BENCHMARK_FORCE_WERROR "Build Release candidates with -Werror regardless of compiler issues." OFF) ++ ++ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "PGI") ++-- ++2.34.1 ++ +diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake +index 8e8cef314..36676e59c 100644 +--- a/ports/benchmark/portfile.cmake ++++ b/ports/benchmark/portfile.cmake +@@ -6,6 +6,7 @@ vcpkg_from_github( + REF v1.7.1 + SHA512 396af1c1d3eaa2b78c6d23b1472f6088db85a294056ae1c2366dc5c0becdc8f141ba8fc3a235033324ab0a41c2298f5d242ef09b9b6f69d9877de6bcb2062efd + HEAD_REF master ++ PATCHES fixedBuildingForMac.patch + ) + + vcpkg_cmake_configure( +-- +2.34.1 + diff --git a/vcpkg/patches/0002-rxcpp-from-master-2020-08-22.patch b/vcpkg/patches/0002-rxcpp-from-master-2020-08-22.patch deleted file mode 100644 index e7b3a190ce5..00000000000 --- a/vcpkg/patches/0002-rxcpp-from-master-2020-08-22.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 3bc6ec0f1e8903d745d6a950f3187432b7a04de8 Mon Sep 17 00:00:00 2001 -From: kuvaldini -Date: Wed, 26 May 2021 18:02:45 +0300 -Subject: [PATCH] rxcpp from master 2020-08-22 - ---- - ports/rxcpp/portfile.cmake | 5 ++-- - ports/rxcpp/support_find_package.patch | 32 -------------------------- - 2 files changed, 2 insertions(+), 35 deletions(-) - delete mode 100644 ports/rxcpp/support_find_package.patch - -diff --git a/ports/rxcpp/portfile.cmake b/ports/rxcpp/portfile.cmake -index b98701132..b11458d3c 100644 ---- a/ports/rxcpp/portfile.cmake -+++ b/ports/rxcpp/portfile.cmake -@@ -1,10 +1,9 @@ - vcpkg_from_github( - OUT_SOURCE_PATH SOURCE_PATH - REPO ReactiveX/RxCpp -- REF v4.1.0 -- SHA512 a92e817ecbdf6f235cae724ada2615af9fa0c243249625d0f2c2f09ff5dd7f53fdabd03a0278fe2995fe27528c5511d71f87b7a6b3d54f73b49b65aef56e32fd -+ REF 9002d9bea0e6b90624672e90a409b56de5286fc6 -+ SHA512 5f4540df6bcb9a980026481a75719201cff0c2e3e957a51dd22d63399138133f13c3a7b5b507124acc635c633d16583768619d62d725a01c40dc31a2b2ece422 - HEAD_REF master -- PATCHES support_find_package.patch - ) - - vcpkg_configure_cmake( -diff --git a/ports/rxcpp/support_find_package.patch b/ports/rxcpp/support_find_package.patch -deleted file mode 100644 -index bb1da2d2d..000000000 ---- a/ports/rxcpp/support_find_package.patch -+++ /dev/null -@@ -1,32 +0,0 @@ --diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt --index 3d0744740..293f187c5 100644 ----- a/projects/CMake/CMakeLists.txt --+++ b/projects/CMake/CMakeLists.txt --@@ -146,3 +146,27 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE CACHE BOOL "Don't require all project -- -- install(DIRECTORY ${RXCPP_DIR}/Rx/v2/src/rxcpp/ DESTINATION include/rxcpp -- FILES_MATCHING PATTERN "*.hpp") --+ --+# Here we are exporting TARGETS so that other projects can import rxcpp --+# just with find_package(rxcpp CONFIG) after rxcpp is installed into system by "make install". --+add_library(rxcpp INTERFACE) --+ --+target_include_directories(rxcpp INTERFACE --+ $ --+ $ --+) --+ --+install(TARGETS rxcpp EXPORT rxcppConfig) --+install(EXPORT rxcppConfig DESTINATION share/rxcpp/cmake) --+ --+# When find_package(rxcpp SOME_VERSION REQUIRED) will be used in third party project --+# where SOME_VERSION is any version incompatible with ${PROJECT_VERSION} then cmake will generate the error. --+# It means you don't need track versions manually. --+include(CMakePackageConfigHelpers) --+write_basic_package_version_file("${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" --+ VERSION --+ ${PROJECT_VERSION} --+ COMPATIBILITY --+ AnyNewerVersion --+) --+install(FILES "${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" DESTINATION share/rxcpp/cmake) --- -2.31.1 - diff --git a/vcpkg/patches/0005-disable-prometheus-logs.patch b/vcpkg/patches/0005-disable-prometheus-logs.patch deleted file mode 100644 index 739bc39f4f0..00000000000 --- a/vcpkg/patches/0005-disable-prometheus-logs.patch +++ /dev/null @@ -1,69 +0,0 @@ -diff --git a/ports/prometheus-cpp/Add-CivetCallbacks-to-Exposer.patch b/ports/prometheus-cpp/Add-CivetCallbacks-to-Exposer.patch -new file mode 100644 -index 000000000..0a237dd54 ---- /dev/null -+++ b/ports/prometheus-cpp/Add-CivetCallbacks-to-Exposer.patch -@@ -0,0 +1,51 @@ -+diff --git a/pull/include/prometheus/exposer.h b/pull/include/prometheus/exposer.h -+index 3e4e01c..6a9c3ff 100644 -+--- a/pull/include/prometheus/exposer.h -++++ b/pull/include/prometheus/exposer.h -+@@ -10,6 +10,7 @@ -+ #include "prometheus/detail/pull_export.h" -+ -+ class CivetServer; -++class CivetCallbacks; -+ -+ namespace prometheus { -+ -+@@ -20,8 +21,9 @@ class Endpoint; -+ class PROMETHEUS_CPP_PULL_EXPORT Exposer { -+ public: -+ explicit Exposer(const std::string& bind_address, -+- const std::size_t num_threads = 2); -+- explicit Exposer(std::vector options); -++ const std::size_t num_threads = 2, -++ const CivetCallbacks *callbacks = nullptr); -++ explicit Exposer(std::vector options, const CivetCallbacks *callbacks = nullptr); -+ ~Exposer(); -+ void RegisterCollectable(const std::weak_ptr& collectable, -+ const std::string& uri = std::string("/metrics")); -+diff --git a/pull/src/exposer.cc b/pull/src/exposer.cc -+index ac53bc8..df1dbaa 100644 -+--- a/pull/src/exposer.cc -++++ b/pull/src/exposer.cc -+@@ -11,13 +11,18 @@ -+ -+ namespace prometheus { -+ -+-Exposer::Exposer(const std::string& bind_address, const std::size_t num_threads) -++Exposer::Exposer(const std::string& bind_address, -++ const std::size_t num_threads, -++ const CivetCallbacks *callbacks) -+ : Exposer(std::vector{"listening_ports", bind_address, -+ "num_threads", -+- std::to_string(num_threads)}) {} -++ std::to_string(num_threads)}, -++ callbacks) {} -+ -+-Exposer::Exposer(std::vector options) -+- : server_(detail::make_unique(std::move(options))) {} -++Exposer::Exposer(std::vector options, -++ const CivetCallbacks *callbacks) -++ : server_(detail::make_unique(std::move(options), -++ callbacks)) {} -+ -+ Exposer::~Exposer() = default; -+ -diff --git a/ports/prometheus-cpp/portfile.cmake b/ports/prometheus-cpp/portfile.cmake -index c6048af18..4a9a749d5 100644 ---- a/ports/prometheus-cpp/portfile.cmake -+++ b/ports/prometheus-cpp/portfile.cmake -@@ -8,6 +8,7 @@ vcpkg_from_github( - REF 2412990ee9ad89245e7d1df9ec85ab19b24674d3 # v0.12.2 - SHA512 52ecf1984c709dab749f2b4b0010796be49b9db5416678baf77f645054f85b1cae4d67f06ffb1643c0fbcfbf2e65c81f2157a22c0b75a346f9b1feba6537b87d - HEAD_REF master -+ PATCHES Add-CivetCallbacks-to-Exposer.patch - ) - - macro(feature FEATURENAME OPTIONNAME) diff --git a/vcpkg/patches/0006-prometheus-remove-self-metrics.patch b/vcpkg/patches/0006-prometheus-remove-self-metrics.patch deleted file mode 100644 index 965fe8aef8d..00000000000 --- a/vcpkg/patches/0006-prometheus-remove-self-metrics.patch +++ /dev/null @@ -1,105 +0,0 @@ -diff --git a/ports/prometheus-cpp/portfile.cmake b/ports/prometheus-cpp/portfile.cmake -index 4a9a749d5..4b49237c3 100644 ---- a/ports/prometheus-cpp/portfile.cmake -+++ b/ports/prometheus-cpp/portfile.cmake -@@ -8,7 +8,7 @@ vcpkg_from_github( - REF 2412990ee9ad89245e7d1df9ec85ab19b24674d3 # v0.12.2 - SHA512 52ecf1984c709dab749f2b4b0010796be49b9db5416678baf77f645054f85b1cae4d67f06ffb1643c0fbcfbf2e65c81f2157a22c0b75a346f9b1feba6537b87d - HEAD_REF master -- PATCHES Add-CivetCallbacks-to-Exposer.patch -+ PATCHES Add-CivetCallbacks-to-Exposer.patch remove-handler-self-metrics.patch - ) - - macro(feature FEATURENAME OPTIONNAME) -diff --git a/ports/prometheus-cpp/remove-handler-self-metrics.patch b/ports/prometheus-cpp/remove-handler-self-metrics.patch -new file mode 100644 -index 000000000..a26427035 ---- /dev/null -+++ b/ports/prometheus-cpp/remove-handler-self-metrics.patch -@@ -0,0 +1,86 @@ -+diff --git a/pull/src/handler.cc b/pull/src/handler.cc -+index cec37f3..d0b0bdf 100644 -+--- a/pull/src/handler.cc -++++ b/pull/src/handler.cc -+@@ -23,25 +23,25 @@ -+ namespace prometheus { -+ namespace detail { -+ -+-MetricsHandler::MetricsHandler(Registry& registry) -+- : bytes_transferred_family_( -+- BuildCounter() -+- .Name("exposer_transferred_bytes_total") -+- .Help("Transferred bytes to metrics services") -+- .Register(registry)), -+- bytes_transferred_(bytes_transferred_family_.Add({})), -+- num_scrapes_family_(BuildCounter() -+- .Name("exposer_scrapes_total") -+- .Help("Number of times metrics were scraped") -+- .Register(registry)), -+- num_scrapes_(num_scrapes_family_.Add({})), -+- request_latencies_family_( -+- BuildSummary() -+- .Name("exposer_request_latencies") -+- .Help("Latencies of serving scrape requests, in microseconds") -+- .Register(registry)), -+- request_latencies_(request_latencies_family_.Add( -+- {}, Summary::Quantiles{{0.5, 0.05}, {0.9, 0.01}, {0.99, 0.001}})) {} -++MetricsHandler::MetricsHandler(Registry& registry) {} -++ // : bytes_transferred_family_( -++ // BuildCounter() -++ // .Name("exposer_transferred_bytes_total") -++ // .Help("Transferred bytes to metrics services") -++ // .Register(registry)), -++ // bytes_transferred_(bytes_transferred_family_.Add({})), -++ // num_scrapes_family_(BuildCounter() -++ // .Name("exposer_scrapes_total") -++ // .Help("Number of times metrics were scraped") -++ // .Register(registry)), -++ // num_scrapes_(num_scrapes_family_.Add({})), -++ // request_latencies_family_( -++ // BuildSummary() -++ // .Name("exposer_request_latencies") -++ // .Help("Latencies of serving scrape requests, in microseconds") -++ // .Register(registry)), -++ // request_latencies_(request_latencies_family_.Add( -++ // {}, Summary::Quantiles{{0.5, 0.05}, {0.9, 0.01}, {0.99, 0.001}})) {} -+ -+ #ifdef HAVE_ZLIB -+ static bool IsEncodingAccepted(struct mg_connection* conn, -+@@ -158,10 +158,10 @@ bool MetricsHandler::handleGet(CivetServer*, struct mg_connection* conn) { -+ auto stop_time_of_request = std::chrono::steady_clock::now(); -+ auto duration = std::chrono::duration_cast( -+ stop_time_of_request - start_time_of_request); -+- request_latencies_.Observe(duration.count()); -++ // request_latencies_.Observe(duration.count()); -+ -+- bytes_transferred_.Increment(bodySize); -+- num_scrapes_.Increment(); -++ // bytes_transferred_.Increment(bodySize); -++ // num_scrapes_.Increment(); -+ return true; -+ } -+ -+diff --git a/pull/src/handler.h b/pull/src/handler.h -+index 10c90f9..94c433c 100644 -+--- a/pull/src/handler.h -++++ b/pull/src/handler.h -+@@ -28,12 +28,12 @@ class MetricsHandler : public CivetHandler { -+ -+ std::mutex collectables_mutex_; -+ std::vector> collectables_; -+- Family& bytes_transferred_family_; -+- Counter& bytes_transferred_; -+- Family& num_scrapes_family_; -+- Counter& num_scrapes_; -+- Family& request_latencies_family_; -+- Summary& request_latencies_; -++ // Family& bytes_transferred_family_; -++ // Counter& bytes_transferred_; -++ // Family& num_scrapes_family_; -++ // Counter& num_scrapes_; -++ // Family& request_latencies_family_; -++ // Summary& request_latencies_; -+ }; -+ } // namespace detail -+ } // namespace prometheus diff --git a/vcpkg/patches/0007-repaired-ambiguous-template-usage.patch b/vcpkg/patches/0007-repaired-ambiguous-template-usage.patch deleted file mode 100644 index ba4ba41969e..00000000000 --- a/vcpkg/patches/0007-repaired-ambiguous-template-usage.patch +++ /dev/null @@ -1,42 +0,0 @@ -commit 53763b4e3ff1174e823b8adf6326746e3ea940b5 -Author: Grzegorz Bazior -Date: Mon Oct 24 01:53:56 2022 +0200 - - Added patch file to repair building of abseil library: std::max ambiguous call - - Signed-off-by: Grzegorz Bazior - - -diff --git a/ports/abseil/portfile.cmake b/ports/abseil/portfile.cmake -index 94a7673c0..5f8384c32 100644 ---- a/ports/abseil/portfile.cmake -+++ b/ports/abseil/portfile.cmake -@@ -15,6 +15,7 @@ vcpkg_from_github( - # detection can cause ABI issues depending on which compiler options - # are enabled for consuming user code - fix-cxx-standard.patch -+ repaired-ambiguous-template-usage.patch - ) - - vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS - - -diff --git a/abseil/repaired-ambiguous-template-usage.patch b/abseil/repaired-ambiguous-template-usage.patch -new file mode 100644 -index 000000000..35221a4c9 ---- /dev/null -+++ b/ports/abseil/repaired-ambiguous-template-usage.patch -@@ -0,0 +1,13 @@ -+diff --git a/absl/debugging/failure_signal_handler.cc b/absl/debugging/failure_signal_handler.cc -+index a9ed6ef..a32e7c5 100644 -+--- a/absl/debugging/failure_signal_handler.cc -++++ b/absl/debugging/failure_signal_handler.cc -+@@ -136,7 +136,7 @@ static bool SetupAlternateStackOnce() { -+ #else -+ const size_t page_mask = sysconf(_SC_PAGESIZE) - 1; -+ #endif -+- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; -++ size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask; -+ #if defined(ABSL_HAVE_ADDRESS_SANITIZER) || \ -+ defined(ABSL_HAVE_MEMORY_SANITIZER) || defined(ABSL_HAVE_THREAD_SANITIZER) -+ // Account for sanitizer instrumentation requiring additional stack space. diff --git a/vcpkg/patches/0008-added-missing-standard-header-to-benchmark-library.patch b/vcpkg/patches/0008-added-missing-standard-header-to-benchmark-library.patch deleted file mode 100644 index aa2dd6c58ec..00000000000 --- a/vcpkg/patches/0008-added-missing-standard-header-to-benchmark-library.patch +++ /dev/null @@ -1,45 +0,0 @@ -commit 2bf68c00af259a86c6407bdf9fbfb481a220b2e0 -Author: Grzegorz Bazior -Date: Mon Oct 24 23:24:40 2022 +0200 - - Added patch which adds missing header to std::numeric_limits to benchmark library - - Signed-off-by: Grzegorz Bazior - -diff --git a/ports/benchmark/added-missing-standard-header.patch b/ports/benchmark/added-missing-standard-header.patch -new file mode 100644 -index 000000000..fc191c125 ---- /dev/null -+++ b/ports/benchmark/added-missing-standard-header.patch -@@ -0,0 +1,12 @@ -+diff --git a/src/benchmark_register.h b/src/benchmark_register.h -+index 61377d7..204bf1d 100644 -+--- a/src/benchmark_register.h -++++ b/src/benchmark_register.h -+@@ -1,6 +1,7 @@ -+ #ifndef BENCHMARK_REGISTER_H -+ #define BENCHMARK_REGISTER_H -+ -++#include -+ #include -+ -+ #include "check.h" -diff --git a/ports/benchmark/portfile.cmake b/ports/benchmark/portfile.cmake -index 7f4add94c..1b8b88457 100644 ---- a/ports/benchmark/portfile.cmake -+++ b/ports/benchmark/portfile.cmake -@@ -9,6 +9,7 @@ vcpkg_from_github( - REF 73d4d5e8d6d449fc8663765a42aa8aeeee844489 # v1.5.2 - SHA512 b87a7c207eb85187165df8ff99ab1bbf5d38fc2a6d839e267a71987951c94e33b55fd7fbee6f2b59202b0379a7e9705b73b193edaea0b9c742eddf3fcbe5f48e - HEAD_REF master -+ PATCHES added-missing-standard-header.patch - ) - - vcpkg_configure_cmake( -@@ -30,4 +31,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) - file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share) - - # Handle copyright --file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) -\ No newline at end of file -+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)