FeatherCoin / Feathercoin

https://feathercoin.com
MIT License
128 stars 124 forks source link

v0.18.3 build fails at httpserver.cpp:110:31: error: 'queue' was not declared in this scope #388

Closed allesklaar closed 4 years ago

allesklaar commented 4 years ago

This is Arch Linux, last updated on 14.03.2020.

git checkout v0.18.3

./autogen.sh && ./configure --with-incompatible-bdb && make -j3

Failed build output:

(...)
Options used to compile and link:
  with wallet   = yes
  with gui / qt = yes
    with bip70  = yes
    with qr     = yes
  with zmq      = yes
  with test     = yes
    with fuzz   = no
  with bench    = yes
  with upnp     = yes
  use asm       = yes
  sanitizers    = 
  debug enabled = no
  gprof enabled = no
  werror        = no

  target os     = linux
  build os      = 

  CC            = gcc
  CFLAGS        = -g -O2 -fPIC
  CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
  CXX           = g++ -std=c++11
  CXXFLAGS      =   -fstack-reuse=none -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wredundant-decls  -Wno-unused-parameter -Wno-implicit-fallthrough   -g -O2
  LDFLAGS       = -pthread  -Wl,-z,relro -Wl,-z,now -pie  
  ARFLAGS       = cr

Making all in src
make[1]: Entering directory '/home/user/src/feathercoin/Feathercoin/src'
make[2]: Entering directory '/home/user/src/feathercoin/Feathercoin/src'
  CXX      feathercoind-bitcoind.o
  CXX      libbitcoin_server_a-addrdb.o
  CXX      libbitcoin_server_a-addrman.o
  CXX      libbitcoin_server_a-banman.o
  CXX      libbitcoin_server_a-bloom.o
  CXX      libbitcoin_server_a-blockencodings.o
  CXX      libbitcoin_server_a-blockfilter.o
  CXX      libbitcoin_server_a-chain.o
  CXX      libbitcoin_server_a-checkpoints.o
  CXX      libbitcoin_server_a-checkpointsync.o
  CXX      libbitcoin_server_a-httprpc.o
  CXX      libbitcoin_server_a-httpserver.o
  CXX      libbitcoin_server_a-init.o
httpserver.cpp:74:10: error: 'deque' in namespace 'std' does not name a template type
   74 |     std::deque<std::unique_ptr<WorkItem>> queue;
      |          ^~~~~
httpserver.cpp:33:1: note: 'std::deque' is defined in header '<deque>'; did you forget to '#include <deque>'?
   32 | #include <support/events.h>
  +++ |+#include <deque>
   33 | 
httpserver.cpp: In member function 'bool WorkQueue<WorkItem>::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<WorkItem>(item));
      |         ^~~~~
      |         Enqueue
httpserver.cpp: In member function 'void WorkQueue<WorkItem>::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:7979: libbitcoin_server_a-httpserver.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/home/user/src/feathercoin/Feathercoin/src'
make[1]: *** [Makefile:13034: all-recursive] Error 1
make[1]: Leaving directory '/home/user/src/feathercoin/Feathercoin/src'
make: *** [Makefile:774: all-recursive] Error 1
Bushstar commented 4 years ago

Thanks for the report. I'll added the upstream fix for this in the 0.18 and master branch, please pull changes and run make again.

allesklaar commented 4 years ago

@Bushstar It builds fine again as of master/762e5313eecdbfad9cdc46e9f7bd984024c9c6c9. Thanks.

mironkraft commented 3 years ago

I am facing same problem as poster, anyone can give some advice to fix it?

thanks!

wellenreiter01 commented 3 years ago

use the commit master/762e5313eecdbfad9cdc46e9f7bd984024c9c6c9 acording to Bushstar it compiles with that commit.

Also please notice, that the current version of the wallet is 19.3. Unless you have special reasons, please use 19.3

mironkraft commented 3 years ago

use the commit master/762e5313eecdbfad9cdc46e9f7bd984024c9c6c9 acording to Bushstar it compiles with that commit.

Also please notice, that the current version of the wallet is 19.3. Unless you have special reasons, please use 19.3

Hi, thanks for your reply,

May I ask, how you do that?

I am completely noob at this

thanks in advance

Bushstar commented 3 years ago

The problem was a missing...

#include <deque>

This is now present in httpserver.cpp in 0.18, 0.19 and the latest master so should not result in the exact same error unless using old source. Do git pull and make sure your branch is up to date with the branch on GitHub. If you still have trouble then paste the error message here.

mironkraft commented 3 years ago

The problem was a missing...

#include <deque>

This is now present in httpserver.cpp in 0.18, 0.19 and the latest master so should not result in the exact same error unless using old source. Do git pull and make sure your branch is up to date with the branch on GitHub. If you still have trouble then paste the error message here.

Hi again, my problem is the next that I am facing: https://bitcointalk.org/index.php?topic=5318643.new I forgot that I posted it into BitCoinTalk

Before doing pull, i want to finishing creating the project

error message is shown in the link that i pasted

Thanks, kind regards

Git status: ┌──(root💀kali)-[/home/kali/XXXXXXXX] └─# git status 2 ⨯ On branch 1.0 nothing to commit, working tree clean

Bushstar commented 3 years ago

Is this related to Feathercoin?

Anyway this is the fix you are looking for, you need to add the missing include in that file.

https://github.com/bitcoin/bitcoin/commit/a5929130223973636f3fd25fbfaf2953f2ec96a9#diff-63c8cb9c9dd61d50d59afd5c39914e1c259f8743030b637a7896a0746c851ef1