build: test_bitcoin link failure with -flto=thin & address sanitizer #33147

issue fanquake openend this issue on August 6, 2025
  1. fanquake commented at 3:46 pm on August 6, 2025: member
    0clang --version
    1clang version 20.1.8 (Fedora 20.1.8-3.fc43)
    2Target: aarch64-redhat-linux-gnu
    3Thread model: posix
    4InstalledDir: /usr/bin
    5Configuration file: /etc/clang/aarch64-redhat-linux-gnu-clang.cfg
    
     0export CC=clang
     1export CXX=clang++
     2# CMAKE_INTERPROCEDURAL_OPTIMIZATION is -flto=thin for clang
     3cmake -B build -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON -DSANITIZERS=address
     4<snip>
     5[ 54%] Built target bitcoin-util
     6[ 55%] Built target bitcoin-wallet
     7[ 72%] Built target bitcoin_node
     8[ 73%] Built target bitcoind
     9[ 73%] Linking CXX executable ../../bin/test_bitcoin
    10/usr/bin/ld: error: Failed to link module ../../lib/libbitcoin_consensus.a.llvm.20628.arith_uint256.cpp: Expected at most one ThinLTO module per bitcode file
    11clang++: error: linker command failed with exit code 1 (use -v to see invocation)
    

    We have seen the same issue in oss-fuzz: https://github.com/google/oss-fuzz/blob/564805ba6f3d5b3b9386ae68aaa919ffcf8b50da/projects/bitcoin-core/build.sh#L33.

  2. fanquake added the label Build system on Aug 6, 2025


fanquake

Labels
Build system


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: 2025-08-13 06:13 UTC

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