Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compilation failure (std::deque?) #632

Closed
rpodgorny opened this issue Feb 3, 2020 · 11 comments
Closed

compilation failure (std::deque?) #632

rpodgorny opened this issue Feb 3, 2020 · 11 comments

Comments

@rpodgorny
Copy link

compilation on latest arch linux now fails for me:

Making all in src
make[1]: Entering directory '/home/radek/tmp/build/litecoin-qt/src/litecoin-0.17.1/src'
make[2]: Entering directory '/home/radek/tmp/build/litecoin-qt/src/litecoin-0.17.1/src'
CXX litecoind-bitcoind.o
CXX libbitcoin_server_a-addrdb.o
CXX libbitcoin_server_a-addrman.o
CXX libbitcoin_server_a-blockencodings.o
CXX libbitcoin_server_a-chain.o
CXX libbitcoin_server_a-bloom.o
CXX libbitcoin_server_a-checkpoints.o
CXX libbitcoin_server_a-httprpc.o
CXX libbitcoin_server_a-httpserver.o
CXX libbitcoin_server_a-init.o
CXX libbitcoin_server_a-dbwrapper.o
CXX libbitcoin_server_a-merkleblock.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
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
CXX libbitcoin_server_a-miner.o
CXX libbitcoin_server_a-net.o
make[2]: *** [Makefile:6346: libbitcoin_server_a-httpserver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/radek/tmp/build/litecoin-qt/src/litecoin-0.17.1/src'
make[1]: *** [Makefile:10510: all-recursive] Error 1
make[1]: Leaving directory '/home/radek/tmp/build/litecoin-qt/src/litecoin-0.17.1/src'
make: *** [Makefile:774: all-recursive] Error 1
==> ERROR: A failure occurred in build().
Aborting...

@rpodgorny
Copy link
Author

https://aur.archlinux.org/packages/litecoin-qt/

Quick fix:
add
#include
at line 33 in httpserver.cpp

@losh11
Copy link
Member

losh11 commented Feb 4, 2020

Does building bitcoin-qt 0.17.1 also fail for you?

@rpodgorny
Copy link
Author

yes. with the very same error.
if you need some versions info, just let me know...

@rpodgorny
Copy link
Author

just fyi - bitcoin master compiles fine for me (is it 0.19.something?) -> maybe you should merge upstream changes as well...

@losh11
Copy link
Member

losh11 commented Feb 4, 2020

Can you try building fromlitecoin/0.18 branch? 0.18.x will be the next release of Litecoin Core. Currently it's in internal testing before we tag it as a release candidate.

@rpodgorny
Copy link
Author

0.18 branch fails just as 0.17 does (same error)

@rpodgorny
Copy link
Author

in bitcoin repo:

git show a592913

commit a592913
Author: Jan Beich jbeich@FreeBSD.org
Date: Fri Oct 25 13:05:17 2019 +0000

http: add missing header bootlegged by boost < 1.72

httpserver.cpp:74:10: error: no template named 'deque' in namespace 'std'
    std::deque<std::unique_ptr<WorkItem>> queue;
    ~~~~~^

diff --git a/src/httpserver.cpp b/src/httpserver.cpp
index 811377718..d9c711332 100644
--- a/src/httpserver.cpp
+++ b/src/httpserver.cpp
@@ -15,6 +15,7 @@
#include <sync.h>
#include <ui_interface.h>

+#include
#include
#include <stdio.h>
#include <stdlib.h>

@rpodgorny
Copy link
Author

...any progress on this? the fix is pretty simple... ;-)

@thrasher-
Copy link
Member

Included in 0.18 ba8a8c4

@c4pt000
Copy link

c4pt000 commented May 18, 2021

+#include

why didn't you just write that shit?

#include

Kirkirillka added a commit to Kirkirillka/blocknet that referenced this issue Mar 11, 2023
@yoyofreeman
Copy link

yoyofreeman commented Feb 1, 2024

+ #include <deque>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants