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

    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/31214.

    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:

     0INFO: Building 9caf3c3fe59c for platform triple arm64-apple-darwin:
     1      ...using reference timestamp: 1730735608
     2      ...running at most 10 jobs
     3      ...from worktree directory: '/bitcoin'
     4          ...bind-mounted in container to: '/bitcoin'
     5      ...in build directory: '/bitcoin/guix-build-9caf3c3fe59c/distsrc-9caf3c3fe59c-arm64-apple-darwin'
     6          ...bind-mounted in container to: '/distsrc-base/distsrc-9caf3c3fe59c-arm64-apple-darwin'
     7      ...outputting in: '/bitcoin/guix-build-9caf3c3fe59c/output/arm64-apple-darwin'
     8          ...bind-mounted in container to: '/outdir-base/arm64-apple-darwin'
     9      ADDITIONAL FLAGS (if set)
    10          ADDITIONAL_GUIX_COMMON_FLAGS: 
    11          ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: 
    12          ADDITIONAL_GUIX_TIMEMACHINE_FLAGS: 
    13Required environment variables as seen inside the container:
    14    DIST_ARCHIVE_BASE: /outdir-base/dist-archive
    15    DISTNAME: bitcoin-9caf3c3fe59c
    16    HOST: arm64-apple-darwin
    17    SOURCE_DATE_EPOCH: 1730735608
    18    JOBS: 10
    19    DISTSRC: /distsrc-base/distsrc-9caf3c3fe59c-arm64-apple-darwin
    20    OUTDIR: /outdir-base/arm64-apple-darwin
    21make: Entering directory '/bitcoin/depends'
    22Configuring qt...
    23Creating qmake...
    24make[1]: Entering directory '/bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/qmake'
    25In file included from /gnu/store/r5l0vf02pkqpjzw2czilpjwfn335acy3-glibc-2.35/include/errno.h:28,
    26                 from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/cerrno:42,
    27                 from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/ext/string_conversions.h:44,
    28                 from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/bits/basic_string.h:3972,
    29                 from /gnu/store/y3nl9r7fazhhi472kzxhhdd456221slp-gcc-12.4.0/include/c++/string:53,
    30                 from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/../../src/corelib/text/qbytearray.h:52,
    31                 from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/qbytearray.h:1,
    32                 from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/../../src/corelib/text/qstring.h:50,
    33                 from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/include/QtCore/qstring.h:1,
    34                 from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/qmake/library/ioutils.h:34,
    35                 from /bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-d7885520239/qtbase/qmake/library/ioutils.cpp:29:
    36/gnu/store/r5l0vf02pkqpjzw2czilpjwfn335acy3-glibc-2.35/include/bits/errno.h:26:11: fatal error: linux/errno.h: No such file or directory
    37   26 | # include <linux/errno.h>
    38      |           ^~~~~~~~~~~~~~~
    39compilation 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


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: 2024-11-21 09:12 UTC

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