doc: Clang 8 or later is required with FORCE_USE_SYSTEM_CLANG #19617

pull fanquake wants to merge 1 commits into bitcoin:master from fanquake:note_that_clang_8_is_required_with_force_system_clang changing 1 files +3 −3
  1. fanquake commented at 3:04 AM on July 29, 2020: member

    The usage of pragmas within the macOS SDK requires LLVM Clang 8. This is the same version as our prebuilt Clang, however the minimum is worth noting here as they may diverge and/or expert users might expect they could use an earlier version.

    If you compile depends using FORCE_USE_SYSTEM_CLANG=1 and Clang 7 you'll see output like:

    In file included from kernel/qcore_mac_objc.mm:44:
    In file included from /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSText.h:9:
    In file included from /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:19:
    In file included from /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10:
    /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:19:1: error:
          expected 'push' or 'pop' after '#pragma clang attribute'
    /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/usr/include/os/availability.h:104:273: note: expanded from macro
          'API_UNAVAILABLE_BEGIN'
      ...__API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_A...
                                                                                                                 ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    

    I've got a godbolt here that contains a demo of the issue (based off the macOS SDK). It will compile with Clang 8 but not with Clang 7.

  2. doc: Clang 8 or later is required with FORCE_USE_SYSTEM_CLANG
    The usage of pragmas within the macOS SDK requires LLVM Clang 8. This is
    the version as our prebuilt Clang, however the minimum is worth noting here
    as they may diverge and/or expert users might expect they could use an
    earlier version.
    
    If you compile using Clang 7 you'll see output like:
    ```bash
    In file included from kernel/qcore_mac_objc.mm:44:
    In file included from /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSText.h:9:
    In file included from /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSView.h:19:
    In file included from /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSResponder.h:10:
    /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/System/Library/Frameworks/AppKit.framework/Headers/NSEvent.h:19:1: error:
          expected 'push' or 'pop' after '#pragma clang attribute'
    /bitcoin/depends/SDKs/Xcode-11.3.1-11C505-extracted-SDK-with-libcxx-headers/usr/include/os/availability.h:104:273: note: expanded from macro
          'API_UNAVAILABLE_BEGIN'
      ...__API_UNAVAILABLE_BEGIN5, __API_UNAVAILABLE_BEGIN4, __API_UNAVAILABLE_BEGIN3, __API_UNAVAILABLE_BEGIN2, __API_UNAVAILABLE_BEGIN1, 0)(__VA_A...
                                                                                                                 ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    ```
    e60ef21b8a
  3. fanquake added the label Docs on Jul 29, 2020
  4. fanquake requested review from dongcarl on Jul 29, 2020
  5. laanwj commented at 3:02 PM on July 29, 2020: member

    ACK e60ef21b8a0f62ebc2e0bdbb5943fa80cc4d98b2

  6. dongcarl commented at 6:09 PM on July 30, 2020: member

    Feel free to let me know if you don't want to expand on the scope of this PR @fanquake, but I'd like to document our overall approach to constructing the OSX toolchain, especially picking versions of tools. I don't think it's written down anywhere in the codebase yet.

  7. fanquake commented at 12:23 AM on July 31, 2020: member

    @dongcarl I'm going to merge this as-is. We can follow up with some more extensive macOS toolchain docs (although we should probably write some more general docs), either in a separate PR or as part of #17920 🤔.

  8. fanquake merged this on Jul 31, 2020
  9. fanquake closed this on Jul 31, 2020

  10. fanquake deleted the branch on Jul 31, 2020
  11. sidhujag referenced this in commit d2635e9d53 on Jul 31, 2020
  12. jasonbcox referenced this in commit 1ab1c33263 on Oct 6, 2020
  13. PastaPastaPasta referenced this in commit d3944c8fd6 on Sep 17, 2021
  14. PastaPastaPasta referenced this in commit 1aa025f402 on Sep 19, 2021
  15. thelazier referenced this in commit 63f3882ac8 on Sep 25, 2021
  16. DrahtBot locked this on Feb 15, 2022


dongcarl

Labels

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-04-22 18:14 UTC

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