guix: Do not set `C{PLUS}_INCLUDE_PATH` variables for Darwin builds #31214

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:241104-guix-inc-paths changing 1 files +11 −5
  1. hebasto commented at 3:58 PM on November 4, 2024: member

    When cross-building for macOS, the C{PLUS}_INCLUDE_PATH environment variables modify the default include directories for both native GCC and cross Clang compilers, which is overkill and undesirable for the latter.

    This change avoids setting the C{PLUS}_INCLUDE_PATH environment variables and instead sets the required -isystem flags for the native compiler explicitly.

    Additionally, this PR helps avoid non-trivial patching of Qt 6.

  2. guix: Do not set `C{PLUS}_INCLUDE_PATH` variables for Darwin builds
    When cross-building for macOS, the `C{PLUS}_INCLUDE_PATH` environment
    variables modify the default include directories for both native GCC and
    cross Clang compilers, which is overkill and undesirable for the latter.
    
    This change avoids setting the `C{PLUS}_INCLUDE_PATH` environment
    variables and instead sets the required `-isystem` flags for the native
    compiler explicitly.
    9caf3c3fe5
  3. hebasto added the label Build system on Nov 4, 2024
  4. DrahtBot commented at 3:58 PM on November 4, 2024: 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/31214.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

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

  5. fanquake commented at 4:09 PM on November 4, 2024: member

    This doesn't Guix build for Darwin:

    INFO: Building 9caf3c3fe59c for platform triple arm64-apple-darwin:
          ...using reference timestamp: 1730735608
          ...running at most 10 jobs
          ...from worktree directory: '/bitcoin'
              ...bind-mounted in container to: '/bitcoin'
          ...in build directory: '/bitcoin/guix-build-9caf3c3fe59c/distsrc-9caf3c3fe59c-arm64-apple-darwin'
              ...bind-mounted in container to: '/distsrc-base/distsrc-9caf3c3fe59c-arm64-apple-darwin'
          ...outputting in: '/bitcoin/guix-build-9caf3c3fe59c/output/arm64-apple-darwin'
              ...bind-mounted in container to: '/outdir-base/arm64-apple-darwin'
          ADDITIONAL FLAGS (if set)
              ADDITIONAL_GUIX_COMMON_FLAGS: 
              ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: 
              ADDITIONAL_GUIX_TIMEMACHINE_FLAGS: 
    Required environment variables as seen inside the container:
        DIST_ARCHIVE_BASE: /outdir-base/dist-archive
        DISTNAME: bitcoin-9caf3c3fe59c
        HOST: arm64-apple-darwin
        SOURCE_DATE_EPOCH: 1730735608
        JOBS: 10
        DISTSRC: /distsrc-base/distsrc-9caf3c3fe59c-arm64-apple-darwin
        OUTDIR: /outdir-base/arm64-apple-darwin
    make: Entering directory '/bitcoin/depends'
    Configuring qt...
    Creating qmake...
    make[1]: Entering directory '/bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/qmake'
    In file included from /gnu/store/r5l0vf02pkqpjzw2czilpjwfn335acy3-glibc-2.35/include/errno.h:28,
                     from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/cerrno:42,
                     from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/ext/string_conversions.h:44,
                     from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/bits/basic_string.h:3972,
                     from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/string:53,
                     from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/../../src/corelib/text/qbytearray.h:52,
                     from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/qbytearray.h:1,
                     from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/../../src/corelib/text/qstring.h:50,
                     from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/qstring.h:1,
                     from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/qmake/library/ioutils.h:34,
                     from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/qmake/library/ioutils.cpp:29:
    /gnu/store/r5l0vf02pkqpjzw2czilpjwfn335acy3-glibc-2.35/include/bits/errno.h:26:11: fatal error: linux/errno.h: No such file or directory
       26 | # include <linux/errno.h>
          |           ^~~~~~~~~~~~~~~
    compilation terminated.
    
  6. hebasto marked this as a draft on Nov 4, 2024
  7. hebasto commented at 4:20 PM on November 4, 2024: member

    This doesn't Guix build for Darwin:

    Right. The current qt.mk does not use build_{CC,CXX} variables. This patch is meaningful only in #30997.

  8. hebasto closed this on Nov 4, 2024

  9. bitcoin locked this on Nov 4, 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: 2026-05-02 15:13 UTC

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