Pass custom DEP_OPTS and CONFIG_FLAGS to guix-build #31763

pull Sjors wants to merge 2 commits into bitcoin:master from Sjors:2025/01/guix-config-flags changing 2 files +8 −5
  1. Sjors commented at 11:45 am on January 30, 2025: member

    This allows building deterministic binaries with multiprocess like so:

    0DEP_OPTS="MULTIPROCESS=1" contrib/guix/guix-build
    

    Additionally custom options can be passed to cmake -B using CONFIG_FLAGS. Example (turns off external signer support, the rest is default):

    0CONFIG_FLAGS="-DENABLE_EXTERNAL_SIGNER=OFF -DREDUCE_EXPORTS=ON -DBUILD_BENCH=OFF -DBUILD_GUI_TESTS=OFF -DBUILD_FUZZ_BINARY=OFF" contrib/guix/guix-build
    

    The CONFIG_FLAGS is less useful in practice, because:

    1. Some options will cause the Guix build to fail, e.g. because the packaging step assumes their presence.
    2. Some options are already indirectly controlled though DEP_OPTS
  2. DrahtBot commented at 11:45 am on January 30, 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/31763.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

    Conflicts

    No conflicts as of last run.

  3. Sjors marked this as ready for review on Jan 30, 2025
  4. DrahtBot added the label CI failed on Jan 30, 2025
  5. DrahtBot commented at 12:28 pm on January 30, 2025: contributor

    🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/36413011811

    Try to run the tests locally, according to the documentation. However, a CI failure may still happen due to a number of reasons, for example:

    • Possibly due to a silent merge conflict (the changes in this pull request being incompatible with the current code in the target branch). If so, make sure to rebase on the latest commit of the target branch.

    • A sanitizer issue, which can only be found by compiling with the sanitizer and running the affected test.

    • An intermittent issue.

    Leave a comment here, if you need help tracking down a confusing failure.

  6. Sjors force-pushed on Jan 30, 2025
  7. Sjors force-pushed on Jan 31, 2025
  8. Pass custom DEP_OPTS to guix-build 5fe16f0bf2
  9. Pass custom CONFIG_FLAGS to guix-build df203c8d07
  10. Sjors force-pushed on Jan 31, 2025
  11. Sjors commented at 6:27 pm on January 31, 2025: member
    A couple fights with bash and the linter later… (ok ${DEP_OPTS:+"$DEP_OPTS"} instead of just $DEP_OPTS, fine)
  12. DrahtBot removed the label CI failed on Jan 31, 2025
  13. fanquake commented at 12:05 pm on February 3, 2025: member
    ~0. The benefit here seems limited, as the project has no need for these options in its release process. Outside of that, anyone wanting to do a “custom” release build, is likely already modifying the source, so can change the script for their own needs. As mentioned in the PR description, arbitrary changes to the CMake config, also don’t really make sense, because they will cause failures for various reasons (i.e disabling the GUI would then cause failures at the packaging steps), and if you need to make other source changes to prevent the build failures, you should just make the config changes to the Guix script (unless the plan is to have a build that fails, but still produces binaries, but I also don’t think that’s something we’d want to support).
  14. maflcko commented at 4:02 pm on February 3, 2025: member
    It seems a bit confusing to leak the env into guix, which may then cause non-determinism, compiling the same source commit id. It seems simpler to just create a commit with your modifications to the config.
  15. Sjors closed this on Feb 3, 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-02-05 15:12 UTC

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