std::future build issue g++ 4.9.3 ARM #8447

issue laanwj opened this issue on August 2, 2016
  1. laanwj commented at 8:48 AM on August 2, 2016: member

    I think this started after #8421.

    httpserver.cpp:440:19: error: aggregate 'std::future<bool> threadResult' has incomplete type and cannot be defined
     std::future<bool> threadResult;
                       ^
    httpserver.cpp: In function 'bool StartHTTPServer()':
    httpserver.cpp:447:67: error: variable 'std::packaged_task<bool(event_base*, evhttp*)> task' has initializer but incomplete type
         std::packaged_task<bool(event_base*, evhttp*)> task(ThreadHTTP);
                                                                       ^
    Makefile:5022: recipe for target 'libbitcoin_server_a-httpserver.o' failed
    
    $ arm-unknown-linux-gnueabihf-g++ --version
    arm-unknown-linux-gnueabihf-g++ (crosstool-NG crosstool-ng-1.22.0-11-g0e85151) 4.9.3
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    

    @theuni any idea?

    Edit: maybe this is false alarm and the g++ compiler produced by crosstool lacks some feature to support the c++11 threading primitives, or I've just forgot to pass some setting. The Travis build for ARM (using g++ 4.8, of all versions) seems to work fine after all.

  2. laanwj added the label Build system on Aug 2, 2016
  3. laanwj renamed this:
    Build issue g++ 4.9.3 ARM
    std::future build issue g++ 4.9.3 ARM
    on Aug 2, 2016
  4. laanwj added the label Upstream on Aug 2, 2016
  5. laanwj commented at 8:50 AM on August 2, 2016: member

    Ok, seems to be an ARM specific g++ bug (or rather, missing feature): https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735 I'll try with a newer compiler.

  6. laanwj commented at 11:16 AM on August 2, 2016: member

    Same problem with g++ 5.3, unfortunately:

    httpserver.cpp:440:19: error: aggregate 'std::future<bool> threadResult' has incomplete type and cannot be defined
     std::future<bool> threadResult;
                       ^
    httpserver.cpp: In function 'bool StartHTTPServer()':
    httpserver.cpp:447:67: error: variable 'std::packaged_task<bool(event_base*, evhttp*)> task' has initializer but incomplete type
         std::packaged_task<bool(event_base*, evhttp*)> task(ThreadHTTP);
                                                                       ^
    Makefile:5022: recipe for target 'libbitcoin_server_a-httpserver.o' failed
    
    $ arm-unknown-linux-gnueabihf-g++ --version
    arm-unknown-linux-gnueabihf-g++ (crosstool-NG crosstool-ng-1.22.0-11-g0e85151) 5.3.0
    Copyright (C) 2015 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
  7. laanwj commented at 11:41 AM on August 2, 2016: member

    Confirmed that the build goes fine with Trusty's gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4 I think I misconfigured the architecture, trying with explicitly setting Architecture level to armv7-a.

  8. laanwj commented at 12:25 PM on August 2, 2016: member

    OK that did it. For anyone building their toolchain using crosstool-ng, make sure to set the architecture level correctly, so that the required atomic instructions are available:

    untitled

  9. laanwj closed this on Aug 2, 2016

  10. theuni commented at 7:52 PM on August 3, 2016: member

    Thanks for tracking it down.

  11. MarcoFalke 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-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me