diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index e671ea0e734..f118d499b15 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,10 +1,9 @@ package=boost -$(package)_version=1_72_0 -$(package)_download_path=https://github.com/KomodoPlatform/boost/releases/download/boost-1.72.0-kmd -$(package)_sha256_hash=59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417cc660722 -$(package)_file_name=$(package)_$($(package)_version).tar.bz2 -$(package)_patches=fix-Solaris.patch ignore_wnonnull_gcc_11.patch +$(package)_version=1.78.0 +$(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$($(package)_version)/source/ +$(package)_sha256_hash=8681f175d4bdb26c52222665793eef08490d7758529330f98d3b29dd0735bccc +$(package)_file_name=boost_$(subst .,_,$($(package)_version)).tar.bz2 define $(package)_set_vars $(package)_config_opts_release=variant=release @@ -28,9 +27,7 @@ endef define $(package)_preprocess_cmds - echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam&& \ - patch -p1 < $($(package)_patch_dir)/fix-Solaris.patch &&\ - patch -p2 < $($(package)_patch_dir)/ignore_wnonnull_gcc_11.patch + echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$(boost_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef define $(package)_config_cmds diff --git a/depends/patches/boost/fix-Solaris.patch b/depends/patches/boost/fix-Solaris.patch deleted file mode 100644 index cb800609215..00000000000 --- a/depends/patches/boost/fix-Solaris.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 74fb0a26099bc51d717f5f154b37231ce7df3e98 Mon Sep 17 00:00:00 2001 -From: Rob Boehne -Date: Wed, 20 Nov 2019 11:25:20 -0600 -Subject: [PATCH] Revert change to elide a warning that caused Solaris builds to fail. - ---- - boost/thread/pthread/thread_data.hpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/boost/thread/pthread/thread_data.hpp b/boost/thread/pthread/thread_data.hpp -index aefbeb43c..bc9b1367a 100644 ---- a/boost/thread/pthread/thread_data.hpp -+++ b/boost/thread/pthread/thread_data.hpp -@@ -57,7 +57,7 @@ namespace boost - #else - std::size_t page_size = ::sysconf( _SC_PAGESIZE); - #endif --#if PTHREAD_STACK_MIN > 0 -- if (size(PTHREAD_STACK_MIN)) size=PTHREAD_STACK_MIN; - #endif - size = ((size+page_size-1)/page_size)*page_size; diff --git a/depends/patches/boost/ignore_wnonnull_gcc_11.patch b/depends/patches/boost/ignore_wnonnull_gcc_11.patch deleted file mode 100644 index f914c1e6826..00000000000 --- a/depends/patches/boost/ignore_wnonnull_gcc_11.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/include/boost/concept/detail/general.hpp b/include/boost/concept/detail/general.hpp -index eeb08750..8d7d6f69 100644 ---- a/include/boost/concept/detail/general.hpp -+++ b/include/boost/concept/detail/general.hpp -@@ -28,7 +28,14 @@ namespace detail - template - struct requirement - { -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic push -+# pragma GCC diagnostic ignored "-Wnonnull" -+# endif - static void failed() { ((Model*)0)->~Model(); } -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic pop -+# endif - }; - - struct failed {}; -@@ -36,7 +43,14 @@ struct failed {}; - template - struct requirement - { -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic push -+# pragma GCC diagnostic ignored "-Wnonnull" -+# endif - static void failed() { ((Model*)0)->~Model(); } -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic pop -+# endif - }; - - # ifdef BOOST_OLD_CONCEPT_SUPPORT -@@ -44,7 +58,14 @@ struct requirement - template - struct constraint - { -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic push -+# pragma GCC diagnostic ignored "-Wnonnull" -+# endif - static void failed() { ((Model*)0)->constraints(); } -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic pop -+# endif - }; - - template -diff --git a/include/boost/concept/usage.hpp b/include/boost/concept/usage.hpp -index 373de63a..fe88b5f5 100644 ---- a/include/boost/concept/usage.hpp -+++ b/include/boost/concept/usage.hpp -@@ -13,7 +13,14 @@ namespace boost { namespace concepts { - template - struct usage_requirements - { -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic push -+# pragma GCC diagnostic ignored "-Wnonnull" -+# endif - ~usage_requirements() { ((Model*)0)->~Model(); } -+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000) -+# pragma GCC diagnostic pop -+# endif - }; - - # if BOOST_WORKAROUND(__GNUC__, <= 3) diff --git a/src/init.cpp b/src/init.cpp index 734a797fa3a..c75f277afec 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -74,7 +74,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index b6755a47fba..c19c2582582 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -34,7 +34,7 @@ #include -#include +#include #include #include #include @@ -78,12 +78,12 @@ void RPCServer::OnStopped(boost::function slot) void RPCServer::OnPreCommand(boost::function slot) { - g_rpcSignals.PreCommand.connect(boost::bind(slot, _1)); + g_rpcSignals.PreCommand.connect(boost::bind(slot, boost::placeholders::_1)); } void RPCServer::OnPostCommand(boost::function slot) { - g_rpcSignals.PostCommand.connect(boost::bind(slot, _1)); + g_rpcSignals.PostCommand.connect(boost::bind(slot, boost::placeholders::_1)); } void RPCTypeCheck(const UniValue& params, diff --git a/src/scheduler.cpp b/src/scheduler.cpp index 08aba322531..fde989134f7 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -22,7 +22,7 @@ #include "reverselock.h" #include -#include +#include #include CScheduler::CScheduler() : nThreadsServicingQueue(0), stopRequested(false), stopWhenEmpty(false) diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp index d6c93ef3bca..6340b1eda97 100644 --- a/src/test/scheduler_tests.cpp +++ b/src/test/scheduler_tests.cpp @@ -7,7 +7,7 @@ #include "test/test_bitcoin.h" -#include +#include #include #include #include diff --git a/src/torcontrol.cpp b/src/torcontrol.cpp index a5bd149b2e5..1ba85b08c69 100644 --- a/src/torcontrol.cpp +++ b/src/torcontrol.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -461,8 +461,8 @@ TorController::TorController(struct event_base* baseIn, const std::string& targe if (!reconnect_ev) LogPrintf("tor: Failed to create event for reconnection: out of memory?\n"); // Start connection attempts immediately - if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this, _1), - boost::bind(&TorController::disconnected_cb, this, _1) )) { + if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this, boost::placeholders::_1), + boost::bind(&TorController::disconnected_cb, this, boost::placeholders::_1) )) { LogPrintf("tor: Initiating connection to Tor control port %s failed\n", target); } // Read service private key if cached @@ -540,7 +540,7 @@ void TorController::auth_cb(TorControlConnection& conn, const TorControlReply& r // Note that the 'virtual' port doesn't have to be the same as our internal port, but this is just a convenient // choice. TODO; refactor the shutdown sequence some day. conn.Command(strprintf("ADD_ONION %s Port=%i,127.0.0.1:%i", private_key, GetListenPort(), GetListenPort()), - boost::bind(&TorController::add_onion_cb, this, _1, _2)); + boost::bind(&TorController::add_onion_cb, this, boost::placeholders::_1, boost::placeholders::_2)); } else { LogPrintf("tor: Authentication failed\n"); } @@ -599,7 +599,7 @@ void TorController::authchallenge_cb(TorControlConnection& conn, const TorContro } std::vector computedClientHash = ComputeResponse(TOR_SAFE_CLIENTKEY, cookie, clientNonce, serverNonce); - conn.Command("AUTHENTICATE " + HexStr(computedClientHash), boost::bind(&TorController::auth_cb, this, _1, _2)); + conn.Command("AUTHENTICATE " + HexStr(computedClientHash), boost::bind(&TorController::auth_cb, this, boost::placeholders::_1, boost::placeholders::_2)); } else { LogPrintf("tor: Invalid reply to AUTHCHALLENGE\n"); } @@ -648,23 +648,23 @@ void TorController::protocolinfo_cb(TorControlConnection& conn, const TorControl if (methods.count("HASHEDPASSWORD")) { LogPrint("tor", "tor: Using HASHEDPASSWORD authentication\n"); boost::replace_all(torpassword, "\"", "\\\""); - conn.Command("AUTHENTICATE \"" + torpassword + "\"", boost::bind(&TorController::auth_cb, this, _1, _2)); + conn.Command("AUTHENTICATE \"" + torpassword + "\"", boost::bind(&TorController::auth_cb, this, boost::placeholders::_1, boost::placeholders::_2)); } else { LogPrintf("tor: Password provided with -torpassword, but HASHEDPASSWORD authentication is not available\n"); } } else if (methods.count("NULL")) { LogPrint("tor", "tor: Using NULL authentication\n"); - conn.Command("AUTHENTICATE", boost::bind(&TorController::auth_cb, this, _1, _2)); + conn.Command("AUTHENTICATE", boost::bind(&TorController::auth_cb, this, boost::placeholders::_1, boost::placeholders::_2)); } else if (methods.count("SAFECOOKIE")) { // Cookie: hexdump -e '32/1 "%02x""\n"' ~/.tor/control_auth_cookie LogPrint("tor", "tor: Using SAFECOOKIE authentication, reading cookie authentication from %s\n", cookiefile); std::pair status_cookie = ReadBinaryFile(cookiefile, TOR_COOKIE_SIZE); if (status_cookie.first && status_cookie.second.size() == TOR_COOKIE_SIZE) { - // conn.Command("AUTHENTICATE " + HexStr(status_cookie.second), boost::bind(&TorController::auth_cb, this, _1, _2)); + // conn.Command("AUTHENTICATE " + HexStr(status_cookie.second), boost::bind(&TorController::auth_cb, this, boost::placeholders::_1, boost::placeholders::_2)); cookie = std::vector(status_cookie.second.begin(), status_cookie.second.end()); clientNonce = std::vector(TOR_NONCE_SIZE, 0); GetRandBytes(&clientNonce[0], TOR_NONCE_SIZE); - conn.Command("AUTHCHALLENGE SAFECOOKIE " + HexStr(clientNonce), boost::bind(&TorController::authchallenge_cb, this, _1, _2)); + conn.Command("AUTHCHALLENGE SAFECOOKIE " + HexStr(clientNonce), boost::bind(&TorController::authchallenge_cb, this, boost::placeholders::_1, boost::placeholders::_2)); } else { if (status_cookie.first) { LogPrintf("tor: Authentication cookie %s is not exactly %i bytes, as is required by the spec\n", cookiefile, TOR_COOKIE_SIZE); @@ -686,7 +686,7 @@ void TorController::connected_cb(TorControlConnection& conn) { reconnect_timeout = RECONNECT_TIMEOUT_START; // First send a PROTOCOLINFO command to figure out what authentication is expected - if (!conn.Command("PROTOCOLINFO 1", boost::bind(&TorController::protocolinfo_cb, this, _1, _2))) + if (!conn.Command("PROTOCOLINFO 1", boost::bind(&TorController::protocolinfo_cb, this, boost::placeholders::_1, boost::placeholders::_2))) LogPrintf("tor: Error sending initial protocolinfo command\n"); } @@ -713,8 +713,8 @@ void TorController::Reconnect() /* Try to reconnect and reestablish if we get booted - for example, Tor * may be restarting. */ - if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this, _1), - boost::bind(&TorController::disconnected_cb, this, _1) )) { + if (!conn.Connect(target, boost::bind(&TorController::connected_cb, this, boost::placeholders::_1), + boost::bind(&TorController::disconnected_cb, this, boost::placeholders::_1) )) { LogPrintf("tor: Re-initiating connection to Tor control port %s failed\n", target); } } diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp index d01e8a849b5..a9ab52bad6f 100644 --- a/src/validationinterface.cpp +++ b/src/validationinterface.cpp @@ -13,27 +13,27 @@ CMainSignals& GetMainSignals() } void RegisterValidationInterface(CValidationInterface* pwalletIn) { - g_signals.UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1)); - g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2)); - g_signals.EraseTransaction.connect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, _1)); - g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1)); + g_signals.UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, boost::placeholders::_1)); + g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, boost::placeholders::_1, boost::placeholders::_2)); + g_signals.EraseTransaction.connect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, boost::placeholders::_1)); + g_signals.UpdatedTransaction.connect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, boost::placeholders::_1)); g_signals.RescanWallet.connect(boost::bind(&CValidationInterface::RescanWallet, pwalletIn)); - g_signals.ChainTip.connect(boost::bind(&CValidationInterface::ChainTip, pwalletIn, _1, _2, _3, _4, _5)); - g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1)); - g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1)); - g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2)); + g_signals.ChainTip.connect(boost::bind(&CValidationInterface::ChainTip, pwalletIn, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5)); + g_signals.SetBestChain.connect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, boost::placeholders::_1)); + g_signals.Broadcast.connect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, boost::placeholders::_1)); + g_signals.BlockChecked.connect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, boost::placeholders::_1, boost::placeholders::_2)); } void UnregisterValidationInterface(CValidationInterface* pwalletIn) { - g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, _1, _2)); - g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, _1)); - g_signals.ChainTip.disconnect(boost::bind(&CValidationInterface::ChainTip, pwalletIn, _1, _2, _3, _4, _5)); - g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, _1)); - g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, _1)); - g_signals.EraseTransaction.disconnect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, _1)); - g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2)); + g_signals.BlockChecked.disconnect(boost::bind(&CValidationInterface::BlockChecked, pwalletIn, boost::placeholders::_1, boost::placeholders::_2)); + g_signals.Broadcast.disconnect(boost::bind(&CValidationInterface::ResendWalletTransactions, pwalletIn, boost::placeholders::_1)); + g_signals.ChainTip.disconnect(boost::bind(&CValidationInterface::ChainTip, pwalletIn, boost::placeholders::_1, boost::placeholders::_2, boost::placeholders::_3, boost::placeholders::_4, boost::placeholders::_5)); + g_signals.SetBestChain.disconnect(boost::bind(&CValidationInterface::SetBestChain, pwalletIn, boost::placeholders::_1)); + g_signals.UpdatedTransaction.disconnect(boost::bind(&CValidationInterface::UpdatedTransaction, pwalletIn, boost::placeholders::_1)); + g_signals.EraseTransaction.disconnect(boost::bind(&CValidationInterface::EraseFromWallet, pwalletIn, boost::placeholders::_1)); + g_signals.SyncTransaction.disconnect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, boost::placeholders::_1, boost::placeholders::_2)); g_signals.RescanWallet.disconnect(boost::bind(&CValidationInterface::RescanWallet, pwalletIn)); - g_signals.UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1)); + g_signals.UpdatedBlockTip.disconnect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, boost::placeholders::_1)); } void UnregisterAllValidationInterfaces() {