build failure: node/transaction.cpp promise' has incomplete type and cannot be defined #20038

issue alevchuk opened this issue on September 29, 2020
  1. alevchuk commented at 4:54 PM on September 29, 2020: none

    <!-- Describe the issue -->

    I'm not able to build on Slackware 14.2 ARM on Pi 4

    <!--- What behavior did you expect? -->

    make should succeed

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    when running make I get

    node/transaction.cpp: In function 'TransactionError BroadcastTransaction(CTransactionRef, std::string&, const CAmount&, bool, bool)':
    node/transaction.cpp:23:24: error: aggregate 'std::promise<void> promise' has incomplete type and cannot be defined
         std::promise<void> promise;
                            ^
    node/transaction.cpp: In lambda function:
    node/transaction.cpp:68:17: error: 'promise' is not captured
                     promise.set_value();
                     ^
    

    To reproduce

    Try building on Slackware 14.2 ARM on Pi 4

    git checkout v0.19.1
    make clean && ./autogen.sh && ./configure  --with-gui=no --disable-wallet --disable-tests --prefix=$HOME/bin && make clean && make
    

    similar result for v0.18.1

    System information

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    bitcoin v0.19.1

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    Raspberry Pi 4, 4 GB RAM

    <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? -->

    Linux 5.4.64-v7l+ #1340 SMP Fri Sep 11 14:15:31 BST 2020 armv7l BCM2711 GNU/Linux

    slackware 14.2

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

    configure output

    
    Build Options:
      with endomorphism   = no
      with ecmult precomp = yes
      with jni            = no
      with benchmarks     = no
      with coverage       = no
      module ecdh         = no
      module recovery     = yes
    
      asm                 = no
      bignum              = no
      field               = 32bit
      scalar              = 32bit
    
      CC                  = gcc
      CFLAGS              = -g -O2 -W -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings -fvisibility=hidden -O3
      CPPFLAGS            =
      LDFLAGS             =
    
    Options used to compile and link:
      with wallet   = no
      with gui / qt = no
      with zmq      = yes
      with test     = no
      with bench    = yes
      with upnp     = no
      use asm       = yes
      sanitizers    =
      debug enabled = no
      gprof enabled = no
      werror        = no
    
      target os     = linux
      build os      =
    
      CC            = /usr/bin/ccache gcc
      CFLAGS        = -g -O2
      CPPFLAGS      =   -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS -D_FILE_OFFSET_BITS=64
      CXX           = /usr/bin/ccache g++ -std=c++11
      CXXFLAGS      =   -fstack-reuse=none -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wswitch -Wredundant-decls  -Wno-unused-parameter   -g -O2
      LDFLAGS       = -pthread  -Wl,-z,relro -Wl,-z,now -pie
      ARFLAGS       = cr
    

    full make output

    $ make
    Making all in src
    make[1]: Entering directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
    make[2]: Entering directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
      CXX      support/libbitcoinconsensus_la-cleanse.lo
      CXX      crypto/libbitcoinconsensus_la-aes.lo
    make[3]: Entering directory '/mnt/btrfs/bitcoin/src/bitcoin'
    make[3]: Leaving directory '/mnt/btrfs/bitcoin/src/bitcoin'
      CXX      crypto/libbitcoinconsensus_la-chacha_poly_aead.lo
      CXX      crypto/libbitcoinconsensus_la-chacha20.lo
      CXX      crypto/libbitcoinconsensus_la-hkdf_sha256_32.lo
      CXX      crypto/libbitcoinconsensus_la-hmac_sha256.lo
      CXX      crypto/libbitcoinconsensus_la-hmac_sha512.lo
      CXX      crypto/libbitcoinconsensus_la-poly1305.lo
      CXX      crypto/libbitcoinconsensus_la-ripemd160.lo
      CXX      crypto/libbitcoinconsensus_la-sha1.lo
      CXX      crypto/libbitcoinconsensus_la-sha256.lo
      CXX      crypto/libbitcoinconsensus_la-sha512.lo
      CXX      crypto/libbitcoinconsensus_la-siphash.lo
      CXX      crypto/libbitcoinconsensus_la-sha256_sse4.lo
      CXX      libbitcoinconsensus_la-arith_uint256.lo
      CXX      consensus/libbitcoinconsensus_la-merkle.lo
      CXX      consensus/libbitcoinconsensus_la-tx_check.lo
      CXX      libbitcoinconsensus_la-hash.lo
      CXX      primitives/libbitcoinconsensus_la-block.lo
      CXX      primitives/libbitcoinconsensus_la-transaction.lo
      CXX      libbitcoinconsensus_la-pubkey.lo
      CXX      script/libbitcoinconsensus_la-bitcoinconsensus.lo
      CXX      script/libbitcoinconsensus_la-interpreter.lo
      CXX      script/libbitcoinconsensus_la-script.lo
      CXX      script/libbitcoinconsensus_la-script_error.lo
      CXX      libbitcoinconsensus_la-uint256.lo
      CXX      util/libbitcoinconsensus_la-strencodings.lo
    make[3]: Entering directory '/mnt/btrfs/bitcoin/src/bitcoin/src/secp256k1'
    gcc -I. -g -O2 -Wall -Wextra -Wno-unused-function -c src/gen_context.c -o gen_context.o
    gcc -g -O2 -Wall -Wextra -Wno-unused-function  gen_context.o -o gen_context
    ./gen_context
      CC       src/libsecp256k1_la-secp256k1.lo
      CCLD     libsecp256k1.la
    make[3]: Leaving directory '/mnt/btrfs/bitcoin/src/bitcoin/src/secp256k1'
      CXXLD    libbitcoinconsensus.la
      CXX      bitcoind-bitcoind.o
      CXX      libbitcoin_server_a-addrdb.o
      CXX      libbitcoin_server_a-addrman.o
      CXX      libbitcoin_server_a-banman.o
      CXX      libbitcoin_server_a-blockencodings.o
      CXX      libbitcoin_server_a-blockfilter.o
      CXX      libbitcoin_server_a-chain.o
      CXX      consensus/libbitcoin_server_a-tx_verify.o
      CXX      libbitcoin_server_a-flatfile.o
      CXX      libbitcoin_server_a-httprpc.o
      CXX      libbitcoin_server_a-httpserver.o
      CXX      index/libbitcoin_server_a-base.o
      CXX      index/libbitcoin_server_a-blockfilterindex.o
      CXX      index/libbitcoin_server_a-txindex.o
      CXX      interfaces/libbitcoin_server_a-chain.o
      CXX      interfaces/libbitcoin_server_a-node.o
      CXX      libbitcoin_server_a-init.o
      CXX      libbitcoin_server_a-dbwrapper.o
      CXX      libbitcoin_server_a-miner.o
      CXX      libbitcoin_server_a-net.o
      CXX      libbitcoin_server_a-net_processing.o
      CXX      node/libbitcoin_server_a-coin.o
      CXX      node/libbitcoin_server_a-coinstats.o
      CXX      node/libbitcoin_server_a-psbt.o
      CXX      node/libbitcoin_server_a-transaction.o
    node/transaction.cpp: In function 'TransactionError BroadcastTransaction(CTransactionRef, std::string&, const CAmount&, bool, bool)':
    node/transaction.cpp:23:24: error: aggregate 'std::promise<void> promise' has incomplete type and cannot be defined
         std::promise<void> promise;
                            ^
    node/transaction.cpp: In lambda function:
    node/transaction.cpp:68:17: error: 'promise' is not captured
                     promise.set_value();
                     ^
    node/transaction.cpp:67:61: note: the lambda has no capture-default
                 CallFunctionInValidationInterfaceQueue([&promise] {
                                                                 ^
    node/transaction.cpp:23:24: note: '<typeprefixerror>promise' declared here
         std::promise<void> promise;
                            ^
    Makefile:7621: recipe for target 'node/libbitcoin_server_a-transaction.o' failed
    make[2]: *** [node/libbitcoin_server_a-transaction.o] Error 1
    make[2]: Leaving directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
    Makefile:13230: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
    Makefile:773: recipe for target 'all-recursive' failed
    
  2. alevchuk added the label Bug on Sep 29, 2020
  3. MarcoFalke commented at 6:10 AM on September 30, 2020: member

    What is the output of gcc --version, and make V=1?

  4. alevchuk commented at 11:18 AM on September 30, 2020: none
    gcc --version
    gcc (GCC) 5.3.1 20160409
    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.
    
    make V=1
    Making all in src
    make[1]: Entering directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
    make[2]: Entering directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
    make[3]: Entering directory '/mnt/btrfs/bitcoin/src/bitcoin'
    make[3]: Leaving directory '/mnt/btrfs/bitcoin/src/bitcoin'
    /usr/bin/ccache 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 -D_FILE_OFFSET_BITS=64  -fstack-reuse=none -Wstack-protector -fstack-protector-all -Wall -Wextra -Wformat -Wvla -Wswitch -Wredundant-decls -Wno-unused-parameter    -fPIE -g -O2 -MT node/libbitcoin_server_a-transaction.o -MD -MP -MF node/.deps/libbitcoin_server_a-transaction.Tpo -c -o node/libbitcoin_server_a-transaction.o `test -f 'node/transaction.cpp' || echo './'`node/transaction.cpp
    node/transaction.cpp: In function 'TransactionError BroadcastTransaction(CTransactionRef, std::string&, const CAmount&, bool, bool)':
    node/transaction.cpp:23:24: error: aggregate 'std::promise<void> promise' has incomplete type and cannot be defined
         std::promise<void> promise;
                            ^
    node/transaction.cpp: In lambda function:
    node/transaction.cpp:68:17: error: 'promise' is not captured
                     promise.set_value();
                     ^
    node/transaction.cpp:67:61: note: the lambda has no capture-default
                 CallFunctionInValidationInterfaceQueue([&promise] {
                                                                 ^
    node/transaction.cpp:23:24: note: '<typeprefixerror>promise' declared here
         std::promise<void> promise;
                            ^
    Makefile:7621: recipe for target 'node/libbitcoin_server_a-transaction.o' failed
    make[2]: *** [node/libbitcoin_server_a-transaction.o] Error 1
    make[2]: Leaving directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
    Makefile:13230: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/mnt/btrfs/bitcoin/src/bitcoin/src'
    Makefile:773: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    
  5. alevchuk commented at 11:19 AM on September 30, 2020: none
    make --version
    GNU Make 4.1
    Built for arm-slackware-linux-gnueabi
    
  6. BTCFranky commented at 10:47 AM on February 3, 2022: none

    I have the same issue. Is this already fixed?

  7. MarcoFalke commented at 12:49 PM on February 3, 2022: member

    GCC 5.3 should have full C++11 support, unless I am mistaken, so I don't see why this doesn't work.

    Does slackware ship with other compilers like GCC 6 (or later), or clang?

    If yes, you could try passing CC=other_cc CXX=other_c++ to ./configure.

  8. MarcoFalke commented at 4:37 PM on February 4, 2022: member

    According to https://github.com/bitcoin/bitcoin/blob/0.19/doc/dependencies.md clang 3.3 should be enough, and slackware 14.2 ships with 3.8.

    Let me know if this doesn't fix the problem.

  9. MarcoFalke closed this on Feb 4, 2022

  10. DrahtBot locked this on Feb 4, 2023

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-22 18:14 UTC

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