errors compiling httpserver.cpp #7031

issue crackfoo opened this issue on November 16, 2015
  1. crackfoo commented at 3:22 PM on November 16, 2015: none

    httpserver.cpp: In function ‘void StopHTTPServer()’: httpserver.cpp:490:25: error: ‘class boost::thread’ has no member named ‘try_join_for’ httpserver.cpp:490:45: error: ‘boost::chrono’ has not been declared At global scope: cc1plus: warning: unrecognized command line option "-Wno-self-assign" [enabled by default] make[2]: *** [libbitcoin_server_a-httpserver.o] Error 1 make[2]: Leaving directory /src/bitcoin/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/src/bitcoin/src' make: *** [all-recursive] Error 1

    Any idea's what is causing this? only started with recent updates...

  2. laanwj added the label RPC on Nov 16, 2015
  3. MarcoFalke commented at 3:26 PM on November 16, 2015: member

    (Related to #6990)

  4. laanwj commented at 3:26 PM on November 16, 2015: member

    What version of boost?

  5. crackfoo commented at 3:43 PM on November 16, 2015: none

    ii libboost-all-dev 1.49.0.1 amd64 Boost C++ Libraries development files (ALL) (default version)

  6. laanwj commented at 4:12 PM on November 16, 2015: member

    Looks like try_join_for was introduced in Boost 1.50: http://www.boost.org/doc/libs/1_50_0/doc/html/thread/thread_management.html#thread.thread_management.thread.try_join_for

    1.49 has timed_join, I think you can accomplish the same with that: http://www.boost.org/doc/libs/1_49_0/doc/html/thread/thread_management.html#thread.thread_management.thread.timed_join

    However, timed_join was deprecated in 1.50, with boost::chrono. How convenient. This needs something like:

    #if BOOST_VERSION >= 105000
        if (!threadHTTP.try_join_for(boost::chrono::milliseconds(2000))) {
    #else
        if (!threadHTTP.timed_join(boost::posix_time::milliseconds(2000))) {
    #endif
    
  7. crackfoo commented at 4:18 PM on November 16, 2015: none

    thanks for this. httpserver.cpp compilation succeeded after that suggested change. I'll report if it causes any further issues.

  8. laanwj added this to the milestone 0.12.0 on Nov 16, 2015
  9. laanwj assigned laanwj on Nov 17, 2015
  10. laanwj referenced this in commit 3522f49f5a on Nov 20, 2015
  11. laanwj cross-referenced this on Nov 20, 2015 from issue http: add Boost 1.49 compatibility by laanwj
  12. laanwj commented at 7:42 AM on November 24, 2015: member

    Closed by #7065

  13. laanwj closed this on Nov 24, 2015

  14. miguelmorales85 commented at 11:49 AM on April 16, 2016: none

    This happens also when make is done to 0.12.1

  15. mariuz referenced this in commit 5cbfe97ef1 on Jan 22, 2017
  16. bitcoin locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:55 UTC