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

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

    Code Coverage & Benchmarks

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

    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.

  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

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

    File commit 12fb00fd4228ad5158fd4893e7804d5667ea700b(master) commit ddeac5ea78d921fdbe944f845298d789dacd80e5(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

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-01 09:13 UTC

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