–enable-fuzz fails in combination with –enable-wallet, –with-miniupnpc or –enable-zmq #16094

issue practicalswift openend this issue on May 26, 2019
  1. practicalswift commented at 2:38 pm on May 26, 2019: contributor

    --enable-fuzz fails in combination with --enable-wallet, --with-miniupnpc or --enable-zmq.

     0$ git clone https://github.com/bitcoin/bitcoin
     1$ cd bitcoin
     2$ ./autogen.sh
     3$ ./configure --disable-wallet --without-miniupnpc --disable-zmq --enable-fuzz
     4$ make
     5$ echo $?
     60
     7$ make clean
     8$ ./configure --with-incompatible-bdb --without-miniupnpc --disable-zmq --enable-fuzz
     9$ make
    10
    11  CXXLD    test/fuzz/address_deserialize
    12libbitcoin_server.a(libbitcoin_server_a-init.o): In function `WalletInit::Construct(InitInterfaces&) const':
    13//src/wallet/init.cpp:139: undefined reference to `interfaces::MakeWalletClient(interfaces::Chain&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)'
    14clang: error: linker command failed with exit code 1 (use -v to see invocation)
    15Makefile:4862: recipe for target 'test/fuzz/address_deserialize' failed
    16$ make clean
    17$ ./configure --disable-wallet --with-miniupnpc --disable-zmq --enable-fuzz
    18$ make
    19
    20  CXXLD    test/fuzz/address_deserialize
    21libbitcoin_server.a(libbitcoin_server_a-net.o): In function `ThreadMapPort()':
    22//src/net.cpp:1412: undefined reference to `upnpDiscover'
    23//src/net.cpp:1423: undefined reference to `UPNP_GetValidIGD'
    24//src/net.cpp:1428: undefined reference to `UPNP_GetExternalIPAddress'
    25//src/net.cpp:1473: undefined reference to `freeUPNPDevlist'
    26//src/net.cpp:1475: undefined reference to `FreeUPNPUrls'
    27//src/net.cpp:1455: undefined reference to `UPNP_AddPortMapping'
    28//src/net.cpp:1461: undefined reference to `strupnperror'
    29//src/net.cpp:1467: undefined reference to `UPNP_DeletePortMapping'
    30//src/net.cpp:1469: undefined reference to `freeUPNPDevlist'
    31//src/net.cpp:1470: undefined reference to `FreeUPNPUrls'
    32clang: error: linker command failed with exit code 1 (use -v to see invocation)
    33$ make clean
    34$ ./configure --disable-wallet --without-miniupnpc --enable-zmq --enable-fuzz
    35$ make
    36
    37  CXXLD    test/fuzz/address_deserialize
    38libbitcoin_server.a(libbitcoin_server_a-init.o): In function `Shutdown(InitInterfaces&)':
    39//src/init.cpp:290: undefined reference to `g_zmq_notification_interface'
    40libbitcoin_server.a(libbitcoin_server_a-init.o): In function `SetupServerArgs()':
    41//src/init.cpp:469: undefined reference to `CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM'
    42//src/init.cpp:470: undefined reference to `CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM'
    43//src/init.cpp:471: undefined reference to `CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM'
    44//src/init.cpp:472: undefined reference to `CZMQAbstractNotifier::DEFAULT_ZMQ_SNDHWM'
    45libbitcoin_server.a(libbitcoin_server_a-init.o): In function `AppInitMain(InitInterfaces&)':
    46//src/init.cpp:1317: undefined reference to `RegisterZMQRPCCommands(CRPCTable&)'
    47//src/init.cpp:1440: undefined reference to `CZMQNotificationInterface::Create()'
    48//src/init.cpp:1440: undefined reference to `g_zmq_notification_interface'
    49clang: error: linker command failed with exit code 1 (use -v to see invocation)
    
  2. fanquake added the label Build system on May 26, 2019
  3. MarcoFalke added the label good first issue on May 26, 2019
  4. fanquake commented at 5:45 pm on May 29, 2019: member
    @practicalswift is this using master ? I’ve tried all the ./configure combinations above with c7cfd20a77ce57d200b3b9e5e0dfb0d63818abdc, and am not seeing any of the same failures when compiling.
  5. MarcoFalke commented at 5:55 pm on May 29, 2019: member
    @practicalswift Does it also happen with make distclean?
  6. practicalswift commented at 2:32 pm on May 30, 2019: contributor

    @fanquake @MarcoFalke I’m able to reproduce against current master (c7cfd20a77ce57d200b3b9e5e0dfb0d63818abdc) using a fresh clone:

     0$ git clone https://github.com/bitcoin/bitcoin bitcoin-enable-fuzz
     1$ cd bitcoin-enable-fuzz
     2$ git rev-parse HEAD
     3c7cfd20a77ce57d200b3b9e5e0dfb0d63818abdc
     4$ ./autogen.sh
     5$ ./configure --with-incompatible-bdb --without-miniupnpc --disable-zmq --enable-fuzz
     6$ make
     7
     8libbitcoin_server.a(libbitcoin_server_a-init.o): In function `WalletInit::Construct(InitInterfaces&) const':
     9//src/wallet/init.cpp:139: undefined reference to `interfaces::MakeWalletClient(interfaces::Chain&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)'
    10collect2: error: ld returned 1 exit status
    11Makefile:4865: recipe for target 'test/fuzz/address_deserialize' failed
    12$ grep DESC /etc/lsb-release
    13DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
    14$ gcc --version | head -1
    15gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
    16$ ld --version | head -1
    17GNU ld (GNU Binutils for Ubuntu) 2.30
    
  7. practicalswift commented at 8:28 pm on May 30, 2019: contributor

    Just to rule out any local issue with my test system I reproduced the issue using a fresh 18.04 install too:

     0$ docker run -it ubuntu bash
     1$ apt update
     2$ apt upgrade
     3$ apt install gcc make git curl wget g++ build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 libdb-dev libdb++-dev
     4$ apt install libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev
     5$ git clone https://github.com/bitcoin/bitcoin bitcoin-enable-fuzz
     6$ cd bitcoin-enable-fuzz
     7$ git rev-parse HEAD
     8c7cfd20a77ce57d200b3b9e5e0dfb0d63818abdc
     9$ ./autogen.sh
    10$ ./configure --with-incompatible-bdb --without-miniupnpc --disable-zmq --enable-fuzz
    11$ make
    12
    13libbitcoin_server.a(libbitcoin_server_a-init.o): In function `WalletInit::Construct(InitInterfaces&) const':
    14/bitcoin-enable-fuzz/src/wallet/init.cpp:139: undefined reference to `interfaces::MakeWalletClient(interfaces::Chain&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)'
    15collect2: error: ld returned 1 exit status
    16Makefile:4865: recipe for target 'test/fuzz/address_deserialize' failed
    17$ grep DESC /etc/lsb-release
    18DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
    19$ gcc --version | head -1
    20gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
    21$ ld --version | head -1
    22GNU ld (GNU Binutils for Ubuntu) 2.30
    
  8. fanquake commented at 9:00 pm on May 30, 2019: member

    Thanks for clarifying. I now see the same failure building inside docker with the steps above:

     0  CXX      bench/bench_bench_bitcoin-poly1305.o
     1  CXX      bench/bench_bench_bitcoin-prevector.o
     2  CXX      test/bench_bench_bitcoin-setup_common.o
     3  CXX      test/bench_bench_bitcoin-util.o
     4  CXX      bench/bench_bench_bitcoin-coin_selection.o
     5  CXX      bench/bench_bench_bitcoin-wallet_balance.o
     6  CXXLD    bench/bench_bitcoin
     7  CXX      test/test_fuzz_address_deserialize-setup_common.o
     8  CXX      test/fuzz/test_fuzz_address_deserialize-fuzz.o
     9  CXX      test/fuzz/test_fuzz_address_deserialize-deserialize.o
    10  CXXLD    test/fuzz/address_deserialize
    11libbitcoin_server.a(libbitcoin_server_a-init.o): In function `WalletInit::Construct(InitInterfaces&) const':
    12/bitcoin-enable-fuzz/src/wallet/init.cpp:139: undefined reference to `interfaces::MakeWalletClient(interfaces::Chain&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >)'
    13collect2: error: ld returned 1 exit status
    14Makefile:4865: recipe for target 'test/fuzz/address_deserialize' failed
    15make[2]: *** [test/fuzz/address_deserialize] Error 1
    16make[2]: Leaving directory '/bitcoin-enable-fuzz/src'
    17Makefile:12993: recipe for target 'all-recursive' failed
    18make[1]: *** [all-recursive] Error 1
    19make[1]: Leaving directory '/bitcoin-enable-fuzz/src'
    20Makefile:776: recipe for target 'all-recursive' failed
    21make: *** [all-recursive] Error 1
    22root@79e5030ee089:/bitcoin-enable-fuzz# gcc --version
    23gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0
    24Copyright (C) 2017 Free Software Foundation, Inc.
    25This is free software; see the source for copying conditions.  There is NO
    26warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    27
    28root@79e5030ee089:/bitcoin-enable-fuzz# git rev-parse HEAD
    29c7cfd20a77ce57d200b3b9e5e0dfb0d63818abdc
    
  9. MarcoFalke commented at 10:44 pm on May 30, 2019: member

    Those flags are incompatible, please see the discussion in #15295 (review)

    --enable-fuzz should disable all other targets by itself, but currently we rely on the user to pass --disable-wallet --disable-bench --with-utils=no --with-daemon=no --with-libs=no --with-gui=no

  10. MarcoFalke added the label Tests on May 31, 2019
  11. laanwj closed this on Jul 10, 2019

  12. laanwj referenced this in commit 5859b7dc6f on Jul 10, 2019
  13. monstrobishi referenced this in commit d094c1f3f1 on Sep 6, 2020
  14. Munkybooty referenced this in commit 78bbd11f6e on Nov 4, 2021
  15. Munkybooty referenced this in commit d30484cd2a on Nov 4, 2021
  16. Munkybooty referenced this in commit 008a05f580 on Nov 6, 2021
  17. Munkybooty referenced this in commit d42f23b412 on Nov 12, 2021
  18. Munkybooty referenced this in commit eaa9ca2fa5 on Nov 16, 2021
  19. Munkybooty referenced this in commit 62e8785323 on Nov 18, 2021
  20. Munkybooty referenced this in commit 13fa8bdb71 on Nov 24, 2021
  21. Munkybooty referenced this in commit b31ca7a384 on Nov 30, 2021
  22. Munkybooty referenced this in commit d96680acd2 on Nov 30, 2021
  23. MarcoFalke locked this on Dec 16, 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: 2024-11-23 18:12 UTC

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