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

Add native support for Apple Silicon #408

Closed
Logicer16 opened this issue Jun 10, 2021 · 13 comments · Fixed by #2245
Closed

Add native support for Apple Silicon #408

Logicer16 opened this issue Jun 10, 2021 · 13 comments · Fixed by #2245
Assignees
Labels
architecture: arm Specific to ARM host architecture conclusion: resolved Issue was resolved os: macos Specific to macOS operating system topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement

Comments

@Logicer16
Copy link

Is your feature request related to a problem? Please describe.
Arduino IDE 2.x runs under Rosetta 2 on Apple Silicon. While this works at the moment, it is more efficient (and will eventually be required) to run a native version.

Describe the solution you'd like
Make the macOS version a Universal binary

Describe alternatives you've considered
Running under Rosetta 2. See issues above

@Logicer16 Logicer16 added the type: enhancement Proposed improvement label Jun 10, 2021
@kittaakos
Copy link
Contributor

Depends on eclipse-theia/theia#9096.

@Edivad99
Copy link

Now depends on eclipse-theia/theia#9936

@rsora rsora added the os: macos Specific to macOS operating system label Oct 21, 2021
@per1234 per1234 added the topic: infrastructure Related to project infrastructure label Oct 25, 2021
@LouisCAD
Copy link

LouisCAD commented Aug 7, 2022

Hello, the aforementioned issue has been merged in January this year. What is blocking this now?

@Edivad99
Copy link

Edivad99 commented Aug 8, 2022

#933

@sabrinagannon
Copy link

Just wanted to note that this issue and #666 are duplicates of one another.

@kittaakos
Copy link
Contributor

I believe this GH issue is a duplicate of #933.

I am closing this one. If anyone disagrees, please comment here, and I will reopen if required. Please follow the other issue. Thank you!

@kittaakos kittaakos added the conclusion: duplicate Has already been submitted label Sep 15, 2022
@per1234 per1234 reopened this Sep 15, 2022
@per1234
Copy link
Contributor

per1234 commented Sep 15, 2022

Hi @kittaakos. This is not a duplicate of #933. They are about two similar, but distinct issues:

#408 is about Arduino distributing builds for Apple Silicon

#933 is about making it possible for people to build the Arduino IDE on Apple Silicon machines

@kittaakos
Copy link
Contributor

kittaakos commented Sep 15, 2022

#933 is about making it possible for people to build the Arduino IDE on Apple Silicon machines

It's possible to build on M1 once we have the binaries. We have to handle the two things together. Feel free to keep both open if managing two tasks is more straightforward than one.

@per1234
Copy link
Contributor

per1234 commented Sep 27, 2022

We have to handle the two things together.

The ability to build on Apple Silicon machines may be a prerequisite for #408, but as you explained here there are additional considerations specific to #408:

#933 (comment)

even if we can build the CLI on an M1 chip, it does not fit into the current GitHub Actions-based pipeline: actions/runner-images#2187.

So the two do not need to be handled together. Contributors will benefit from the addition of support for building the Arduino IDE on Apple Silicon machines, so #933 has merit on its own and should not be blocked by us figuring out the separate logistical issues of setting up our own infrastructure for generating builds for distribution. We will use this issue to track the need for the additional work that is required in order to generate and distribute official builds.

@kittaakos kittaakos removed the conclusion: duplicate Has already been submitted label Nov 23, 2022
@Edivad99
Copy link

I read this article and thought that as a solution Arduino could buy a mac mini m1 base and set it as self hosted runners.
I don't know if it can be done or if it has already been rejected as an idea😅

@per1234 per1234 added the architecture: arm Specific to ARM host architecture label Apr 21, 2023
@bcr
Copy link

bcr commented Jul 6, 2023

It has been three years since the transition to Apple Silicon, and no new Macs have an Intel chip. Can I help come up with a roadmap and a set of milestones that will get this transition completed? Most of the IDE seems to run correctly, and this seems to just be the command-line tools causing a problem right now:

fork/exec /Users/blake/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags: bad CPU type in executable

➜  ~ file /Users/blake/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags
/Users/blake/Library/Arduino15/packages/builtin/tools/ctags/5.8-arduino11/ctags: Mach-O 64-bit executable x86_64

@per1234
Copy link
Contributor

per1234 commented Jul 6, 2023

@bcr this issue is only for the necessary work to the infrastructure of this project to produce native Apple Silicon builds. In fact, we are already distributing such builds but unfortunately we have not yet been able to set up completely automated generation of those builds as is already done with the X86/"Intel" builds.

Requests and work to produce Apple Silicon builds of the various external tool dependencies must be made in the appropriate repository. All the infrastructure is already in place for Arduino CLI and Arduino IDE to use those builds once they are available. In the case of the builtin:ctags tool referenced in the error message you shared, the repository is here:

https://github.com/arduino/ctags

For now, please just install Rosetta 2 by following these instructions:

https://support.arduino.cc/hc/en-us/articles/7765785712156-Error-bad-CPU-type-in-executable-on-macOS

After doing that, the error from the ctags command will no longer occur.

Even though it is possible the performance of of an X86 build of Ctags running on an Apple Silicon machine via the Rosetta 2 emulation is inferior to what would be achieved with a native Apple Silicon build of Ctags, I think we have already achieved the most significant performance improvement by providing the native Apple Silicon build of the Arduino IDE application itself.

@bcr
Copy link

bcr commented Jul 6, 2023

OK, I'll open an issue over there, thanks for the help. I'll see if I can make a PR that helps the situation. I don't know how many of these need to get migrated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture: arm Specific to ARM host architecture conclusion: resolved Issue was resolved os: macos Specific to macOS operating system topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants