build: Patch Qt to handle minimum macOS version properly #28851

pull hebasto wants to merge 1 commits into bitcoin:master from hebasto:231110-qt-macos changing 2 files +20 −0
  1. hebasto commented at 0:01 am on November 11, 2023: member

    This PR is:

    Qt relies on the __MAC_OS_X_VERSION_MIN_REQUIRED macro, which is set in the AvailabilityInternal.h SDK header to the value provided by the Clang driver from the -mmacos-version-min / -mmacosx-version-min option.

    Xcode 12 SDK expects the OS-specific __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ macro:

    0#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
    1    #ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
    2        /* compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ */
    3        #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
    4    #endif
    5#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED*/
    

    In the other hand, Xcode 15 SDK expects a general __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__ macro:

     0#ifndef __MAC_OS_X_VERSION_MIN_REQUIRED
     1    #if defined(__has_builtin) && __has_builtin(__is_target_os)
     2        #if __is_target_os(macos)
     3            #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_OS_VERSION_MIN_REQUIRED__
     4            #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
     5        #endif
     6    #elif  __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 
     7        #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
     8        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_14_0
     9    #endif /*  __has_builtin(__is_target_os) && __is_target_os(macos) */
    10#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED */
    

    The latter macro is not provided by LLVM Clang until https://github.com/llvm/llvm-project/commit/c8e2dd8c6f490b68e41fe663b44535a8a21dfeab, which is available in Clang 17.

    The suggested patch makes Qt “borrow” the __MAC_OS_X_VERSION_MIN_REQUIRED value from MAC_OS_X_VERSION_MIN_REQUIRED, which is set in the AvailabilityMacros.h SDK header.

  2. build: Patch Qt to handle minimum macOS version properly
    This change is required to switch to macOS 14 SDK (Xcode 15).
    05aca09381
  3. DrahtBot commented at 0:01 am on November 11, 2023: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko
    Concept ACK fanquake

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

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #21778 (build: LLD based macOS toolchain by fanquake)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  4. DrahtBot added the label Build system on Nov 11, 2023
  5. fanquake added the label DrahtBot Guix build requested on Nov 11, 2023
  6. fanquake commented at 4:19 pm on November 11, 2023: member
    Concept ACK. Looks better than the previous two changes, and it’s clearer what’s being done. Picked it into #28622.
  7. DrahtBot commented at 4:38 pm on November 11, 2023: contributor

    Guix builds (on x86_64)

    File commit 1fdd832842f3b002ce0dd079747b6015fe5569cd(master) commit f7a7fe0efb5998c0b9ff5837b2e212b383ec3ab5(master and this pull)
    SHA256SUMS.part b69cad94fd2f2376... 312363aac101eeb6...
    *-aarch64-linux-gnu-debug.tar.gz c5e885cbef21fce8... fba651f8cc4fc028...
    *-aarch64-linux-gnu.tar.gz 613e5d3aa42cdb29... 1b311ce7dd801eb9...
    *-arm-linux-gnueabihf-debug.tar.gz 34610cad8b54aec8... c84b2795f178fd3a...
    *-arm-linux-gnueabihf.tar.gz a6c7c0e46fdbdc1b... e2954ea27e33e505...
    *-arm64-apple-darwin-unsigned.tar.gz 4ccad0146c0282b1... 49cbfab3fa037333...
    *-arm64-apple-darwin-unsigned.zip db5f3b1e5fe492e0... 803dc2a6c389de1d...
    *-arm64-apple-darwin.tar.gz f1dfe9e15a325b9d... 30cc6df3f5d111db...
    *-powerpc64-linux-gnu-debug.tar.gz db35919914fe7e30... 3e4260c28301ec85...
    *-powerpc64-linux-gnu.tar.gz 3a50d515327b186b... e65c10300e9972fb...
    *-powerpc64le-linux-gnu-debug.tar.gz dc75cdf3e1608519... 51094ab07741bc32...
    *-powerpc64le-linux-gnu.tar.gz 888fb3f7f1b7eb10... 49be9e2e91079c5f...
    *-riscv64-linux-gnu-debug.tar.gz 632e5ed4e3955ec9... ecb28e2e89ca8eeb...
    *-riscv64-linux-gnu.tar.gz 51c9503f74accd96... 055d8ebbee90a3e2...
    *-x86_64-apple-darwin-unsigned.tar.gz 8ec9bf39e88729a0... 20acd55934cb3fe0...
    *-x86_64-apple-darwin-unsigned.zip 009e88419326ccb2... 5ee5d2feae1bceb0...
    *-x86_64-apple-darwin.tar.gz 1dc19402c381ff77... 08baf4bf5269a031...
    *-x86_64-linux-gnu-debug.tar.gz cefdd41b078711cb... 29dd150e6176901d...
    *-x86_64-linux-gnu.tar.gz 9e1fd34c041d56ac... ee75bf339ea8e01b...
    *.tar.gz 37227c35724bb9b6... b3d040a2ecd19118...
    guix_build.log 6d65016e6083872a... b2930d6842956dd1...
    guix_build.log.diff 49924b774578612a...
  8. DrahtBot removed the label DrahtBot Guix build requested on Nov 11, 2023
  9. fanquake commented at 4:49 pm on November 11, 2023: member

    Guix build (aarch64):

    0d832f85daf44833b8bdb8fbf3947e0c6e7a1364cf33991e8f5c32a68e3321c3b  guix-build-05aca093819b/output/arm64-apple-darwin/SHA256SUMS.part
    16c163bfdb697ff4821e87645ad62bd1588c862cad07ec4ae901835e2368aba69  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.tar.gz
    2bc73c31b3b45588264685ee98449e8cb6eff8885b5cb696d782dbb95f1608ce6  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.zip
    3e13de2a319b857a7abbc6dbae3f3e22a3c7d75389f27d4bb48b0170bf760dbc4  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin.tar.gz
    42daf2522477cb6694944ee4174b5dbb18c2399da92b67372b80bb43915698280  guix-build-05aca093819b/output/dist-archive/bitcoin-05aca093819b.tar.gz
    57ecd0ded664945a684f5de03658bbcfcf9cc201f0cf49ee30328b7077a7da943  guix-build-05aca093819b/output/x86_64-apple-darwin/SHA256SUMS.part
    607991b5012af6e30a331faecf77ca1d4770c3f2f49a31b7c70069e0c23c02d2d  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.tar.gz
    7284fbfb741a3002d225ebedbf393ec1c0f2f6fd9d8e9ba8cf4733c67cf2222f9  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.zip
    8abcba6d0de6bea343ba916c504b5d9aaaed2ba6113652eb891176eead09cdc1a  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin.tar.gz
    
  10. hebasto commented at 5:50 pm on November 11, 2023: member

    My Guix builds:

     0x86_64
     1ad9dbeabb7fca2c4efa4057b3aee139c4325b6f5fb77c1ee10fe18940491b446  guix-build-05aca093819b/output/aarch64-linux-gnu/SHA256SUMS.part
     2afddca8689f4d21a08e448dd59ad4fa5329437f4042dd0d1cfc2d2cdc7d59b5f  guix-build-05aca093819b/output/aarch64-linux-gnu/bitcoin-05aca093819b-aarch64-linux-gnu-debug.tar.gz
     39ea86d3294960c4c442f30259d3c1b17a105902b22d20f874cabeb01bd6bf995  guix-build-05aca093819b/output/aarch64-linux-gnu/bitcoin-05aca093819b-aarch64-linux-gnu.tar.gz
     4ee100a86ec9231ce4516c345b811ccedb090299bc33a1c5da958e5e3be4ea952  guix-build-05aca093819b/output/arm-linux-gnueabihf/SHA256SUMS.part
     54a3b34b820962f6165680c3cd82a620a1bb6e0492913b8e2e24ba26ff918a9fc  guix-build-05aca093819b/output/arm-linux-gnueabihf/bitcoin-05aca093819b-arm-linux-gnueabihf-debug.tar.gz
     6992a566dc85faee25aa6274414d03f65dcb54b66436b0867cc6a896f0043202d  guix-build-05aca093819b/output/arm-linux-gnueabihf/bitcoin-05aca093819b-arm-linux-gnueabihf.tar.gz
     7d832f85daf44833b8bdb8fbf3947e0c6e7a1364cf33991e8f5c32a68e3321c3b  guix-build-05aca093819b/output/arm64-apple-darwin/SHA256SUMS.part
     86c163bfdb697ff4821e87645ad62bd1588c862cad07ec4ae901835e2368aba69  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.tar.gz
     9bc73c31b3b45588264685ee98449e8cb6eff8885b5cb696d782dbb95f1608ce6  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin-unsigned.zip
    10e13de2a319b857a7abbc6dbae3f3e22a3c7d75389f27d4bb48b0170bf760dbc4  guix-build-05aca093819b/output/arm64-apple-darwin/bitcoin-05aca093819b-arm64-apple-darwin.tar.gz
    112daf2522477cb6694944ee4174b5dbb18c2399da92b67372b80bb43915698280  guix-build-05aca093819b/output/dist-archive/bitcoin-05aca093819b.tar.gz
    125c8671a5141422eba6c6b5872e0fc727f2e3537fb4b2c29ec03e9d5ed7c84673  guix-build-05aca093819b/output/powerpc64-linux-gnu/SHA256SUMS.part
    13a581205b0e49058159a1973ee162b668b86e35222d5e6948504c58f664ce16d0  guix-build-05aca093819b/output/powerpc64-linux-gnu/bitcoin-05aca093819b-powerpc64-linux-gnu-debug.tar.gz
    140926a4a816ff9ca5224814479c39404078661d5caffdcc6ffc8fa623038cb174  guix-build-05aca093819b/output/powerpc64-linux-gnu/bitcoin-05aca093819b-powerpc64-linux-gnu.tar.gz
    15ef774df10a7a18ff16b3954cee485d0980f3ec7180beae0faab401a512ed24f3  guix-build-05aca093819b/output/powerpc64le-linux-gnu/SHA256SUMS.part
    16af290d36f2f5c7dc4e9dec76782f2a3c48e9c20fcc74c2759959713d5dc97be9  guix-build-05aca093819b/output/powerpc64le-linux-gnu/bitcoin-05aca093819b-powerpc64le-linux-gnu-debug.tar.gz
    1705d61508d97a589d0b567365c6757d9414fb4d8d4d247241d5d53793bfe0136d  guix-build-05aca093819b/output/powerpc64le-linux-gnu/bitcoin-05aca093819b-powerpc64le-linux-gnu.tar.gz
    1851eb6df4ae5a0cc6a3846fa97ecf5f5ad3b5ac3ff2fdd08b07018f98819837a7  guix-build-05aca093819b/output/riscv64-linux-gnu/SHA256SUMS.part
    199a0f1c712c92838e0627697efd7b1ebeb43ae693fe88c0a4ff37e0e0cbf471e1  guix-build-05aca093819b/output/riscv64-linux-gnu/bitcoin-05aca093819b-riscv64-linux-gnu-debug.tar.gz
    20763e887c3200b2f6751dcc3799847f604576391613b009817794b7ad19971f5f  guix-build-05aca093819b/output/riscv64-linux-gnu/bitcoin-05aca093819b-riscv64-linux-gnu.tar.gz
    217ecd0ded664945a684f5de03658bbcfcf9cc201f0cf49ee30328b7077a7da943  guix-build-05aca093819b/output/x86_64-apple-darwin/SHA256SUMS.part
    2207991b5012af6e30a331faecf77ca1d4770c3f2f49a31b7c70069e0c23c02d2d  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.tar.gz
    23284fbfb741a3002d225ebedbf393ec1c0f2f6fd9d8e9ba8cf4733c67cf2222f9  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin-unsigned.zip
    24abcba6d0de6bea343ba916c504b5d9aaaed2ba6113652eb891176eead09cdc1a  guix-build-05aca093819b/output/x86_64-apple-darwin/bitcoin-05aca093819b-x86_64-apple-darwin.tar.gz
    258dae3d6a30cbf52dba36b7d912fa5354b541b1a837b8e7283983af09c0f5969d  guix-build-05aca093819b/output/x86_64-linux-gnu/SHA256SUMS.part
    264796d8717321ab0c58abab938df6a2434eba5263fbfd07af493bc1c32edf07e3  guix-build-05aca093819b/output/x86_64-linux-gnu/bitcoin-05aca093819b-x86_64-linux-gnu-debug.tar.gz
    27b4cd5f2b7afb989d6038f7f2f3feec849c069d9262db0c37558e0fc86aaadd40  guix-build-05aca093819b/output/x86_64-linux-gnu/bitcoin-05aca093819b-x86_64-linux-gnu.tar.gz
    28caafed28357e934810767c052b013d9fd0e0d9ba66a450d81f64964079f1c798  guix-build-05aca093819b/output/x86_64-w64-mingw32/SHA256SUMS.part
    2947d6a9888f53d8642bd2298ffd31203311f0df366146fbdd43ffb1081388acad  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64-debug.zip
    3024ad030dcdfa74a772a182b7f6f6f9712f2788427b8ba7f09788b2035a5fc428  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64-setup-unsigned.exe
    3183bb1bebe378df16d8dc6d3c09d18288f0c028f14be184560b2ebfffafa35e8b  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64-unsigned.tar.gz
    32e3cd9ac6ccd51d7ec5076b9ad1a3775fafc36c8e744b0efd613c5f92860dc2bb  guix-build-05aca093819b/output/x86_64-w64-mingw32/bitcoin-05aca093819b-win64.zip
    
  11. Sjors commented at 7:05 am on November 13, 2023: member
    Getting the same hashes as @hebasto. Briefly tested that the binary still works on Intel macOS 13.6
  12. fanquake commented at 11:35 am on November 13, 2023: member
    Now we can actually almost do #21778, and avoid having to do this patching.
  13. hebasto commented at 11:25 am on November 15, 2023: member
    Could be closed in favour of #28880.
  14. maflcko added the label DrahtBot Guix build requested on Nov 30, 2023
  15. DrahtBot commented at 8:52 pm on November 30, 2023: contributor

    Guix builds (on x86_64)

    File commit 7bc8c5312bf51edd3d85e1599b5d6ae32c8fd7b5(master) commit 17314d927e35352b76e088af3aa802a784cb6ba0(master and this pull)
    SHA256SUMS.part 41271913616f9e9d... a277169dcd82f534...
    *-aarch64-linux-gnu-debug.tar.gz 9a462abbea92c408... 6e08812a13fb88f9...
    *-aarch64-linux-gnu.tar.gz 408db0ba23377e9a... 380fcdca11eb80b5...
    *-arm-linux-gnueabihf-debug.tar.gz 24d5ac17eb43a3fe... 7cee406047ac2cc0...
    *-arm-linux-gnueabihf.tar.gz 8efa0df8138de545... 824596f2124530d1...
    *-arm64-apple-darwin-unsigned.tar.gz d12354115312adc9... aa0b15c0fd32bf68...
    *-arm64-apple-darwin-unsigned.zip 66fda86732a6f7c7... b2dd1883457803a6...
    *-arm64-apple-darwin.tar.gz 541a0c4df8c6ab1e... 119169eb8d4697db...
    *-powerpc64-linux-gnu-debug.tar.gz 91da457635c06939... 2bc6b4b401afcd40...
    *-powerpc64-linux-gnu.tar.gz 6de43a525fd613e7... 61bb7b81ec100af3...
    *-powerpc64le-linux-gnu-debug.tar.gz 3f196e043c6f3862... d3398e974bcf7792...
    *-powerpc64le-linux-gnu.tar.gz a28c3cdb9bcd51bc... 696b172662924853...
    *-riscv64-linux-gnu-debug.tar.gz a5c07b18a9841847... 704a6e338a1a8c21...
    *-riscv64-linux-gnu.tar.gz 6d6a7cbe184dc569... 384105bad069fc02...
    *-x86_64-apple-darwin-unsigned.tar.gz f5e938e597ca6761... c989b65c4c235e59...
    *-x86_64-apple-darwin-unsigned.zip 04a57f310fdfd88d... 287766a936269e38...
    *-x86_64-apple-darwin.tar.gz a4c8d9f8a4235bbc... 3399e8f94d1292b3...
    *-x86_64-linux-gnu-debug.tar.gz 04323b5a3a67a1b4... ec2abcc65cb87f20...
    *-x86_64-linux-gnu.tar.gz ebf0412dba79f62e... ebc8be3e73c40f70...
    *.tar.gz f8419b5b77cf3fe3... b44307c2bdddef40...
    guix_build.log 28264c1254dec9dd... 0298b1aa535abcc6...
    guix_build.log.diff 44c15356771bd4ac...
  16. DrahtBot removed the label DrahtBot Guix build requested on Nov 30, 2023
  17. maflcko commented at 10:01 am on December 1, 2023: member
    lgtm ACK 05aca093819be276ac7d648472c6ed5c7d235cc5
  18. DrahtBot requested review from fanquake on Dec 1, 2023
  19. fanquake commented at 8:27 pm on December 1, 2023: member
    WIll merge this, given #28880 is blocked on non-determinism issues in Qt. I’ll rebase #28622 on top for C++20.
  20. fanquake merged this on Dec 1, 2023
  21. fanquake closed this on Dec 1, 2023

  22. hebasto deleted the branch on Dec 1, 2023

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 15:12 UTC

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