depends: Force `CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE` #32943

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:250710-package-registry changing 1 files +1 −0
  1. hebasto commented at 7:20 PM on July 10, 2025: member

    When using CMake policies 3.14 and below, the export(PACKAGE) command by default populates the user package registry, which is stored outside the build tree. Setting the CMAKE_EXPORT_NO_PACKAGE_REGISTRY variable disables this side effect.

    In CMake 3.15 and later, this behavior is disabled by default, and the variable has no effect.

    This PR forces CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE globally, rather than managing it for each dependency package individually rather. It may be reverted once all CMake-based packages have updated to policies 3.15 or newer.

    Fixes #32938.

  2. depends: Force `CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE`
    When using CMake policies 3.14 and below, the `export(PACKAGE)` command
    by default populates the user package registry, which is stored outside
    the build tree. Setting the `CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable
    disables this side effect.
    
    In CMake 3.15 and later, this behavior is disabled by default, and the
    variable has no effect.
    44f3bae300
  3. hebasto added the label Build system on Jul 10, 2025
  4. DrahtBot commented at 7:20 PM on July 10, 2025: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32943.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake
    Concept ACK theuni

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

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. theuni commented at 9:54 PM on July 10, 2025: member

    Yikes. Concept ACK.

    Could we also set CMAKE_FIND_USE_PACKAGE_REGISTRY to false in the toolchain file as a belt-and-suspenders in case some future package manually opts-in using CMAKE_EXPORT_PACKAGE_REGISTRY ?

  6. fanquake commented at 9:32 AM on July 11, 2025: member

    This is going to need backporting, to fix the 29.x branch.

  7. fanquake added the label Needs backport (29.x) on Jul 11, 2025
  8. maflcko added the label DrahtBot Guix build requested on Jul 11, 2025
  9. hebasto commented at 10:34 AM on July 11, 2025: member

    Could we also set CMAKE_FIND_USE_PACKAGE_REGISTRY to false in the toolchain file as a belt-and-suspenders in case some future package manually opts-in using CMAKE_EXPORT_PACKAGE_REGISTRY ?

    I don't think it prevents issues like #32938, which occur when the toolchain file is not used.

  10. hebasto commented at 10:43 AM on July 11, 2025: member

    This is going to need backporting, to fix the 29.x branch.

    I think it should be also backported to the 28.x branch, considering https://github.com/bitcoin/bitcoin/commit/f59e9057e2aa596b54cf9e85bab35c3ead137547.

    Additionally, we might want to advise users to delete the ~/.cmake/packages/libevent directory on their machines.

  11. DrahtBot commented at 11:39 PM on July 11, 2025: contributor

    <!--9cd9c72976c961c55c7acef8f6ba82cd-->

    Guix builds (on x86_64) [untrusted test-only build, possibly unsafe, not for production use]

    File commit 12fb00fd4228ad5158fd4893e7804d5667ea700b<br>(master) commit ddeac5ea78d921fdbe944f845298d789dacd80e5<br>(pull/32943/merge)
    *-aarch64-linux-gnu-debug.tar.gz 3e6db6b2a92ec38d... f10dc8611163571e...
    *-aarch64-linux-gnu.tar.gz d237464c3da00c64... 3adb01adb4e0daba...
    *-arm-linux-gnueabihf-debug.tar.gz 2fd2488b8c89516b... fd9efe0cb8622124...
    *-arm-linux-gnueabihf.tar.gz 4f1368bc070632a5... 450407434dddfaff...
    *-arm64-apple-darwin-codesigning.tar.gz 1357f810bbf948c2... e63994dad3aaa149...
    *-arm64-apple-darwin-unsigned.tar.gz 81a345df3778b7d6... 9b0e64c9e5279611...
    *-arm64-apple-darwin-unsigned.zip 5869393d614baec8... 5d270e31879d91e4...
    *-powerpc64-linux-gnu-debug.tar.gz a2b3a082c7cb48a2... 7dc062b22302d731...
    *-powerpc64-linux-gnu.tar.gz 46f6a45c63a955a1... 6fcf250179c7fc59...
    *-riscv64-linux-gnu-debug.tar.gz 6ed452da26e7ca4e... 46af5c01c14f166e...
    *-riscv64-linux-gnu.tar.gz 322180311cdfb956... 6bcf62db61328cc0...
    *-x86_64-apple-darwin-codesigning.tar.gz 471d1c93c5a2e400... 4c47cae003e6615e...
    *-x86_64-apple-darwin-unsigned.tar.gz 03d0c949fe2c90f9... e6c43b88ed478aac...
    *-x86_64-apple-darwin-unsigned.zip 5aff0350ee7085ac... 80a12b155ffd5d58...
    *-x86_64-linux-gnu-debug.tar.gz 880aa77d59900eab... cc3979bfa15dad68...
    *-x86_64-linux-gnu.tar.gz 73851d32a2ceafda... 50c1a4754e2b28a0...
    *.tar.gz 85ca28c280c2db86... abea6034ca07f068...
    SHA256SUMS.part 9e2b78d3b518fd39... 82daf28609baaed1...
    guix_build.log 46557ec7a496556c... a3f6b4c4bac8d435...
    guix_build.log.diff 66d38f9845fb6d98...
  12. DrahtBot removed the label DrahtBot Guix build requested on Jul 11, 2025
  13. fanquake commented at 12:31 PM on July 14, 2025: member

    ACK 44f3bae300dcafbe53f9b07e6cc22a112833e579

    Yikes. Concept ACK.

    Yea. It's an interesting example of how bumping/changing a CMake minimum version, can opt you into, or out of, unexpected behaviour (I imagine this is why this stopped being the default).

  14. DrahtBot requested review from theuni on Jul 14, 2025
  15. fanquake merged this on Jul 14, 2025
  16. fanquake closed this on Jul 14, 2025

  17. fanquake referenced this in commit bc2147c884 on Jul 14, 2025
  18. fanquake commented at 12:35 PM on July 14, 2025: member

    Backported to 29.x in #32863.

  19. fanquake removed the label Needs backport (29.x) on Jul 14, 2025
  20. fanquake referenced this in commit 792ee20318 on Jul 14, 2025
  21. fanquake commented at 12:41 PM on July 14, 2025: member

    Backported to 28.x in #32969.

  22. hebasto deleted the branch on Jul 14, 2025
  23. luke-jr referenced this in commit a19f529ab0 on Jul 17, 2025
  24. glozow referenced this in commit ef380a454c on Jul 18, 2025
  25. fanquake referenced this in commit a6d0159518 on Jul 23, 2025
  26. sedited referenced this in commit 02ded863ba on Jul 28, 2025
  27. sedited referenced this in commit 52d7f32bd6 on Jul 28, 2025
  28. alexanderwiederin referenced this in commit 28fe919bf7 on Aug 6, 2025
  29. sedited referenced this in commit b98d982d79 on Aug 7, 2025
  30. alexanderwiederin referenced this in commit 4152176d02 on Aug 8, 2025
  31. alexanderwiederin referenced this in commit 9ef94c31db on Aug 8, 2025
  32. stringintech referenced this in commit 71275a1b5e on Aug 17, 2025
  33. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  34. ajtowns referenced this in commit a3b68db613 on Sep 4, 2025
  35. bug-castercv502 referenced this in commit 4aa5572aea on Sep 28, 2025
  36. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  37. morozow referenced this in commit c127731ed1 on May 8, 2026
  38. morozow referenced this in commit 6c4eaecbfa on May 8, 2026
  39. morozow referenced this in commit d365167457 on May 8, 2026
  40. morozow referenced this in commit 8214c3bc7c on May 8, 2026
  41. Kino1994 referenced this in commit 8b9078f03f on Jun 28, 2026
  42. BigcoinBGC referenced this in commit 703cdb95b7 on Jun 30, 2026
  43. bitcoin locked this on Jul 30, 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-08-10 21:51 UTC

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