I'm compiling yenten from source on Debian 11 and came across a couple of issues: warnings and errors.
libdb4.8-dev and libdb4.8++-dev are no longer available for debian 11, I used instead libdb5.3-dev and libdb5.3++-dev
I used ./configure --enable-upnp-default --with-incompatible-bdb
Results:
Options used to compile and link:
with wallet = yes
with gui / qt = yes
qt version = 5
with qr = yes
with zmq = yes
with test = no
with bench = no
with upnp = yes
use asm = yes
debug enabled = no
werror = no
Several warnings and errors where displayed during maker:
CXX libbitcoin_server_a-httpserver.o
httpserver.cpp:74:10: error: ‘deque’ in namespace ‘std’ does not name a template type
74 | std::deque<std::unique_ptr> queue;
| ^~~~~
httpserver.cpp:33:1: note: ‘std::deque’ is defined in header ‘’; did you forget to ‘#include ’?
32 | #include <support/events.h>
+++ +#include deque
33 |
httpserver.cpp: In member function ‘bool WorkQueue::Enqueue(WorkItem*)’:
httpserver.cpp:92:13: error: ‘queue’ was not declared in this scope; did you mean ‘Enqueue’?
92 | if (queue.size() >= maxDepth) {
| ^~~~~
| Enqueue
httpserver.cpp:95:9: error: ‘queue’ was not declared in this scope; did you mean ‘Enqueue’?
95 | queue.emplace_back(std::unique_ptr(item));
| ^~~~~
| Enqueue
httpserver.cpp: In member function ‘void WorkQueue::Run()’:
httpserver.cpp:106:35: error: ‘queue’ was not declared in this scope; did you mean ‘Enqueue’?
106 | while (running && queue.empty())
| ^~~~~
| Enqueue
httpserver.cpp:110:31: error: ‘queue’ was not declared in this scope; did you mean ‘Enqueue’?
110 | i = std::move(queue.front());
| ^~~~~
| Enqueue
make[2]: *** [Makefile:6129: libbitcoin_server_a-httpserver.o] Error 1
make[2]: Leaving directory '/home/keefer/yenten/sr
I added #include deque to httpserver.cpp, which cleared up that issue. However, there are several more issues
usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
36 | BOOST_PRAGMA_MESSAGE(
| ^~~~~~~~
init.cpp: In function ‘void CleanupB
init.cpp: In function ‘void CleanupBlockRevFiles()’:
init.cpp:627:50: warning: loop variable ‘item’ of type ‘const std::pair<std::cxx11::basic_string, boost::filesystem::path>&’ binds to a temporary constructed from type ‘std::pair<const std::__cxx11::basic_string, boost::filesystem::path>’ [-Wrange-loop-construct]
627 | for (const std::pair<std::string, fs::path>& item : mapBlockFiles) {
| ^~~~
init.cpp:627:50: note: use non-reference type ‘const std::pair<std::cxx11::basic_string, boost::filesystem::path>’ to make the copy explicit or ‘const std::pair<const std::__cxx11::basic_string, boost::filesystem::path>&’ to prevent copying
rpc/blockchain.cpp: In function ‘void ApplyStats(CCoinsStats&, CHashWriter&, const uint256&, const std::map<unsigned int, Coin>&)’:
rpc/blockchain.cpp:832:21: warning: loop variable ‘output’ creates a copy from type ‘const std::pair<const unsigned int, Coin>’ [-Wrange-loop-construct]
832 | for (const auto output : outputs) {
| ^~
rpc/blockchain.cpp:832:21: note: use reference type to prevent copying
832 | for (const auto output : outputs) {
| ^~
| &
rpc/net.cpp: In function ‘UniValue getnetworkinfo(const JSONRPCRequest&)’:
rpc/net.cpp:478:59: warning: loop variable ‘item’ of type ‘const std::pair<CNetAddr, LocalServiceInfo>&’ binds to a temporary constructed from type ‘std::pair<const CNetAddr, LocalServiceInfo>’ [-Wrange-loop-construct]
478 | for (const std::pair<CNetAddr, LocalServiceInfo> &item : mapLocalHost)
| ^~~~
rpc/net.cpp:478:59: note: use non-reference type ‘const std::pair<CNetAddr, LocalServiceInfo>’ to make the copy explicit or ‘const std::pair<const CNetAddr, LocalServiceInfo>&’ to prevent copying
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
36 | BOOST_PRAGMA_MESSAGE(
| ^~~~~~~~
validation.cpp: In function ‘bool AcceptToMemoryPoolWorker(const CChainParams&, CTxMemPool&, CValidationState&, const CTransactionRef&, bool, int64_t, std::__cxx11::list<std::shared_ptr >, bool, const CAmount&, std::vector&)’:
validation.cpp:651:26: warning: loop variable ‘txin’ creates a copy from type ‘const CTxIn’ [-Wrange-loop-construct]
651 | for (const CTxIn txin : tx.vin) {
| ^~~~
validation.cpp:651:26: note: use reference type to prevent copying
651 | for (const CTxIn txin : tx.vin) {
| ^~~~
| &
validation.cpp: In constructor ‘ConnectTrace::ConnectTrace(CTxMemPool&)’:
validation.cpp:2299:94: error:‘_1’ was not declared in this scope
2299 | yEntryRemoved.connect(boost::bind(&ConnectTrace::NotifyEntryRemoved, this, _1, _2));
| ^~
validation.cpp:2303:101: error: ‘_2’ was not declared in this scope
2303 | tryRemoved.disconnect(boost::bind(&ConnectTrace::NotifyEntryRemoved, this, _1, _2));
| ^~
validation.cpp: In member function ‘bool CChainState::LoadBlockIndex(const Consensus::Params&, CBlockTreeDB&)’:
validation.cpp:3718:50: warning: loop variable ‘item’ of type ‘const std::pair<uint256, CBlockIndex>&’ binds to a temporary constructed from type ‘std::pair<const uint256, CBlockIndex>’ [-Wrange-loop-construct]
3718 | for (const std::pair<uint256, CBlockIndex>& item : mapBlockIndex)
| ^~~~
validation.cpp:3718:50: note: use non-reference type ‘const std::pair<uint256, CBlockIndex>’ to make the copy explicit or ‘const std::pair<const uint256, CBlockIndex>&’ to prevent copying
validation.cpp: In function ‘bool LoadBlockIndexDB(const CChainParams&)’:
validation.cpp:3785:50: warning: loop variable ‘item’ of type ‘const std::pair<uint256, CBlockIndex>&’ binds to a temporary constructed from type ‘std::pair<const uint256, CBlockIndex>’ [-Wrange-loop-construct]
3785 | for (const std::pair<uint256, CBlockIndex>& item : mapBlockIndex)
| ^~~~
validation.cpp:3785:50: note: use non-reference type ‘const std::pair<uint256, CBlockIndex>’ to make the copy explicit or ‘const std::pair<const uint256, CBlockIndex>&’ to prevent copying
make[2]: *** [Makefile:6507: libbitcoin_server_a-validation.o] Error 1
I'm compiling yenten from source on Debian 11 and came across a couple of issues: warnings and errors.
I used ./configure --enable-upnp-default --with-incompatible-bdb Results: Options used to compile and link: with wallet = yes with gui / qt = yes qt version = 5 with qr = yes with zmq = yes with test = no with bench = no with upnp = yes use asm = yes debug enabled = no werror = no
target os = linux build os =
CC = gcc CFLAGS = -g -O2 CPPFLAGS = -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS CXX = g++ -std=c++11 CXXFLAGS = -g -O2 -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough LDFLAGS = ARFLAGS = cr
I added #include deque to httpserver.cpp, which cleared up that issue. However, there are several more issues
usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^
~~~~~~~ init.cpp: In function ‘void CleanupBinit.cpp: In function ‘void CleanupBlockRevFiles()’: init.cpp:627:50: warning: loop variable ‘item’ of type ‘const std::pair<std::cxx11::basic_string, boost::filesystem::path>&’ binds to a temporary constructed from type ‘std::pair<const std::__cxx11::basic_string, boost::filesystem::path>’ [-Wrange-loop-construct]
627 | for (const std::pair<std::string, fs::path>& item : mapBlockFiles) {
| ^~~~
init.cpp:627:50: note: use non-reference type ‘const std::pair<std:: cxx11::basic_string, boost::filesystem::path>’ to make the copy explicit or ‘const std::pair<const std::__cxx11::basic_string, boost::filesystem::path>&’ to prevent copying
rpc/blockchain.cpp: In function ‘void ApplyStats(CCoinsStats&, CHashWriter&, const uint256&, const std::map<unsigned int, Coin>&)’: rpc/blockchain.cpp:832:21: warning: loop variable ‘output’ creates a copy from type ‘const std::pair<const unsigned int, Coin>’ [-Wrange-loop-construct] 832 | for (const auto output : outputs) { | ^
~rpc/blockchain.cpp:832:21: note: use reference type to prevent copying 832 | for (const auto output : outputs) { | ^~| &rpc/net.cpp: In function ‘UniValue getnetworkinfo(const JSONRPCRequest&)’: rpc/net.cpp:478:59: warning: loop variable ‘item’ of type ‘const std::pair<CNetAddr, LocalServiceInfo>&’ binds to a temporary constructed from type ‘std::pair<const CNetAddr, LocalServiceInfo>’ [-Wrange-loop-construct] 478 | for (const std::pair<CNetAddr, LocalServiceInfo> &item : mapLocalHost) | ^~~~ rpc/net.cpp:478:59: note: use non-reference type ‘const std::pair<CNetAddr, LocalServiceInfo>’ to make the copy explicit or ‘const std::pair<const CNetAddr, LocalServiceInfo>&’ to prevent copying
/usr/include/boost/bind.hpp:36:1: note: ‘#pragma message: The practice of declaring the Bind placeholders (_1, _2, ...) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’ 36 | BOOST_PRAGMA_MESSAGE( | ^
~~~~~~~validation.cpp: In function ‘bool AcceptToMemoryPoolWorker(const CChainParams&, CTxMemPool&, CValidationState&, const CTransactionRef&, bool, int64_t, std::__cxx11::list<std::shared_ptr > , bool, const CAmount&, std::vector&)’:
validation.cpp:651:26: warning: loop variable ‘txin’ creates a copy from type ‘const CTxIn’ [-Wrange-loop-construct]
651 | for (const CTxIn txin : tx.vin) {
| ^~~~
validation.cpp:651:26: note: use reference type to prevent copying
651 | for (const CTxIn txin : tx.vin) {
| ^~~~
| &
validation.cpp: In constructor ‘ConnectTrace::ConnectTrace(CTxMemPool&)’:
validation.cpp:2299:94: error:‘_1’ was not declared in this scope
2299 | yEntryRemoved.connect(boost::bind(&ConnectTrace::NotifyEntryRemoved, this, _1, _2));
| ^~
validation.cpp:2303:101: error: ‘_2’ was not declared in this scope 2303 | tryRemoved.disconnect(boost::bind(&ConnectTrace::NotifyEntryRemoved, this, _1, _2)); | ^~
Results: make[2]: [Makefile:6507: libbitcoin_server_a-validation.o] Error 1 make[2]: Leaving directory '/home/keefer/yenten/src' make[1]: [Makefile:10014: all-recursive] Error 1 make[1]: Leaving directory '/home/keefer/yenten/src' make: *** [Makefile:750: all-recursive] Error 1