build: Fix check whether -latomic needed #29177

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:240104-atomic changing 1 files +3 −1
  1. hebasto commented at 11:50 am on January 4, 2024: member

    Clang >=15 still might need linking against libatomic.

    We use std::atomic<std::chrono::seconds>::compare_exchange_strong in net_processing.cpp.

    Addresses the #29165 (review).

  2. build: Fix check whether `-latomic` needed f8ca1357c8
  3. DrahtBot commented at 11:50 am on January 4, 2024: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, fanquake

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  4. DrahtBot added the label Build system on Jan 4, 2024
  5. maflcko added the label DrahtBot Guix build requested on Jan 4, 2024
  6. maflcko commented at 12:39 pm on January 4, 2024: member

    Testing on a fresh install of Ubuntu 24.04 Noble: export DEBIAN_FRONTEND=noninteractive && apt update && apt install curl wget htop git vim ccache -y && git clone https://github.com/bitcoin/bitcoin.git --depth=1 && cd bitcoin && git fetch origin --depth=1 f8ca1357c8205ceff732dcfb0d2bad79b40b611b && git checkout f8ca1357c8205ceff732dcfb0d2bad79b40b611b && apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 make automake cmake curl clang-17 llvm-17 g++-multilib libtool binutils-gold bsdmainutils pkg-config python3 patch bison -y && ( cd depends && make DEBUG=1 HOST=i686-pc-linux-gnu NO_QT=1 NO_WALLET=1 NO_ZMQ=1 NO_UPNP=1 NO_NATPMP=1 -j $(nproc) ) && ./autogen.sh && CONFIG_SITE="$PWD/depends/i686-pc-linux-gnu/share/config.site" ./configure CC='clang-17 -m32' CXX='clang++-17 -m32' --enable-fuzz --with-sanitizers=fuzzer && make -j $(nproc)

    On master:

    0  CXXLD    test/fuzz/fuzz
    1/usr/bin/ld: libbitcoin_node.a(libbitcoin_node_a-net_processing.o): in function `(anonymous namespace)::PeerManagerImpl::BlockConnected(ChainstateRole, std::shared_ptr<CBlock const> const&, CBlockIndex const*)':
    2net_processing.cpp:(.text._ZN12_GLOBAL__N_115PeerManagerImpl14BlockConnectedE14ChainstateRoleRKSt10shared_ptrIK6CBlockEPK11CBlockIndex[_ZN12_GLOBAL__N_115PeerManagerImpl14BlockConnectedE14ChainstateRoleRKSt10shared_ptrIK6CBlockEPK11CBlockIndex]+0x1ef): undefined reference to `__atomic_compare_exchange'
    3/usr/bin/ld: libbitcoin_node.a(libbitcoin_node_a-net_processing.o): in function `(anonymous namespace)::PeerManagerImpl::SendMessages(CNode*)':
    4net_processing.cpp:(.text._ZN12_GLOBAL__N_115PeerManagerImpl12SendMessagesEP5CNode[_ZN12_GLOBAL__N_115PeerManagerImpl12SendMessagesEP5CNode]+0x6755): undefined reference to `__atomic_compare_exchange'
    5clang++-17: error: linker command failed with exit code 1 (use -v to see invocation)
    

    This pull:

    (all good)

  7. maflcko commented at 12:39 pm on January 4, 2024: member
    lgtm ACK f8ca1357c8205ceff732dcfb0d2bad79b40b611b
  8. DrahtBot commented at 6:34 am on January 5, 2024: contributor

    Guix builds (on x86_64)

    File commit 737e5884cc82dc352cef3ef26abc1cb8d3500b8b(master) commit 5ce5262875dc59687b77e73f5a10007574ce7aed(master and this pull)
    SHA256SUMS.part a05449ccd1eedf9d... fe8d60bbcf9ad8cd...
    *-aarch64-linux-gnu-debug.tar.gz 566e2e720e510496... a685f4cdcb3aee69...
    *-aarch64-linux-gnu.tar.gz ac229ee212444de0... 969f2526d0697eda...
    *-arm-linux-gnueabihf-debug.tar.gz 102d6be068c3d6db... 89dc848df155e070...
    *-arm-linux-gnueabihf.tar.gz d9dbd398b7ac417a... 3b842464ec317e40...
    *-arm64-apple-darwin-unsigned.tar.gz 0e35063d34b37755... adcf46c22e631365...
    *-arm64-apple-darwin-unsigned.zip 75cc4be9a95235df... 19ed760a0e0d3d5d...
    *-arm64-apple-darwin.tar.gz 661ebadfcd81951b... 84ab633d7f83e5d0...
    *-powerpc64-linux-gnu-debug.tar.gz 4e30d97f09a8ad90... fc13019f93b13e8b...
    *-powerpc64-linux-gnu.tar.gz 2fa917b453e3b98e... 51a5f86e8669d447...
    *-powerpc64le-linux-gnu-debug.tar.gz 57964282dce22f4d... aab298fdecb3a42c...
    *-powerpc64le-linux-gnu.tar.gz ceb6f7cf6acdff9f... acf3ac47cfcd289f...
    *-riscv64-linux-gnu-debug.tar.gz 436eb35b0015a18e... 3fbd1e7ee15b6d27...
    *-riscv64-linux-gnu.tar.gz d3022d5be39d5c59... 25637002066d8a8c...
    *-x86_64-apple-darwin-unsigned.tar.gz c5a222621368a649... 37e2a7aed74cb942...
    *-x86_64-apple-darwin-unsigned.zip 3148c2407851a49f... bcb046a76fdd21d9...
    *-x86_64-apple-darwin.tar.gz 0bd0c25b23aa186d... d25006a37829577a...
    *-x86_64-linux-gnu-debug.tar.gz bba534832b7dd68f... cfa215a4e4fe9891...
    *-x86_64-linux-gnu.tar.gz e8b23d8149cb6e00... 6514d464b471868f...
    *.tar.gz 3f2dc263df892f77... 12b1625180444fb1...
    guix_build.log 5b6f96ccdf1553af... b7b63b58106165ed...
    guix_build.log.diff 55b083f7b7bcb07a...
  9. DrahtBot removed the label DrahtBot Guix build requested on Jan 5, 2024
  10. maflcko requested review from fanquake on Jan 5, 2024
  11. fanquake approved
  12. fanquake commented at 10:50 am on January 5, 2024: member
    ACK f8ca1357c8205ceff732dcfb0d2bad79b40b611b
  13. fanquake merged this on Jan 5, 2024
  14. fanquake closed this on Jan 5, 2024

  15. hebasto deleted the branch on Jan 5, 2024

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-07-05 19:13 UTC

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