Skip to content

[flutter_tools] Add support for Linux host ARM #56992

Closed

Description

@kenthinson

Flutter tool fails to build on Ubuntu Server ARM64 for Raspberry Pi. Just to be clear I am trying to run the SDK on the PI then install the app to a Android device.

Steps to Reproduce

Brand new flash of Ubuntu 64bit for Raspberry Pi aka "ubuntu-20.04-preinstalled-server-arm64+raspi"

Following install instructions at: https://flutter.dev/docs/get-started/install/linux
git clone https://github.com/flutter/flutter.git -b stable
export PATH="$PATH:pwd/flutter/bin"
flutter

Logs

Building flutter tool...
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: cannot execute binary file: Exec format error
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: Success
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: cannot execute binary file: Exec format error
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: Success
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (8 tries left)
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: cannot execute binary file: Exec format error
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: Success
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (7 tries left)
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: cannot execute binary file: Exec format error
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: Success
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (6 tries left)
^C
ubuntu@ubuntu:~/development$ flutter doctor -v
Building flutter tool...
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: cannot execute binary file: Exec format error
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: Success
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: cannot execute binary file: Exec format error
/home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/pub: line 49: /home/ubuntu/development/flutter/bin/cache/dart-sdk/bin/dart: Success
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (8 tries left)

Activity

  1. added
    platform-linuxBuilding on or for Linux specifically
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    on May 12, 2020
  2. christopherfujino commented on May 12, 2020

    @christopherfujino
    Contributor

    @kenthinson Hi, thanks for opening this. Unfortunately we don't support running the tool on arm architectures. I'm thinking the action point for this issue should be to make this explicit on the website system requirements https://flutter.dev/docs/get-started/install/linux

  3. changed the title [-]Flutter tool fails to build on Ubuntu Server ARM64 for Raspberry Pi[/-] [+][flutter_tools] website should explicitly specify supported host architecture for tool[/+] on May 12, 2020
  4. kenthinson commented on May 12, 2020

    @kenthinson
    Author

    @christopherfujino Thanks for the information. Please feel free to close this after the docs are updated. I’ll leave it open as a reminder until then :)

  5. christopherfujino commented on May 13, 2020

    @christopherfujino
    Contributor

    @christopherfujino Thanks for the information. Please feel free to close this after the docs are updated. I’ll leave it open as a reminder until then :)

    SGTM!

  6. added and removed
    c: crashStack traces logged to the console
    toolAffects the "flutter" command-line tool. See also t: labels.
    on May 13, 2020
  7. christopherfujino commented on Jun 26, 2020

    @christopherfujino
    Contributor

    @kenthinson are you still interested in using the flutter sdk on a raspberry pi? I'm going to be investigating the viability of this and would love to have another tester :)

  8. 26 remaining items

  9. hhk7734 commented on Dec 15, 2020

    @hhk7734

    Thanks @HidenoriMatsubayashi .
    Your PR is really helpful. :)

    I tested on ODROID-C4(aarch64).
    https://wiki.loliot.net/docs/lang/flutter/engine/flutter-app-for-linux-arm64

  10. rudy128 commented on Feb 1, 2021

    @rudy128

    @christopherfujino I am also having a rasberry pi 4. I wanna be a tester too.Is it out for testing or it is under construction..?

  11. christopherfujino commented on Feb 11, 2021

    @christopherfujino
    Contributor

    @christopherfujino I am also having a rasberry pi 4. I wanna be a tester too.Is it out for testing or it is under construction..?

    https://github.com/flutter/flutter/pull/61221/files should land on master...very soon :)

  12. christopherfujino commented on Feb 11, 2021

    @christopherfujino
    Contributor

    Android target dev is blocked on Android Studio being available on Arm64 #75864

  13. christopherfujino commented on Feb 11, 2021

    @christopherfujino
    Contributor

    Web target development is blocked on building dart2js in among the Flutter Engine artifacts #74928

  14. Leleocastro commented on Mar 18, 2021

    @Leleocastro

    Hi guys, i'm not trying to develop in Raspberry, but in my Galaxy S20 phone. I could install Ubuntu 20.04, vscode, flutter, no issues in flutter doctor, but I couldnt debug the code. Like images:
    Screenshot_20210317-235459_VNC Viewer

    Screenshot_20210317-235025_VNC Viewer

  15. Leleocastro commented on Mar 18, 2021

    @Leleocastro

    Some ideas?

  16. HidenoriMatsubayashi commented on Mar 18, 2021

    @HidenoriMatsubayashi
    Member

    dev_compiler (dart2js) has not been included in the Flutter SDK yet. See also: #74928

  17. mukhtharcm commented on Mar 18, 2021

    @mukhtharcm

    Hi guys, i'm not trying to develop in Raspberry, but in my Galaxy S20 phone. I could install Ubuntu 20.04, vscode, flutter, no issues in flutter doctor, but I couldnt debug the code. Like images:
    Screenshot_20210317-235459_VNC Viewer

    Screenshot_20210317-235025_VNC Viewer

    How are you Installing ubuntu on phone?
    Termux?

  18. Leleocastro commented on Mar 18, 2021

    @Leleocastro

    How are you Installing ubuntu on phone?
    Termux?

    Yeah, Termux and Andronix. The easiest way I found.
    Download of Andronix: https://play.google.com/store/apps/details?id=studio.com.techriz.andronix

    I connected to the GUI with VNC Viewer, starting vncserver on termux.
    I use Samsung Dex to improve the experience. Now waiting for dart2js. (:

  19. christopherfujino commented on Apr 3, 2021

    @christopherfujino
    Contributor

    Closing this as Linux Host ARM64 is supported for linux ARM64 and web targets on the latest master channel.

  20. github-actions commented on Aug 3, 2021

    @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.

  21. locked as resolved and limited conversation to collaborators on Aug 3, 2021
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

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityplatform-host-armBuilding on an ARM-based platformplatform-linuxBuilding on or for Linux 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