cmake: Always disable `install_name_tool` search in macOS cross-builds #37008

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:261129-install-name-tool changing 1 files +3 −6
  1. hebasto commented at 4:12 PM on November 29, 2026: member

    It was expected that CMake >= 4.2 would handle LLVM's install_name_tool binary properly. However, CMake MR 10955 fixed the search only for the unversioned binary, which is not always available. For example, the llvm package on Debian Trixie installs only /usr/bin/llvm-install-name-tool-19, but not the unversioned /usr/bin/llvm-install-name-tool, which results in a failure when configuring a cross-build for macOS.

    This PR applies the workaround regardless of the CMake version.

  2. hebasto added the label Build system on Nov 29, 2026
  3. DrahtBot commented at 4:12 PM on November 29, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    External sites

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK fanquake

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  4. in CMakeLists.txt:87 in 4a71d13248 outdated
      81 | @@ -82,13 +82,16 @@ set(CLIENT_BUGREPORT "https://github.com/bitcoin/bitcoin/issues")
      82 |  #=============================
      83 |  # Language setup
      84 |  #=============================
      85 | -if(CMAKE_VERSION VERSION_LESS 4.2 AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE)
      86 | +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_HOST_APPLE)
      87 |    # We do not use the install_name_tool when cross-compiling for macOS.
      88 | -  # However, CMake < 4.2 still searches for Apple's version of the tool,
    


    fanquake commented at 10:43 AM on December 1, 2026:

    I don't think we need to add even more explanation and more links. Could just be something like:

    We do not use the install_name_tool when cross-compiling for macOS. However, CMake still searches for it, which causes an error during configuration. So disable this tool check in further enable_language() commands. See: https://gitlab.kitware.com/cmake/cmake/-/work_items/28341

    ? and we can clean all this up once CMake fixes it properly, looks like that might be after 4.6.0?


    hebasto commented at 9:00 AM on December 2, 2026:

    Thanks! The explanatory comment has been reworded.

  5. fanquake commented at 10:43 AM on December 1, 2026: member

    Concept ACK

  6. cmake: Always disable `install_name_tool` search in macOS cross-builds
    It was expected that CMake >= 4.2 would handle LLVM's
    `install_name_tool` binary properly. However, CMake MR 10955 fixed
    the search only for the unversioned binary, which is not always
    available. For example, the `llvm` package on Debian Trixie installs
    only `/usr/bin/llvm-install-name-tool-19`, but not the unversioned
    `/usr/bin/llvm-install-name-tool`, which results in a failure when
    configuring a cross-build for macOS.
    
    This change applies the workaround regardless of the CMake version.
    0fb48fe30e
  7. hebasto force-pushed on Dec 2, 2026
  8. fanquake commented at 1:23 PM on December 2, 2026: member

    Guix Build:

    aarch64
    d542f202c3d868cc0aacf32dff4625a4da04d4e8737540b780f4176c76a461c6  guix-build-0fb48fe30ed6/output/aarch64-linux-gnu/SHA256SUMS.part
    8173102080053d140bf6fbac1eb8d28a9fb4bd272a22c8c426ef26e7702579ff  guix-build-0fb48fe30ed6/output/aarch64-linux-gnu/bitcoin-0fb48fe30ed6-aarch64-linux-gnu-debug.tar.gz
    4d50110e3f99353e1d125dc2b022f074f7b5ed3c631c45ef2759557af4c5373f  guix-build-0fb48fe30ed6/output/aarch64-linux-gnu/bitcoin-0fb48fe30ed6-aarch64-linux-gnu.tar.gz
    da8d3708376ed21c2f5f79f85109a85501bddb1dea46e4a764f65e3e6a086f81  guix-build-0fb48fe30ed6/output/arm-linux-gnueabihf/SHA256SUMS.part
    13ef903d5264b7bd85f3186ddda8482ad155bc4708b7e5acb8d0ed88a74136a3  guix-build-0fb48fe30ed6/output/arm-linux-gnueabihf/bitcoin-0fb48fe30ed6-arm-linux-gnueabihf-debug.tar.gz
    77a217c256a50d9ee088863a476f3853cb29bf666e52188cf55dcfec7e64bdda  guix-build-0fb48fe30ed6/output/arm-linux-gnueabihf/bitcoin-0fb48fe30ed6-arm-linux-gnueabihf.tar.gz
    57870ea002aece76f3691fe82ff72458b0d7c7eb0c60617dc2cf44c3e3e13d0e  guix-build-0fb48fe30ed6/output/arm64-apple-darwin/SHA256SUMS.part
    e39474e12ad225db18c389d626852c01a5baf235eeabf96e6e2a2c5b9a3eacc0  guix-build-0fb48fe30ed6/output/arm64-apple-darwin/bitcoin-0fb48fe30ed6-arm64-apple-darwin-codesigning.tar.gz
    5e904d89483354bfdf32cfe90ab9b7ac4fde6eebc2377faf9c979c6809212bfa  guix-build-0fb48fe30ed6/output/arm64-apple-darwin/bitcoin-0fb48fe30ed6-arm64-apple-darwin-unsigned.tar.gz
    74044fba38b573b980d5da05e73ccf89358d5121d03f9d3109f601c1ced89372  guix-build-0fb48fe30ed6/output/arm64-apple-darwin/bitcoin-0fb48fe30ed6-arm64-apple-darwin-unsigned.zip
    3578c551a000607703745673eee236fa3d6e0357e4f5e6ed11d127e8880aed43  guix-build-0fb48fe30ed6/output/dist-archive/bitcoin-0fb48fe30ed6.tar.gz
    b5479ad5299b8ea7b905b5956640ba7a40efdd881f6ab3155e3a13b9ceb4b4f6  guix-build-0fb48fe30ed6/output/powerpc64-linux-gnu/SHA256SUMS.part
    572cdc3b36a11d652fba019f315e97d01514615068ba45fb637d22cfb4bd09aa  guix-build-0fb48fe30ed6/output/powerpc64-linux-gnu/bitcoin-0fb48fe30ed6-powerpc64-linux-gnu-debug.tar.gz
    bd096f8f8eeff82d1e6382bdcbc6ef5e238d90594957ee727c9e45e2267a57e9  guix-build-0fb48fe30ed6/output/powerpc64-linux-gnu/bitcoin-0fb48fe30ed6-powerpc64-linux-gnu.tar.gz
    b3626d53ae0d23e4deb27f664a14001ac3ac546621ddd0300c96fe5499f0f0d4  guix-build-0fb48fe30ed6/output/riscv64-linux-gnu/SHA256SUMS.part
    81ef075e0c11d3733f10228249ce93a8edc57eda6449f9aaeb307c071fe0d692  guix-build-0fb48fe30ed6/output/riscv64-linux-gnu/bitcoin-0fb48fe30ed6-riscv64-linux-gnu-debug.tar.gz
    36a1cbd2e1415c1e86398687f80669817fb4d194bd59ae619ab56dfa285c90c4  guix-build-0fb48fe30ed6/output/riscv64-linux-gnu/bitcoin-0fb48fe30ed6-riscv64-linux-gnu.tar.gz
    155f879872987144ccef0d608920f3637307b5cb1f4e50445522b7f06ea6198a  guix-build-0fb48fe30ed6/output/x86_64-apple-darwin/SHA256SUMS.part
    2f4780e7bd291c9ca4f227a2c8470d371c1d8a148ef54f5d54382a5a743e5ecc  guix-build-0fb48fe30ed6/output/x86_64-apple-darwin/bitcoin-0fb48fe30ed6-x86_64-apple-darwin-codesigning.tar.gz
    a2732f81005b7bcc0473840745942fee7ffd7188687c2c08c5165206c85b7e9e  guix-build-0fb48fe30ed6/output/x86_64-apple-darwin/bitcoin-0fb48fe30ed6-x86_64-apple-darwin-unsigned.tar.gz
    9320324c4f19c0c7675ee549899e221704e2d57ea0387caf53bafce1a4fff535  guix-build-0fb48fe30ed6/output/x86_64-apple-darwin/bitcoin-0fb48fe30ed6-x86_64-apple-darwin-unsigned.zip
    fd3c28ef2595567808555be4388b298f6532ec5e6d469e896131347740b046d9  guix-build-0fb48fe30ed6/output/x86_64-linux-gnu/SHA256SUMS.part
    1727f609841408aa5586f395422ec4234404b69efd0ed0acff17c4a6106ef8e0  guix-build-0fb48fe30ed6/output/x86_64-linux-gnu/bitcoin-0fb48fe30ed6-x86_64-linux-gnu-debug.tar.gz
    f0c7ebfd78afa7658f32313645d8832f5c79a71744e5b9a26e24a7dd20499b0c  guix-build-0fb48fe30ed6/output/x86_64-linux-gnu/bitcoin-0fb48fe30ed6-x86_64-linux-gnu.tar.gz
    00b138a25910f1ac254d347477b1be54574bd78fe854e1c60ff97164445610ef  guix-build-0fb48fe30ed6/output/x86_64-w64-mingw32/SHA256SUMS.part
    75d27d4fce09c54c5976fc68bfe6f067eafe5a70b87785dc63767f5953fed4ae  guix-build-0fb48fe30ed6/output/x86_64-w64-mingw32/bitcoin-0fb48fe30ed6-win64-codesigning.tar.gz
    acb54023853e839cb5eff01561d62d5df0e66777d25ef1ae0998fdda3fe0a3a8  guix-build-0fb48fe30ed6/output/x86_64-w64-mingw32/bitcoin-0fb48fe30ed6-win64-debug.zip
    b6d55345dbe5352cad9c4dca78a78d68815c03a2185bc9a14eec419017575a52  guix-build-0fb48fe30ed6/output/x86_64-w64-mingw32/bitcoin-0fb48fe30ed6-win64-setup-unsigned.exe
    20a4103a4e1d19c381c28f5b958b1accd90ade476cf5136b6cc803c019a65b27  guix-build-0fb48fe30ed6/output/x86_64-w64-mingw32/bitcoin-0fb48fe30ed6-win64-unsigned.zip
    
  9. fanquake commented at 1:24 PM on December 2, 2026: member

    ACK 0fb48fe30ed6aaac20fd86e021938e7bc6c77f4e

  10. fanquake added the label Needs Backport (32.x) on Dec 2, 2026
  11. fanquake merged this on Dec 2, 2026
  12. fanquake closed this on Dec 2, 2026

  13. fanquake removed the label Needs Backport (32.x) on Dec 2, 2026
  14. fanquake commented at 4:22 PM on December 2, 2026: member

    Backported this to 32.x in #37052.

  15. hebasto deleted the branch on Dec 3, 2026

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-12-04 12:51 UTC

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