Tuesday, November 5, 2024

bitcoind – Bitcoin fails to compile with Increase

I simply had this drawback occur… On Mac OS 12.4, I put in enhance with homebrew, and it was put in to /decide/homebrew/Cellar/enhance/1.82.0_1

After I ran ./configure I bought:

checking whether or not the Increase::System library is on the market... no
checking whether or not the Increase::Filesystem library is on the market... no
checking whether or not the Increase::Program_Options library is on the market... no
checking whether or not the Increase::Thread library is on the market... no
checking whether or not the Increase::Chrono library is on the market... no
checking whether or not the Increase::Unit_Test_Framework library is on the market... no
checking for dynamic linked enhance check... no
checking for mismatched enhance c++11 scoped enums... okay
configure: error: No working enhance sleep implementation discovered.

So I added the with-boost flag with that path: ./configure --with-boost=/decide/homebrew/Cellar/enhance/1.82.0_1

After which it labored. However working make failed for numerous causes equivalent to lacking import statements, std::placeholder conflicting with enhance::placeholder and different causes… So I needed to make the next adjustments:

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 @@
 #embody <stdlib.h>
 #embody <string.h>
 
+#embody <deque>
 #embody <sys/varieties.h>
 #embody <sys/stat.h>
 #embody <sign.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 {
 // besides working on CTxMemPoolModifiedEntry.
 // TODO: refactor to keep away from 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 {
 // That is enough to kind an ancestor package deal in an order that's legitimate
 // to look 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 @@
 #embody "validationinterface.h"
 
 #embody <enhance/thread.hpp>
+#embody <array>
 
 #if outlined(NDEBUG)
 # error "Bitcoin can't be compiled with out assertions."
diff --git a/src/check/cuckoocache_tests.cpp b/src/check/cuckoocache_tests.cpp
index 00446aa11..29bc0acc7 100644
--- a/src/check/cuckoocache_tests.cpp
+++ b/src/check/cuckoocache_tests.cpp
@@ -7,6 +7,7 @@
 #embody "random.h"
 #embody <thread>
 #embody <enhance/thread.hpp>
+#embody <deque>
 
 
 /** Take a look at 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 rating to make use of 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 precedence wanted to get into the following nBlocks */
     double estimatePriority(int nBlocks) const;
-    
+
     /** Write/Learn estimates to disk */
     bool WriteFeeEstimates(CAutoFile& fileout) const;
     bool ReadFeeEstimates(CAutoFile& filein);
@@ -705,7 +705,7 @@ non-public:
     void removeUnchecked(txiter entry, MemPoolRemovalReason cause = MemPoolRemovalReason::UNKNOWN);
 };
 
-/** 
+/**
  * CCoinsView that brings transactions from a memorypool into view.
  * It doesn't verify for spendings by reminiscence 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 @@ non-public:
 
 public:
     MemPoolConflictRemovalTracker(CTxMemPool &_pool) : pool(_pool) {
+        utilizing namespace enhance::placeholders;
         pool.NotifyEntryRemoved.join(enhance::bind(&MemPoolConflictRemovalTracker::NotifyEntryRemoved, this, _1, _2));
     }
 
@@ -180,6 +181,7 @@ public:
     }
 
     ~MemPoolConflictRemovalTracker() {
+        utilizing namespace enhance::placeholders;
         pool.NotifyEntryRemoved.disconnect(enhance::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;
 }
 
+utilizing namespace enhance::placeholders;
+
 void RegisterValidationInterface(CValidationInterface* pwalletIn) {
     g_signals.UpdatedBlockTip.join(enhance::bind(&CValidationInterface::UpdatedBlockTip, pwalletIn, _1, _2, _3));
     g_signals.SyncTransaction.join(enhance::bind(&CValidationInterface::SyncTransaction, pwalletIn, _1, _2, _3));

and now I can run make and it really works and constructed bitcoind and bitcoin-cli

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles