Repository navigation
[flutter_tools] Add support for Linux host ARM #56992
Copy link
Copy link
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityplatform-host-armBuilding on an ARM-based platformBuilding on an ARM-based platformplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Description
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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityplatform-host-armBuilding on an ARM-based platformBuilding on an ARM-based platformplatform-linuxBuilding on or for Linux specificallyBuilding on or for Linux specificallytoolAffects the "flutter" command-line tool. See also t: labels.Affects the "flutter" command-line tool. See also t: labels.
Activity
christopherfujino commentedon May 12, 2020
@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
[-]Flutter tool fails to build on Ubuntu Server ARM64 for Raspberry Pi[/-][+][flutter_tools] website should explicitly specify supported host architecture for tool[/+]kenthinson commentedon May 12, 2020
@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 :)
christopherfujino commentedon May 13, 2020
SGTM!
christopherfujino commentedon Jun 26, 2020
@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 :)
26 remaining items
hhk7734 commentedon Dec 15, 2020
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
rudy128 commentedon Feb 1, 2021
@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..?
christopherfujino commentedon Feb 11, 2021
https://github.com/flutter/flutter/pull/61221/files should land on master...very soon :)
christopherfujino commentedon Feb 11, 2021
Android target dev is blocked on Android Studio being available on Arm64 #75864
christopherfujino commentedon Feb 11, 2021
Web target development is blocked on building dart2js in among the Flutter Engine artifacts #74928
Leleocastro commentedon Mar 18, 2021
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:

Leleocastro commentedon Mar 18, 2021
Some ideas?
HidenoriMatsubayashi commentedon Mar 18, 2021
dev_compiler(dart2js) has not been included in the Flutter SDK yet. See also: #74928mukhtharcm commentedon Mar 18, 2021
How are you Installing ubuntu on phone?
Termux?
Leleocastro commentedon Mar 18, 2021
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. (:
christopherfujino commentedon Apr 3, 2021
Closing this as Linux Host ARM64 is supported for linux ARM64 and web targets on the latest master channel.
github-actions commentedon Aug 3, 2021
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 -vand a minimal reproduction of the issue.