Ubuntu 20.04 Server - Build Error #25283

issue MishaVernik opened this issue on June 6, 2022
  1. MishaVernik commented at 8:35 AM on June 6, 2022: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    Expected behavior Building bitcoin v.0.21

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

    Actual behavior `root@ubuntu-s-1vcpu-1gb-ams3-01:~/bitcoin# make

    Making all in src make[1]: Entering directory '/root/bitcoin/src' make[2]: Entering directory '/root/bitcoin/src' make[3]: Entering directory '/root/bitcoin' make[3]: Leaving directory '/root/bitcoin' CXXLD bitcoind /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::detail::thread_data<AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*)::{lambda()#2}>::~thread_data()': /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::detail::thread_data<AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*)::{lambda()#3}>::~thread_data()': /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::detail::sp_counted_impl_p<boost::detail::thread_data<AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*)::{lambda()#3}> >::dispose()': /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::detail::sp_counted_impl_p<boost::detail::thread_data<AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo*)::{lambda()#2}> >::dispose()': /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread_group::interrupt_all()': /usr/include/boost/thread/detail/thread_group.hpp:132: undefined reference to boost::thread::interrupt()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread_group::join_all()': /usr/include/boost/thread/detail/thread_group.hpp:118: undefined reference to boost::thread::joinable() const' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread::get_id() const': /usr/include/boost/thread/detail/thread.hpp:716: undefined reference to boost::thread::native_handle()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread::join()': /usr/include/boost/thread/detail/thread.hpp:740: undefined reference to boost::thread::join_noexcept()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread::start_thread()': /usr/include/boost/thread/detail/thread.hpp:182: undefined reference to boost::thread::start_thread_noexcept()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::detail::thread_data_base::thread_data_base()': /usr/include/boost/thread/pthread/thread_data.hpp:162: undefined reference to vtable for boost::detail::thread_data_base' /usr/bin/ld: /usr/include/boost/thread/pthread/thread_data.hpp:162: undefined reference to vtable for boost::detail::thread_data_base' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread::start_thread()': /usr/include/boost/thread/detail/thread.hpp:182: undefined reference to boost::thread::start_thread_noexcept()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::detail::thread_data<AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo)::{lambda()#2}>::~thread_data()': /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::detail::thread_data<AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo)::{lambda()#3}>::~thread_data()': /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function AppInitMain(util::Ref const&, NodeContext&, interfaces::BlockAndHeaderTipInfo) [clone .cold]': /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: /usr/include/boost/thread/detail/thread.hpp:94: undefined reference to boost::detail::thread_data_base::~thread_data_base()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread::~thread()': /usr/include/boost/thread/detail/thread.hpp:257: undefined reference to boost::thread::detach()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function `boost::detail::interruption_checker::interruption_checker(pthread_mutex_t, pthread_cond_t*)': /usr/include/boost/thread/pthread/thread_data.hpp:207: undefined reference to boost::detail::get_current_thread_data()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::shared_mutex::lock()': /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::condition_variable::wait(boost::unique_lockboost::mutex&)': /usr/include/boost/thread/pthread/condition_variable.hpp:88: undefined reference to boost::this_thread::interruption_point()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::shared_mutex::lock()': /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::shared_mutex::lock_shared()': /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::condition_variable::wait(boost::unique_lock<boost::mutex>&)': /usr/include/boost/thread/pthread/condition_variable.hpp:88: undefined reference to boost::this_thread::interruption_point()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::shared_mutex::lock_shared()': /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o): in function boost::thread::~thread()': /usr/include/boost/thread/detail/thread.hpp:257: undefined reference to boost::thread::detach()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o):(.data.rel.ro+0x98): undefined reference to typeinfo for boost::detail::thread_data_base' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-init.o):(.data.rel.ro+0xb0): undefined reference to typeinfo for boost::detail::thread_data_base' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::shared_mutex::lock_shared()': /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::condition_variable::wait(boost::unique_lockboost::mutex&)': /usr/include/boost/thread/pthread/condition_variable.hpp:88: undefined reference to boost::this_thread::interruption_point()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::shared_mutex::lock_shared()': /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::shared_mutex::lock()': /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::condition_variable::wait(boost::unique_lockboost::mutex&)': /usr/include/boost/thread/pthread/condition_variable.hpp:88: undefined reference to boost::this_thread::interruption_point()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::shared_mutex::lock()': /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::shared_mutex::lock_shared()': /usr/include/boost/thread/pthread/shared_mutex.hpp:171: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-sigcache.o): in function boost::shared_mutex::lock()': /usr/include/boost/thread/pthread/shared_mutex.hpp:269: undefined reference to boost::this_thread::disable_interruption::~disable_interruption()' /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-validation.o): in function boost::condition_variable::wait(boost::unique_lockboost::mutex&)': /usr/include/boost/thread/pthread/condition_variable.hpp:88: undefined reference to boost::this_thread::interruption_point()' collect2: error: ld returned 1 exit status make[2]: *** [Makefile:8343: bitcoind] Error 1 make[2]: Leaving directory '/root/bitcoin/src' make[1]: *** [Makefile:19347: all-recursive] Error 1 make[1]: Leaving directory '/root/bitcoin/src' make: *** [Makefile:801: all-recursive] Error 1

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

    To reproduce

    1. Go to the server hosting provider (e.g. digitalocean.com)
    2. Create a dropplet (e.g. Ubuntu 20.04 server)
    3. Clone bitcoin
    4. Use the commands below
    sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
    sudo apt install libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev
    
    sudo apt install libsqlite3-dev
    ./contrib/install_db4.sh $(pwd)
    export BDB_PREFIX=$(pwd)/db4
    

    ./autogen.sh ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"

    make

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    System information Linux ubuntu-s-1vcpu-1gb-ams3-01 5.4.0-113-generic #127-Ubuntu SMP Wed May 18 14:30:56 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

    CPU: Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian Address sizes: 40 bits physical, 48 bits virtual CPU(s): 2 On-line CPU(s) list: 0,1 Thread(s) per core: 1 Core(s) per socket: 2 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 63 Model name: DO-Regular Stepping: 2 CPU MHz: 2294.608 BogoMIPS: 4589.21 Virtualization: VT-x Hypervisor vendor: KVM Virtualization type: full L1d cache: 64 KiB L1i cache: 64 KiB L2 cache: 8 MiB NUMA node0 CPU(s): 0,1 Vulnerability Itlb multihit: KVM: Mitigation: Split huge pages Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT disabled Vulnerability Mds: Mitigation; Clear CPU buffers; SMT Host state unknown Vulnerability Meltdown: Mitigation; PTI Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP disabled, RSB filling Vulnerability Srbds: Not affected Vulnerability Tsx async abort: Not affected Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon rep_good nopl cpuid tsc_known_freq pni pclmulqdq vmx ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf _lm abm cpuid_fault invpcid_single pti ssbd ibrs ibpb tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveop t md_clear

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

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

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

    <!-- 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. -->

  2. MishaVernik added the label Bug on Jun 6, 2022
  3. hebasto commented at 8:43 AM on June 6, 2022: member

    Building bitcoin v.0.21

    4. Use the commands below

    sudo apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
    sudo apt install libevent-dev libboost-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev
    

    According to https://github.com/bitcoin/bitcoin/blob/0.21/doc/build-unix.md the libboost-thread-dev package must be installed as well.

  4. hebasto removed the label Bug on Jun 6, 2022
  5. hebasto added the label Questions and Help on Jun 6, 2022
  6. MarcoFalke commented at 8:44 AM on June 6, 2022: member

    Does installing libboost-thread-dev help?

  7. MishaVernik commented at 8:47 AM on June 6, 2022: none

    No

    root@ubuntu-s-1vcpu-1gb-ams3-01:~/bitcoin# apt install libboost-thread-dev Reading package lists... Done Building dependency tree Reading state information... Done libboost-thread-dev is already the newest version (1.71.0.0ubuntu2). libboost-thread-dev set to manually installed. The following packages were automatically installed and are no longer required: python3-cliapp python3-markdown python3-packaging python3-pygments python3-pyparsing python3-ttystatus Use 'apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 64 not upgraded.

  8. MarcoFalke commented at 8:58 AM on June 6, 2022: member

    What is the output of git log -1 and the part of configure that says "Options used to compile and link: ..."?

  9. MarcoFalke commented at 9:09 AM on June 6, 2022: member

    Are you sure this is a fresh droplet? I just installed Focal from scratch and everything passed fine:

    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 && git checkout v0.21.2 && apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq     libevent-dev libboost-dev libsqlite3-dev  libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev  -y   && ./contrib/install_db4.sh $(pwd) && export BDB_PREFIX=$(pwd)/db4 &&   ./autogen.sh &&    ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"  && make -j $(nproc)
    
  10. MarcoFalke added the label Build system on Jun 6, 2022
  11. MishaVernik commented at 9:13 AM on June 6, 2022: none

    root@ubuntu-s-1vcpu-1gb-ams3-01:~/bitcoin# git log -1 commit 95ea54ba089610019a74c1176a2c7c0dba144b1c (HEAD, tag: v0.21.0) Author: Wladimir J. van der Laan laanwj@protonmail.com Date: Wed Jan 13 22:52:11 2021 +0100

    build: Bump RC to 0 (-final)
    
    Tree-SHA512: 1a626b9bb7fb04ece4acb24ffcfed178cc5128d16af6860ed37097b6ed36be8b33797bd70a6da0364cd6a9246ebc02fbb83f9523abf5f8dc3c7a524a58416a8f

    Should be fresh, I tried it on 2 different Ubuntu servers. root@ubuntu-s-1vcpu-1gb-ams3-01:~/bitcoin# 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 && git checkout v0.21.2 && apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq libevent-dev libboost-dev libsqlite3-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev -y && ./contrib/install_db4.sh $(pwd) && export BDB_PREFIX=$(pwd)/db4 && ./autogen.sh && ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" && make -j $(nproc) Ign:1 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu focal InRelease Hit:2 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease Err:3 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu focal Release 404 Not Found [IP: 2620:2d:4000:1::3e 80] Hit:4 https://dl.yarnpkg.com/debian stable InRelease Hit:5 http://mirrors.digitalocean.com/ubuntu focal InRelease Hit:6 http://mirrors.digitalocean.com/ubuntu focal-updates InRelease Hit:7 http://mirrors.digitalocean.com/ubuntu focal-backports InRelease Get:8 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

  12. MarcoFalke commented at 9:21 AM on June 6, 2022: member

    It doesn't seem so fresh if even a basic apt update fails. You will need to ensure that the underlying Ubuntu is not broken, otherwise there is nothing we can do.

  13. MishaVernik commented at 9:37 AM on June 6, 2022: none

    Tested on another server and it worked.

    Interesting stuff. Team Bitcoin and @MarcoFalke thanks in advance.

    This issue can be closed.

  14. MishaVernik closed this on Jun 6, 2022

  15. DrahtBot locked this on Jun 6, 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-17 06:13 UTC

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