I just had this problem happen... On Mac OS 12.4, I installed boost with homebrew, and it was installed to /opt/homebrew/Cellar/boost/1.82.0_1
When I ran ./configure
I got:
checking whether the Boost::System library is available... no
checking whether the Boost::Filesystem library is available... no
checking whether the Boost::Program_Options library is available... no
checking whether the Boost::Thread library is available... no
checking whether the Boost::Chrono library is available... no
checking whether the Boost::Unit_Test_Framework library is available... no
checking for dynamic linked boost test... no
checking for mismatched boost c++11 scoped enums... ok
configure: error: No working boost sleep implementation found.
So I added the with-boost flag with that path: ./configure --with-boost=/opt/homebrew/Cellar/boost/1.82.0_1
And then it worked. But running make
failed for various reasons such as missing import statements, std::placeholder conflicting with boost::placeholder and other reasons... So I had to make the following changes:
diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index e1763c6ad..66390c4e3 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <string.h>
+#include <deque>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
diff --git a/src/miner.h b/src/miner.h
index 3ba92b16b..993bde682 100644
--- a/src/miner.h
+++ b/src/miner.h
@@ -73,7 +73,7 @@ struct modifiedentry_iter {
// except operating on CTxMemPoolModifiedEntry.
// TODO: refactor to avoid duplication of this logic.
struct CompareModifiedEntry {
- bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b)
+ bool operator()(const CTxMemPoolModifiedEntry &a, const CTxMemPoolModifiedEntry &b) const
{
double f1 = (double)a.nModFeesWithAncestors * b.nSizeWithAncestors;
double f2 = (double)b.nModFeesWithAncestors * a.nSizeWithAncestors;
@@ -88,7 +88,7 @@ struct CompareModifiedEntry {
// This is sufficient to sort an ancestor package in an order that is valid
// to appear in a block.
struct CompareTxIterByAncestorCount {
- bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b)
+ bool operator()(const CTxMemPool::txiter &a, const CTxMemPool::txiter &b) const
{
if (a->GetCountWithAncestors() != b->GetCountWithAncestors())
return a->GetCountWithAncestors() < b->GetCountWithAncestors();
diff --git a/src/net_processing.cpp b/src/net_processing.cpp
index 3ec1a1c27..54a6c5f36 100644
--- a/src/net_processing.cpp
+++ b/src/net_processing.cpp
@@ -31,6 +31,7 @@
#include "validationinterface.h"
#include <boost/thread.hpp>
+#include <array>
#if defined(NDEBUG)
# error "Bitcoin cannot be compiled without assertions."
diff --git a/src/test/cuckoocache_tests.cpp b/src/test/cuckoocache_tests.cpp
index 00446aa11..29bc0acc7 100644
--- a/src/test/cuckoocache_tests.cpp
+++ b/src/test/cuckoocache_tests.cpp
@@ -7,6 +7,7 @@
#include "random.h"
#include <thread>
#include <boost/thread.hpp>
+#include <deque>
/** Test Suite for CuckooCache
diff --git a/src/txmempool.h b/src/txmempool.h
index db1a02455..05d68b645 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -229,7 +229,7 @@ struct mempoolentry_txid
class CompareTxMemPoolEntryByDescendantScore
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
bool fUseADescendants = UseDescendantScore(a);
bool fUseBDescendants = UseDescendantScore(b);
@@ -251,7 +251,7 @@ public:
}
// Calculate which score to use for an entry (avoiding division).
- bool UseDescendantScore(const CTxMemPoolEntry &a)
+ bool UseDescendantScore(const CTxMemPoolEntry &a) const
{
double f1 = (double)a.GetModifiedFee() * a.GetSizeWithDescendants();
double f2 = (double)a.GetModFeesWithDescendants() * a.GetTxSize();
@@ -266,7 +266,7 @@ public:
class CompareTxMemPoolEntryByScore
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
double f1 = (double)a.GetModifiedFee() * b.GetTxSize();
double f2 = (double)b.GetModifiedFee() * a.GetTxSize();
@@ -280,7 +280,7 @@ public:
class CompareTxMemPoolEntryByEntryTime
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
return a.GetTime() < b.GetTime();
}
@@ -289,7 +289,7 @@ public:
class CompareTxMemPoolEntryByAncestorFee
{
public:
- bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b)
+ bool operator()(const CTxMemPoolEntry& a, const CTxMemPoolEntry& b) const
{
double aFees = a.GetModFeesWithAncestors();
double aSize = a.GetSizeWithAncestors();
@@ -656,7 +656,7 @@ public:
/** Estimate priority needed to get into the next nBlocks */
double estimatePriority(int nBlocks) const;
-
+
/** Write/Read estimates to disk */
bool WriteFeeEstimates(CAutoFile& fileout) const;
bool ReadFeeEstimates(CAutoFile& filein);
@@ -705,7 +705,7 @@ private:
void removeUnchecked(txiter entry, MemPoolRemovalReason reason = MemPoolRemovalReason::UNKNOWN);
};
-/**
+/**
* CCoinsView that brings transactions from a memorypool into view.
* It does not check for spendings by memory pool transactions.
*/
diff --git a/src/validation.cpp b/src/validation.cpp
index fe8f8365b..6dcd1f0c4 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -170,6 +170,7 @@ private:
public:
MemPoolConflictRemovalTracker(CTxMemPool &_pool) : pool(_pool) {
+ using namespace boost::placeholders;
pool.NotifyEntryRemoved.connect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
}
@@ -180,6 +181,7 @@ public:
}
~MemPoolConflictRemovalTracker() {
+ using namespace boost::placeholders;
pool.NotifyEntryRemoved.disconnect(boost::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
for (const auto& tx : conflictedTxs) {
GetMainSignals().SyncTransaction(*tx, NULL, CMainSignals::SYNC_TRANSACTION_NOT_IN_BLOCK);
diff --git a/src/validationinterface.cpp b/src/validationinterface.cpp
index d4121a28b..3b89b1c2c 100644
--- a/src/validationinterface.cpp
+++ b/src/validationinterface.cpp
@@ -12,6 +12,8 @@ CMainSignals& GetMainSignals()
return g_signals;
}
+using namespace boost::placeholders;
+
void RegisterValidationInterface(CValidationInterface* pwalletIn) {
g_signals.UpdatedBlockTip.connect(boost::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
g_signals.SyncTransaction.connect(boost::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2, _3));
and now I can run make and it works and built bitcoind
and bitcoin-cli
./configure CXX=g++-10 CPP=cpp-10 CC=gcc-10
./configure CXX=g++-10 CC=gcc-10
before runningmake
in the depends folder?--prefix=
arg when I configure again?