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).
-latomic
needed
#29177
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).
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For detailed information about the code coverage, see the test coverage report.
See the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.
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)
hebasto
DrahtBot
maflcko
fanquake
Labels
Build system