Skip to content

Apple silicon machine on latest master shows x64 cached Dart version #101243

Description

@timsneath

Steps to Reproduce

See log: https://gist.github.com/timsneath/0340a7ef006dfda3a981fe4073a13670

I was expecting to see ARM here -- am I misled, @jmagman?

Activity

  1. jmagman commented on Apr 2, 2022

    @jmagman
    Member

    Does it work on the beta channel? I didn't work on this part, cc/ @zanderso @cbracken

    @christopherfujino I thought we disabled upgrade on master?

  2. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Apr 2, 2022
  3. christopherfujino commented on Apr 2, 2022

    @christopherfujino
    Contributor

    Does it work on the beta channel? I didn't work on this part, cc/ @zanderso @cbracken

    @christopherfujino I thought we disabled upgrade on master?

    We didn't. The dart SDK is being downloaded from https://github.com/flutter/flutter/blob/master/bin/internal/update_dart_sdk.sh#L63. @timsneath can you share the output of uname -m? And also flutter doctor -v output?

  4. timsneath commented on Apr 2, 2022

    @timsneath
    Author

    Sure!

    $ uname -m
    arm64
    $ uname -a 
    Darwin tims-air.lan 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101 arm64
    

    and

    $ flutter doctor -v     
    [✓] Flutter (Channel master, 2.13.0-0.0.pre.366, on macOS 12.2.1 21D62 darwin-arm, locale en-US)
        • Flutter version 2.13.0-0.0.pre.366 at /Users/timsneath/flutter
        • Upstream repository [email protected]:flutter/flutter.git
        • Framework revision 0b97874895 (19 hours ago), 2022-04-01 21:20:01 -0400
        • Engine revision 801d8c530f
        • Dart version 2.17.0 (build 2.17.0-265.0.dev)
        • DevTools version 2.12.1
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Users/timsneath/Library/Android/sdk
        • Platform android-31, build-tools 30.0.3
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2021.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    
    [✓] VS Code (version 1.66.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.36.0
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-arm64   • macOS 12.2.1 21D62 darwin-arm
        • Chrome (web)    • chrome • web-javascript • Google Chrome 100.0.4896.60
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    
  5. christopherfujino commented on Apr 2, 2022

    @christopherfujino
    Contributor

    Sure!

    $ uname -m
    arm64
    $ uname -a 
    Darwin tims-air.lan 21.3.0 Darwin Kernel Version 21.3.0: Wed Jan  5 21:37:58 PST 2022; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101 arm64
    

    and

    $ flutter doctor -v     
    [✓] Flutter (Channel master, 2.13.0-0.0.pre.366, on macOS 12.2.1 21D62 darwin-arm, locale en-US)
        • Flutter version 2.13.0-0.0.pre.366 at /Users/timsneath/flutter
        • Upstream repository [email protected]:flutter/flutter.git
        • Framework revision 0b97874895 (19 hours ago), 2022-04-01 21:20:01 -0400
        • Engine revision 801d8c530f
        • Dart version 2.17.0 (build 2.17.0-265.0.dev)
        • DevTools version 2.12.1
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
        • Android SDK at /Users/timsneath/Library/Android/sdk
        • Platform android-31, build-tools 30.0.3
        • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 13.3)
        • Xcode at /Applications/Xcode.app/Contents/Developer
        • CocoaPods version 1.11.3
    
    [✓] Chrome - develop for the web
        • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
    
    [✓] Android Studio (version 2021.1)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
          🔨 https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
    
    [✓] VS Code (version 1.66.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        • Flutter extension version 3.36.0
    
    [✓] Connected device (2 available)
        • macOS (desktop) • macos  • darwin-arm64   • macOS 12.2.1 21D62 darwin-arm
        • Chrome (web)    • chrome • web-javascript • Google Chrome 100.0.4896.60
    
    [✓] HTTP Host Availability
        • All required HTTP hosts are available
    

    I'll investigate deeper on Monday, but at a glance this looks like it should work...

  6. timsneath commented on Apr 4, 2022

    @timsneath
    Author

    OK, I'm going to flag this as P1 right now, since it might be ship-blocking.

  7. christopherfujino commented on Apr 4, 2022

    @christopherfujino
    Contributor

    Still stumped on this. Some notes:

    When downloading https://storage.cloud.google.com/flutter_infra_release/flutter/801d8c530fc5b0c102d13d5913dbd98376b99c93/dart-sdk-darwin-arm64.zip and checking the arch, I get:

    $ file dart-sdk/bin/dart
    dart-sdk/bin/dart: Mach-O 64-bit executable arm64
    

    So I'm pretty sure on engine CI, we didn't grab/upload the wrong binary.

  8. jmagman commented on Apr 4, 2022

    @jmagman
    Member

    Off the top of my head this script may be running in Rosetta which means uname -m will return x86_64 even on an ARM mac

    # On x64 stdout is "uname -m: x86_64"
    # On arm64 stdout is "uname -m: aarch64, arm64_v8a"
    case "$(uname -m)" in

    See #67970 for details.
    I will try to repro now by checking out the last stable and seeing what that resolves to.

  9. jmagman commented on Apr 4, 2022

    @jmagman
    Member

    I wasn't able to reproduce this, the stable channel and master channel script both resolved ran that script natively, and dart arm64 was downloaded.

    @timsneath any chance you checked this at some point?
    Screen Shot 2022-04-04 at 11 19 35 AM

    Did you run flutter upgrade https://gist.github.com/timsneath/0340a7ef006dfda3a981fe4073a13670 and that $ uname -m result in the same session?

  10. christopherfujino commented on Apr 4, 2022

    @christopherfujino
    Contributor

    Off the top of my head this script may be running in Rosetta which means uname -m will return x86_64 even on an ARM mac

    # On x64 stdout is "uname -m: x86_64"
    # On arm64 stdout is "uname -m: aarch64, arm64_v8a"
    case "$(uname -m)" in

    See #67970 for details.
    I will try to repro now by checking out the last stable and seeing what that resolves to.

    I'm working on a tool fix that should be more reliable than relying on uname (the same fix from https://github.com/flutter/flutter/pull/67970/files)

  11. github-actions commented on Apr 19, 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.

  12. locked as resolved and limited conversation to collaborators on Apr 19, 2022
  13. added
    P0Critical issues such as a build break or regression
    and removed on Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P0Critical issues such as a build break or regressionplatform-macosBuilding on or for macOS specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions