Skip to content

Build arm64 during Mac Host Engine build #84453

Closed

Description

@jmagman

Dart side is looking good: https://ci.chromium.org/p/dart/builders/ci.sandbox/vm-kernel-mac-release-arm64

Add configuration to build the ARM macOS host engine.

Activity

  1. added
    c: contributor-productivityTeam-specific productivity, code health, technical debt.
    engineflutter/engine related. See also e: labels.
    team-infraOwned by Infrastructure team
    P2Important issues not at the top of the work list
    on Jun 11, 2021
  2. zanderso commented on Jun 11, 2021

    @zanderso
    Member

    /cc @gw280

  3. godofredoc commented on Aug 5, 2021

    @godofredoc
    Contributor

    @jmagman @gw280 Is this blocked on something from infra?

  4. jmagman commented on Aug 5, 2021

    @jmagman
    MemberAuthor

    I don't think it's blocked on anything from the infra team.
    It will likely involve updating engine and buildroot build rules, as well as recipe changes like https://flutter-review.googlesource.com/c/recipes/+/14780.

  5. jmagman commented on Aug 23, 2021

    @jmagman
    MemberAuthor

    flutter_tester Rosetta issue: #88106

  6. zanderso commented on Oct 10, 2021

    @zanderso
    Member

    It looks like we'll need a newer MacOS SDK to target arm64 from the Engine builder.

    https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/zra_google.com/c1ca466e97044968507388a4dcf8455c97a2c04a06c9e2611114075a9070c467/+/build.proto?server=chromium-swarm.appspot.com

    @godofredoc I see that it's possible to use a newer SDK from the devicelab builders, but not sure what the right thing is to do from the Engine builder.

  7. changed the title [-]Build ARM during Mac Host Engine build[/-] [+]Build arm64 during Mac Host Engine build[/+] on Oct 10, 2021
  8. jmagman commented on Oct 11, 2021

    @jmagman
    MemberAuthor

    https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/zra_google.com/c1ca466e97044968507388a4dcf8455c97a2c04a06c9e2611114075a9070c467/+/build.proto?server=chromium-swarm.appspot.com

    @zanderso That link isn't loading for me, @CaseyHillers suggests a LUCI outage may have been unable to write the initial request, and you'll need to retry it? But you ran it 23 hours ago and I assume you saw the logs based on your comment.

    If you can load it, can you just upload the logs in question? Or re-run it?

  9. godofredoc commented on Oct 11, 2021

    @godofredoc
    Contributor

    Devicelab tests are currently using: 12c33

    Can you please add the following to your led command?

    led edit -pa xcode=12c33 | led edit -pa $flutter/osx_sdk='{"sdk_version": "12c33" }'

  10. jmagman commented on Oct 11, 2021

    @jmagman
    MemberAuthor

    The builders can't use 12c33 due to bitcode issues, it needs to stay on the version of clang associated with the lowest version supported by the flutter_tool.
    We need to add macOS 11 (Big Sur) SDK to the existing 12a7209 cipd package.

  11. 5 remaining items

  12. zanderso commented on Oct 12, 2021

    @zanderso
    Member

    Need to pass -fno-aligned-allocation for macOS arm64 like we do for iOS arm: flutter-team-archive/buildroot#517

  13. jmagman commented on Oct 19, 2021

    @jmagman
    MemberAuthor

    We need to add macOS 11 (Big Sur) SDK to the existing 12a7209 cipd package.

    I'll work on that now.

    I've been trying to get the Xcode cipd package uploaded, but since it's the same Xcode version as an existing one (but with an additional macOS SDK), and the ref is automatically set to the Xcode version, and it causes duplicates. I filed #92051 to pick up https://chromium-review.googlesource.com/c/infra/infra/+/3219264

  14. jmagman commented on Oct 22, 2021

    @jmagman
    MemberAuthor
  15. jmagman commented on Oct 26, 2021

    @jmagman
    MemberAuthor

    This one worked:
    https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/magder_google.com/203581ea3aba655c835c078b8d1b35cbaea22ec27c65ef72e9e1806297d1512b/+/build.proto?server=chromium-swarm.appspot.com

    The failures there I fixed locally by bumping the SDK versions in:

    https://github.com/flutter/buildroot/blob/master/build/config/mac/mac_sdk.gni

    up to 10.14, but I'm not actually sure that's the right thing to do.

    @zanderso Can you try again with your recipe changed to:

    "sdk_version": "12a7209sdkbigsur1"
    
    "xcode": "12a7209sdkbigsur1"
    

    Open to suggestions for a better name for this package, which is 12a7209 + the first macOS 11 Big Sur SDK. The name needs to be alphanumeric only.

  16. zanderso commented on Oct 27, 2021

    @zanderso
    Member

    @jmagman this is on my radar. I'll hopefully be able to give it a shot today or tomorrow.

  17. zanderso commented on Nov 3, 2021

    @zanderso
    Member
  18. jmagman commented on Nov 3, 2021

    @jmagman
    MemberAuthor

    Ugh I messed it up, I added macOS 10.15 (Catalina) instead of macOS 11 (Big Sur)
    The old error was:

    error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
    

    The new error shows it's using MacOSX10.15 but it should be using MacOSX11.0

    /opt/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
    typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
    

    However, I think this is showing that our version of clang is too old to handle even MacOSX10.15. I think we may need to update clang, which means this is dependent on bumping the tools minimum Xcode version to 12.2, and therefore all our developers would need to update their version of Xcode to at least 12.2 (the old bitcode issue).

  19. jmagman commented on Nov 3, 2021

    @jmagman
    MemberAuthor

    Note to self, Zach's recipe change is at https://flutter-review.googlesource.com/c/recipes/+/19301/

  20. jmagman commented on Nov 5, 2021

    @jmagman
    MemberAuthor

    Well, you already proved 12.3 12c33 worked, so let's just bump the minimum version enforced to the tool to that, then we can use that version in Mac Host Engine at least and avoid bitcode and issues where the old 12.0 clang can't parse the macOS 11 SDK.
    #93094

  21. zanderso commented on Jan 28, 2022

    @zanderso
    Member

    This is ready to land here https://flutter-review.googlesource.com/c/recipes/+/25800. Since this is a bit risky, I'll wait until off-hours to click the button.

  22. jmagman commented on Feb 9, 2022

    @jmagman
    MemberAuthor

    @zanderso is there more to track here or can this be closed?

  23. zanderso commented on Feb 9, 2022

    @zanderso
    Member

    This is done.

  24. github-actions commented on Feb 24, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  25. locked as resolved and limited conversation to collaborators on Feb 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.engineflutter/engine related. See also e: labels.team-infraOwned by Infrastructure team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions