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

Failed to build on Ubuntu Hirsute 21.04 #79

Closed
visvirial opened this issue Jan 27, 2021 · 2 comments · Fixed by #80
Closed

Failed to build on Ubuntu Hirsute 21.04 #79

visvirial opened this issue Jan 27, 2021 · 2 comments · Fixed by #80

Comments

@visvirial
Copy link

visvirial commented Jan 27, 2021

I tried to build Monacoin on Ubuntu Hirsute 21.04 (PPA), but I got the following error.

g++ -std=c++11 -DHAVE_CONFIG_H -I. -I../src/config   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -I.  -DBOOST_SP_USE_STD_ATOMIC -DBOOST_AC_USE_STD_ATOMIC -pthread -I/usr/include -I./leveldb/include -I./leveldb/helpers/memenv   -I./secp256k1/include -I./univalue/include   -pthread -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS  -Wstack-protector -fstack-protector-all -Wall -Wextra -Wformat -Wvla -Wformat-security -Wno-unused-parameter -Wno-implicit-fallthrough    -fPIE -g -O2 -MT libbitcoin_server_a-httpserver.o -MD -MP -MF .deps/libbitcoin_server_a-httpserver.Tpo -c -o libbitcoin_server_a-httpserver.o `test -f 'httpserver.cpp' || echo './'`httpserver.cpp
In file included from /usr/include/boost/smart_ptr/detail/sp_thread_sleep.hpp:22,
                 from /usr/include/boost/smart_ptr/detail/yield_k.hpp:23,
                 from /usr/include/boost/smart_ptr/detail/spinlock_std_atomic.hpp:18,
                 from /usr/include/boost/smart_ptr/detail/spinlock.hpp:36,
                 from /usr/include/boost/smart_ptr/detail/spinlock_pool.hpp:25,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:29,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/signals2/signal.hpp:21,
                 from ./util.h:34,
                 from httpserver.cpp:9:
/usr/include/boost/function_output_iterator.hpp:14:1: note: ‘#pragma message: This header is deprecated. Use <boost/iterator/function_output_iterator.hpp> instead.’
   14 | BOOST_HEADER_DEPRECATED("<boost/iterator/function_output_iterator.hpp>")
      | ^~~~~~~~~~~~~~~~~~~~~~~
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

The complete build log can be found at here.

The error message says the std::deque is declared in <deque>, but this header file is not included in the source file.
It can be solved by just adding the "#include <deque>" directive.

This issue is also reported in the Litecoin repo litecoin-project/litecoin#632 and was solved by the PR litecoin-project/litecoin#643.

(In addition to this, the repo is not maintained for more than two years.
You should catch up to the upstream repo, or may cause a significant security defect.)

@lae
Copy link

lae commented Jan 27, 2021

(In addition to this, the repo is not maintained for more than two years.
You should catch up to the upstream repo, or may cause a significant security defect.)

Just a quick note but this statement isn't entirely accurate. I don't know what the timeline for a release is like for this branch, though.
https://github.com/monacoinproject/monacoin/tree/base-0.18

@wakiyamap
Copy link
Contributor

Thanks for the report !!
I'll test it here as well.

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

Successfully merging a pull request may close this issue.

3 participants