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 on ARM64 chromebook #146949

Closed
mictadlo opened this issue Apr 17, 2024 · 7 comments
Closed

Flutter on ARM64 chromebook #146949

mictadlo opened this issue Apr 17, 2024 · 7 comments
Labels
r: duplicate Issue is closed as a duplicate of an existing issue

Comments

@mictadlo
Copy link

Steps to reproduce

I found a post here from @christopherfujino that:

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

Unfortunately, I do not know how to get it installed. Could you please provide me with any installation steps?

Thank you in advance,

Michal

Actual results

I can't find ARM64 from Flutter SDK

Logs

No response

Flutter Doctor output

I was not able to find Flutter for ARM64

@bc-lee
Copy link

bc-lee commented Apr 17, 2024

I believe you're talking about the Linux Arm64 Host.

From what I understand, the Flutter SDK can be built from source on Linux Arm64, but the Flutter team doesn't provide pre-built binaries for it. Flutter requires several native binaries/libs to run.

However, you can try building the Flutter SDK from source on your Linux Arm64 machine, or you can use others' pre-built binaries like https://github.com/containerbase/flutter-prebuild, but use it at your own risk.

@mictadlo mictadlo changed the title Flutter on ARM64 Flutter on ARM64 chromebook Apr 18, 2024
@mictadlo
Copy link
Author

mictadlo commented Apr 18, 2024

Hi, Thank you. My Lenove Duet Chromebook might not handle a second layer of virtualization. Is there a reason why Google/Dart/Flutter does not provide ARM64 releases?
I think people with ARM64 Chromebooks and Raspberry PI would like it, too.

@darshankawar darshankawar added the in triage Presently being triaged by the triage team label Apr 18, 2024
@darshankawar
Copy link
Member

@mictadlo
Most probably this is similar to the one you are looking for. You will need to follow-up in it for further updates or share your findings in it for better tracking.
Closing this in favor of the linked issue. If you disagree, write in comments and I'll reopen it.

@darshankawar darshankawar closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
@darshankawar darshankawar added r: duplicate Issue is closed as a duplicate of an existing issue and removed in triage Presently being triaged by the triage team labels Apr 18, 2024
@christopherfujino
Copy link
Member

@mictadlo Most probably this is similar to the one you are looking for. You will need to follow-up in it for further updates or share your findings in it for better tracking. Closing this in favor of the linked issue. If you disagree, write in comments and I'll reopen it.

Thanks for linking that issue @darshankawar. I just closed that issue, as we actually do build and upload binaries for linux arm64 hosts, you just can't download a tarball for it from the website. However, if you clone this repository on a linux arm64 machine, the flutter/bin/flutter bash script should ensure that you have all the correct architecture binaries downloaded.

I have done this before on a raspberry pi. I have not kept up to date with linux userspace on ChromeOS, so your mileage may vary there (if you have a mainstream Linux distribution installed such as Ubuntu or Arch, things should "just work").

@mictadlo
Copy link
Author

Thank you, it works. Any suggestions how to improve it?

Dependencies for Web apps

$ sudo apt-get install chromium

Dependencies for Linux apps

$ sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev

VS Code
Source: https://wiki.debian.org/VisualStudioCode

$ curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
$ sudo install -o root -g root -m 644 microsoft.gpg /usr/share/keyrings/microsoft-archive-keyring.gpg

$ sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/microsoft-archive-keyring.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'

$ sudo apt-get update
$ sudo apt-get install code

Flutter SDK

$ mkdir projects
$ cd projects/

$ git clone https://github.com/flutter/flutter.git

$ cd flutter/bin/
$ ./flutter 
Building flutter tool...
Resolving dependencies... (6.7s)
Downloading packages... (36.5s)
Got dependencies.

$ export PATH="$PATH:/home/mtlorenc/projects/flutter/bin"
$ export CHROME_EXECUTABLE="/usr/bin/chromium"

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, 3.22.0-14.0.pre.29, on Debian GNU/Linux 12 (bookworm) 6.6.17-01102-gd3cec3c11146, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.82.0)
[✓] Connected device (2 available)

@christopherfujino
Copy link
Member

Thank you, it works. Any suggestions how to improve it?

This is more or less what I would do (although with vim :) ). One option is to use canonical's Flutter snap: https://snapcraft.io/flutter, which I believe would handle sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev, although you'd also have to install and/or configure snap.

Copy link

github-actions bot commented May 3, 2024

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 May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
r: duplicate Issue is closed as a duplicate of an existing issue
Projects
None yet
Development

No branches or pull requests

4 participants