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

[FR] Universal build for M1 support? #26

Closed
FallenChromium opened this issue Nov 18, 2021 · 18 comments
Closed

[FR] Universal build for M1 support? #26

FallenChromium opened this issue Nov 18, 2021 · 18 comments

Comments

@FallenChromium
Copy link

Hi there! I loved the design of the app ♥️
One of the problems I've encountered is that it runs under Rosetta 2 on my laptop, which is undesirable, mainly because smoothness suffers and so does the battery life. Is there any way to compile Rust+Dart app into a Universal app?

@appflowy
Copy link
Contributor

@FallenChromium Absolutely yes, but the size of the application will be larger. I can build one for M1. Please let me know how you think about it.

@FallenChromium
Copy link
Author

FallenChromium commented Nov 18, 2021

It's absolutely fine to have 2 separate releases for each architecture (like most utils on Homebrew do, anyway), so I think it's a viable solution.

That said, it's always a compromise. I can see Universal App being easier to distribute but more painful to build (especially in an automated fashion). Separating targets and release products can also be a pain in the back, especially when other arches and\or platforms will join (win_x64, win_arm64, linux_x64, linux_arm64, you probably already imagined that giant GitHub Releases file list 🤣)

@pdckxd
Copy link
Contributor

pdckxd commented Nov 20, 2021

Seems flutter doesn't support build application for native Apple M1 chip. Below wiki page shows that M1 can run X86_64 application through Rosetta2 at this moment. So you will see Intel arch in "Activity Monitor" when running appflowy on MacOS

https://github.com/flutter/flutter/wiki/Developing-with-Flutter-on-Apple-Silicon

Compiled Intel macOS binaries work on Apple Silicon without change thanks to the Rosetta 2 translation environment, which converts x86_64 instructions to ARM64 equivalents.
We also plan to offer support for compilation directly to ARM64, as well as universal binaries that combine x86_64 and ARM64 assets. Issue 60113 is the umbrella bug tracking this work.

@ioiioo
Copy link

ioiioo commented Dec 10, 2021

I have the same appeal, I hope I can have M1 version applications.

@lvelvee
Copy link

lvelvee commented Dec 21, 2021

kindly support native arm arch pls

@WATERMELOUN3
Copy link

Is there any news about native ARM build support ?
In the documentation in Building on MacOS -> Building in release mode, there is arm64 command, but it still doesn't work.

@ghost
Copy link

ghost commented May 18, 2022

Any update about this? since flutter v3 already support apple silicon without rosetta
ps: flutter/website#7119 (comment)

@Lewiscowles1986
Copy link

It seems Flutter recently released apple silicon support. I hope it's generic ARM64 so I can run on M1 Studio as well as low-end devices like the raspberry pi.

Links:

@Lewiscowles1986
Copy link

Lewiscowles1986 commented Jul 30, 2022

If there are tests or it's a matter of configuring a build, I'm in BST London, and happy to take the time to use my hardware to build on an M1 and host while the github process for building is worked out.

@SuperBo
Copy link

SuperBo commented Oct 9, 2022

Hi @Lewiscowles1986 , can you share the build with us :D

@Lewiscowles1986
Copy link

It didn’t build and it seems I e not kept a log of why, or what the errors were

@Tienisto
Copy link

Shouldn't flutter build macos build an universal build by default? I am maintainer of LocalSend and I did not do anything to ensure M1 support.

Maybe an ARM based computer is needed though...

@Lewiscowles1986
Copy link

It's not the same commands @Tienisto (I think due to the Rust and other commands); but it looks like https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-macos has cli options for arm64; so I guess for me; this was all I wanted.

@Lewiscowles1986
Copy link

This has led to flutter/flutter#130308 on a new mac I don't want to use appleId for, but it feels like that is a me problem.

@vncloudsco
Copy link

Are there any updates for this?

@LucasXu0
Copy link
Collaborator

We have provided the universal package for the M series chip from version 0.3.0.

@vncloudsco
Copy link

vncloudsco commented Jan 3, 2024

@LucasXu0
We do not see that we still have not been installed on ARM, even the built -in docker is not show that.

 => ERROR [linux/arm64 stage-1 2/8] RUN pacman -Syyu --noconfirm                                                                                                                               0.2s
------                                                                                                                                                                                              
 > [linux/arm64 builder  2/25] RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo:                                                                                                       
0.131 exec /bin/sh: exec format error
------
------
 > [linux/arm64 stage-1 2/8] RUN pacman -Syyu --noconfirm:
0.095 exec /bin/sh: exec format error
------
Dockerfile:73
--------------------
  71 |     
  72 |     # Upgrade the system
  73 | >>> RUN pacman -Syyu --noconfirm
  74 |     
  75 |     # Install runtime dependencies
--------------------
ERROR: failed to solve: process "/bin/sh -c pacman -Syyu --noconfirm" did not complete successfully: exit code: 1

image

@vncloudsco
Copy link

releases page only x86_64 support @LucasXu0
image

839900146 pushed a commit to 839900146/AppFlowy that referenced this issue Jun 6, 2024
* chore: fix tests

* chore: add test server

* chore: move tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests