Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flutter_tools] Add support for Linux host ARM #56992

Closed
kenthinson opened this issue May 12, 2020 · 32 comments
Closed

[flutter_tools] Add support for Linux host ARM #56992

kenthinson opened this issue May 12, 2020 · 32 comments
Labels
c: new feature Nothing broken; request for a new capability P3 Issues that are less important to the Flutter project platform-host-arm Building on an ARM-based platform platform-linux Building on or for Linux specifically tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@kenthinson
Copy link

kenthinson commented May 12, 2020

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)
@VladyslavBondarenko VladyslavBondarenko added platform-linux Building on or for Linux specifically c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. labels May 12, 2020
@christopherfujino
Copy link
Member

@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

@christopherfujino christopherfujino 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 May 12, 2020
@kenthinson
Copy link
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 :)

@christopherfujino
Copy link
Member

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

@christopherfujino christopherfujino added d: website - content and removed c: crash Stack traces logged to the console tool Affects the "flutter" command-line tool. See also t: labels. labels May 13, 2020
@christopherfujino
Copy link
Member

@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 :)

@iapicca iapicca added documentation a: desktop Running on desktop framework flutter/packages/flutter repository. See also f: labels. and removed passed first triage labels Jul 6, 2020
@kenthinson
Copy link
Author

kenthinson commented Jul 8, 2020

@christopherfujino I would love to use it on Raspberry Pi! I have a Pi 4 I can test on. Please let me know if you get it working. I’m happy to help test it.

@christopherfujino christopherfujino changed the title [flutter_tools] website should explicitly specify supported host architecture for tool [flutter_tools] Add support for Linux host ARM Jul 8, 2020
@christopherfujino christopherfujino added tool Affects the "flutter" command-line tool. See also t: labels. and removed a: desktop Running on desktop d: website - content framework flutter/packages/flutter repository. See also f: labels. labels Jul 8, 2020
@christopherfujino
Copy link
Member

christopherfujino commented Jul 8, 2020

@christopherfujino I would love to use it on Raspberry Pi! I have a Pi 4 I can test on. Please let me know if you get it working. I’m happy to help test it.

I have a hacked together flutter tool that will run on arm, but I'm working on cross-compiling the engine artifacts (our engine build tooling doesn't support building from ARM). I also filed bug to request an official arm build of the android sdk (the prebuilt debian arm android-tools looks like it won't cut it and I wasn't able to compile it from source on my rpi 3).

I should probably order an rpi 4, as having 1gb of RAM has been a bottleneck :) I'll keep this issue updated.

@HidenoriMatsubayashi
Copy link
Member

I've been working on supporting ARM64 Host.

@jmagman jmagman added the P3 Issues that are less important to the Flutter project label Aug 18, 2020
@mukhtharcm
Copy link

@HidenoriMatsubayashi are you trying to enable building flutter apps from arm64 devices?

@HidenoriMatsubayashi
Copy link
Member

HidenoriMatsubayashi commented Sep 23, 2020

@mukhtharcm
Sorry for late reply. Yes, that's right.

@hhk7734
Copy link

hhk7734 commented 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
Copy link

rudy128 commented 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
Copy link
Member

@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 :)

@christopherfujino
Copy link
Member

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

@christopherfujino
Copy link
Member

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

@Leleocastro
Copy link

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

@Leleocastro
Copy link

Some ideas?

@HidenoriMatsubayashi
Copy link
Member

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

@mukhtharcm
Copy link

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?

@Leleocastro
Copy link

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. (:

@christopherfujino
Copy link
Member

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

@github-actions
Copy link

github-actions bot commented 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 -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: new feature Nothing broken; request for a new capability P3 Issues that are less important to the Flutter project platform-host-arm Building on an ARM-based platform platform-linux Building on or for Linux specifically tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

No branches or pull requests