Bionic with system libs doesn't link #24314

issue maflcko opened this issue on February 10, 2022
  1. maflcko commented at 8:45 PM on February 10, 2022: member

    Steps to reproduce on a fresh install of Ubuntu Bionic:

    export DEBIAN_FRONTEND=noninteractive && apt update && apt install curl wget htop git vim ccache -y && git clone https://github.com/bitcoin/bitcoin.git ./bitcoin-core && cd bitcoin-core && apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq     libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev  libsqlite3-dev libdb++-dev  gcc-8 g++-8 -y && ./autogen.sh && CXX=g++-8 CC=gcc-8 ./configure  --without-incompatible-bdb  && make -j $(nproc)
    

    Output:

      CXXLD    bitcoind
    libbitcoin_util.a(libbitcoin_util_a-system.o): In function `boost::system::error_category::std_category::equivalent(std::error_code const&, int) const':
    /usr/include/boost/system/error_code.hpp:686: undefined reference to `boost::system::generic_category()'
    /usr/include/boost/system/error_code.hpp:689: undefined reference to `boost::system::generic_category()'
    /usr/include/boost/system/error_code.hpp:701: undefined reference to `boost::system::generic_category()'
    libbitcoin_util.a(libbitcoin_util_a-system.o): In function `boost::system::error_category::std_category::equivalent(int, std::error_condition const&) const':
    /usr/include/boost/system/error_code.hpp:656: undefined reference to `boost::system::generic_category()'
    /usr/include/boost/system/error_code.hpp:659: undefined reference to `boost::system::generic_category()'
    libbitcoin_util.a(libbitcoin_util_a-system.o):/usr/include/boost/system/error_code.hpp:206: more undefined references to `boost::system::generic_category()' follow
    libbitcoin_util.a(libbitcoin_util_a-system.o): In function `__static_initialization_and_destruction_0':
    /usr/include/boost/system/error_code.hpp:210: undefined reference to `boost::system::system_category()'
    libbitcoin_util.a(libbitcoin_util_a-system.o): In function `_GLOBAL__sub_I_BITCOIN_CONF_FILENAME':
    /usr/include/boost/asio/error.hpp:230: undefined reference to `boost::system::system_category()'
    collect2: error: ld returned 1 exit status
    Makefile:5708: recipe for target 'bitcoind' failed
    make[2]: *** [bitcoind] Error 1
    make[2]: Leaving directory '/bitcoin-core/src'
    Makefile:16758: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/bitcoin-core/src'
    Makefile:814: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    

    Initial report by @hebasto in #20744 (comment)

  2. maflcko added the label Bug on Feb 10, 2022
  3. maflcko added this to the milestone 23.0 on Feb 10, 2022
  4. maflcko added the label Build system on Feb 10, 2022
  5. fanquake closed this on Feb 14, 2022

  6. sidhujag referenced this in commit 691cecb1fe on Feb 15, 2022
  7. bitcoin locked this on Oct 11, 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-24 09:15 UTC

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