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

What's the status of apple M1/arm64 support? #597

Closed
spencerkohan opened this issue Dec 23, 2020 · 72 comments
Closed

What's the status of apple M1/arm64 support? #597

spencerkohan opened this issue Dec 23, 2020 · 72 comments

Comments

@spencerkohan
Copy link

Is there a plan to do a release of VSCodium which is native to M1, or else a universal binary? It looks like VSCode is already supporting this, is it on the roadmap for VSCodium?

@stripedpajamas
Copy link
Member

Since VSCode is already supporting it, it's on the roadmap for VSCodium. If GH Actions has support for Darwin+arm, it should be really simple. Haven't had a chance to look into it yet.

@heracek
Copy link

heracek commented Jan 12, 2021

There is no support in GitHub Actions yet 😢: actions/runner-images#2187

@stripedpajamas
Copy link
Member

Yeah we will need to wait for GH Actions support; suggest 👍-ing the linked issue.

@djthread
Copy link

djthread commented Mar 8, 2021

VSCode 1.54+ has M1 support now! Super looking forward to the VSCodium update :)

Edit: Yay I'm on 1.54.2 now \o/

@jiserra
Copy link

jiserra commented Mar 15, 2021

I downloaded 1.54.2 and the Architecture still says "Intel"… what I'm missing?

Edit: Yay I'm on 1.54.2 now \o/

@daiyam
Copy link
Member

daiyam commented Mar 15, 2021

@jiserra M1 is not available on github actions. Microsoft must be using a mac mini to build its project.

@ayan-iiitd
Copy link

Can someone please clarify if the latest build is on arm or not? confused by the two comments -

VSCode 1.54+ has M1 support now! Super looking forward to the VSCodium update :)

Edit: Yay I'm on 1.54.2 now \o/

I downloaded 1.54.2 and the Architecture still says "Intel"… what I'm missing?

@daiyam
Copy link
Member

daiyam commented Mar 15, 2021

VSCodium is built with GitHub actions which don't support M1 yet.
VSCode is built on their own servers. They must be using mac mini to build the M1 version. Bigger team. Bigger budget.

@leonardodino
Copy link

A related project is using GitHub actions to compile Chromium from source to arm64-macos.

The builds takes more than a day tho 👀 Hopefully vscodium is using a pre-built electron as base? 🤔

@djthread
Copy link

oh snap, indeed, i spoke too soon - sorry.

@gytisrepecka
Copy link

The builds takes more than a day tho 👀 Hopefully vscodium is using a pre-built electron as base? 🤔

Does Electron already support M1 (aarch64)?

@togethereveryday
Copy link

Let´s say I have a M1 machine, what would be necessary to build VS Codium? My status: I have a machine, I have basic programming skills in front end web development. Is it difficult if one has never done it?

@LukeChannings
Copy link

@togethereveryday

Have a read of the GitHub Actions workflow for your OS - here. That's where I'd start.

@daiyam
Copy link
Member

daiyam commented Apr 18, 2021

@togethereveryday If you want to build VSCodium manually, you can run the script build/build_macos.sh. You might have to edit it to change targeted architecture.

@theotheroracle
Copy link
Contributor

theotheroracle commented Apr 23, 2021

i'm a bit confused as to why i was pinged, i didn't comment on this issue and i don't have an m1 mac .

@daiyam
Copy link
Member

daiyam commented Apr 23, 2021

@theotheroracle Sorry, it's my mistake. Bad autocomplete and I haven't rechecked...

@theotheroracle
Copy link
Contributor

Oh ok, no worries

@rolimans
Copy link

Was able to build for the M1 on my machine. Changed the environment variable VSCODE_ARCH to arm64 and installed jq using brew install jq then ran ./build/build_macos.sh. ;)

@jiserra
Copy link

jiserra commented May 27, 2021

I had to modify a couple of packages on package.json, but I finally could build it!

@tibeer
Copy link

tibeer commented Jun 4, 2021

If anybody is lazy, you can use the binary from my fork: https://github.com/tibeer/vscodium
This is compiled on my M1 Mac. I try to keep it updated.

@Tarnyko
Copy link

Tarnyko commented Jun 8, 2021

If anybody is lazy, you can use the binary from my fork: https://github.com/tibeer/vscodium
This is compiled on my M1 Mac. I try to keep it updated.

Thanks @tibeer , this is definitely appreciated!

@im-AMS
Copy link

im-AMS commented Jun 12, 2021

If anybody is lazy, you can use the binary from my fork: https://github.com/tibeer/vscodium
This is compiled on my M1 Mac. I try to keep it updated.

I actually tried running, and it says “VSCodium.app” is damaged and can’t be opened. You should move it to the Bin.

@melgu
Copy link

melgu commented Jun 12, 2021

I actually tried running, and it says “VSCodium.app” is damaged and can’t be opened. You should move it to the Bin.

This is because of Gatekeeper restrictions as the app isn't signed. You can execute the following to remove the quarantine attribute.

sudo xattr -r -d com.apple.quarantine /Applications/VSCodium.app

@tortuetorche
Copy link

If anybody is lazy, you can use the binary from my fork: https://github.com/tibeer/vscodium
This is compiled on my M1 Mac. I try to keep it updated.

Hi @tibeer,

Thank you for these M1 ARM64 builds 👍
Just one question, why your builds since VSCodium 1.57.0 are way more bigger than the classic Darwin x64 builds (~105 MB VS ~260 MB)?
Can you manage to shrink them a bit, please?

Have a good day,
Tortue Torche

@tibeer
Copy link

tibeer commented Jul 1, 2021

If anybody is lazy, you can use the binary from my fork: https://github.com/tibeer/vscodium
This is compiled on my M1 Mac. I try to keep it updated.

Hi @tibeer,

Thank you for these M1 ARM64 builds 👍
Just one question, why your builds since VSCodium 1.57.0 are way more bigger than the classic Darwin x64 builds (~105 MB VS ~260 MB)?
Can you manage to shrink them a bit, please?

Have a good day,
Tortue Torche

@tortuetorche interesting, I never noticed. Further discussion/resolving should be done here: tibeer/vscodium#2

@MohamedElashri
Copy link

I think this can be added to official project as now Big sur is available on github actions. See here.

@daiyam
Copy link
Member

daiyam commented Sep 17, 2021

@MohamedElashri Thx for the info. I will take a look.

@MohamedElashri
Copy link

MohamedElashri commented Sep 17, 2021

I think it is just a trivial change now in macos.yml action config. Just change VSCODE_ARCH: "x64" to VSCODE_ARCH: "arm64" and build will go fine. I tried on a fork action-run and these are the binaries for latest tag

@Alitejawi
Copy link

No news on a supported version of arm arch through the default VSCodium project?

@MohamedElashri
Copy link

MohamedElashri commented Dec 31, 2021

Unless Github add mac m1 VMs to Github action, nothing will change.

But you don't need that anyway, clone the repo and build VSCodium on your machine and everything will work following this comment.

Edit: it just takes less than 6 minutes to build from source on mac m1

@bashilias
Copy link

build it your self. Here is a guide: https://ilias.sh/posts/build-vscodium-on-darwin-arm64/

@macserv
Copy link

macserv commented Jan 13, 2022

Unless Github add mac m1 VMs to Github action, nothing will change.

@MohamedElashri, if you have a moment, could you please explain why this is the case? It seems like other Xcode and Electron projects are able to build on Intel-based Macs/VMs and produce a "Universal" application which can run natively on either architecture.

Thanks!

(edit: tagged the wrong contributor, apologies!)

@daiyam
Copy link
Member

daiyam commented Jan 13, 2022

@macserv Yes, it seems to be possible but we need somebody to be able make a working PR. Since I can't test it, I won't make it... But anybody is free to make it 😉

@arixmkii
Copy link

It seems like other Xcode and Electron projects are able to build on Intel-based Macs/VMs and produce a "Universal" application which can run natively on either architecture.

For VSCodium situation is a bit different, because you need to build it the same way the upstream is built. And looks like they first build archives on different platforms and after this combine into universal app:
https://github.com/microsoft/vscode/blob/bc71f7a3438fae0edced4ed91bc9429a72cdb416/build/azure-pipelines/darwin/product-build-darwin.yml#L150

I tried to do it on M1 Mac (building for both architectures on that host) and this didn't work. I will try do build x64 on Intel Mac later and then compose universal on M1 some time later.

So, to get fully functional universal app, not only the build targets will have to be adjusted, but the whole CI workflow should include additional steps (fetching intermediate artifacts from different build agents).

@berkaybakacak
Copy link

Changed the environment variable VSCODE_ARCH to arm64, installed all dependencies then ran ./build/build_macos.sh. And it gave me error: ./build/build_macos.sh: line 8: arm64: command not found

@codeluggage
Copy link

@berkaybakacak

Changed the environment variable VSCODE_ARCH to arm64, installed all dependencies then ran ./build/build_macos.sh. And it gave me error: ./build/build_macos.sh: line 8: arm64: command not found

It built ok for me on macOS 12.2.1 after changing to arm64 like this:

SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=arm64 . build.sh

on https://github.com/VSCodium/vscodium/blob/master/build/build_macos.sh#L8

and then running the build as VSCODE_ARCH=arm64 ./build/build_macos.sh

@berkaybakacak
Copy link

@codeluggage I replaced my node version with a correct version (it wasn't the correct version) and typed the entire command you gave (I didn't write the "VSCODE_ARCH=arm64" part before) and it worked. I don't know if it was because of my node version or because I typed the command incompletely, but thanks a lot.

@ferben
Copy link

ferben commented Mar 31, 2022

Is there official release date VSCodium prebuilt binaries for Apple Silicon?

@daiyam
Copy link
Member

daiyam commented Mar 31, 2022

I've discover that MacStadium offers free vm for open source project. I will try it and setup the workflow.
I would need help from to test the final binaries on M1.

@ferben
Copy link

ferben commented Mar 31, 2022

You can build arm64 binary on x86_64 too. You need only Xcode 12.5 or 13.
Only for testing you need Apple Silicon hardware.

@y-mx-b
Copy link

y-mx-b commented Mar 31, 2022

You could just build a universal binary too, couldn't you? Not really much of a reason to split the releases by architecture if a universal binary build works.

@daiyam
Copy link
Member

daiyam commented Mar 31, 2022

I already tried to make to make an arm64 binary by using macOS 11 but the dependencies were still x86. Since I can't test, it's kinda hard for me to find the issue, if it's possible...
With M1 vm, I would somewhat more sure that the binary would be more successful.
But I would welcome any PR that would build the arm64 binary on the existing vm of GitHub!

@jakenvac
Copy link

I'm free to test M1 binaries by the way. I've just built the latest version of code this morning. I'm also putting together a brew script that will build and install locally.

@berkaybakacak
Copy link

https://drive.google.com/file/d/12dvGL8rbV7wP880Gc_cuvlwjiDTHw4P_/view?usp=sharing

Here. I built arm64 version on my M1 Air, macOS 12.2.1

@sloane-shark
Copy link

sloane-shark commented Apr 20, 2022

Changed the environment variable VSCODE_ARCH to arm64, installed all dependencies then ran ./build/build_macos.sh. And it gave me error: ./build/build_macos.sh: line 8: arm64: command not found

It built ok for me on macOS 12.2.1 after changing to arm64 like this:

SHOULD_BUILD=yes CI_BUILD=no OS_NAME=osx VSCODE_ARCH=arm64 . build.sh

on https://github.com/VSCodium/vscodium/blob/master/build/build_macos.sh#L8

and then running the build as VSCODE_ARCH=arm64 ./build/build_macos.sh

This works for me on my M1 Pro, macOS 12.3.1. What can I do to contribute to getting these binaries hosted with the other releases? I'd really love to make the M1 build available on Nixpkgs.

e: included an unnecessary @ mention at first, sorry about that 😅
e2: didn't realize it's likely still blocked on actions/runner-images#2187
e3: for anyone looking for something somewhat reproducible: https://gist.github.com/matthewess/9e9d758c31ebe26024df301befd2da06

@daiyam
Copy link
Member

daiyam commented Apr 27, 2022

Hi all, the macOS arm64 binary is finally available. Please provide any feedback if it's working or not. Thx
Do the universal version needed? Since we are dev, we know which arch we are using.

@jakenvac
Copy link

yeah I would say don't worry about the universal version. I don't think people buy an m1 mac for dev work without knowing what they're buying 👍🏻

@MohamedElashri
Copy link

Hi all, the macOS arm64 binary is finally available. Please provide any feedback if it's working or not. Thx
Do the universal version needed? Since we are dev, we know which arch we are using.

I have replaced my built arm64 version by the selfhosted generated version on the repo and so far it is working without any problems.

@tibeer
Copy link

tibeer commented Apr 29, 2022

@daiyam for completeness: Can you post the link to the binary which should be tested? It's neither here: https://github.com/VSCodium/vscodium/releases nor here: https://github.com/VSCodium/vscodium/tags

@tibeer
Copy link

tibeer commented Apr 29, 2022

Sorry, my fault. Thought this was outdated since Github flags this as "released this 16 days ago". Besides the issue that the app is still blocked by default (can be fixed sudo xattr -r -d com.apple.quarantine /Applications/VSCodium.app), it works fine:
Bildschirmfoto 2022-04-29 um 07 06 17

@daiyam
Copy link
Member

daiyam commented Apr 29, 2022

@tibeer For the quarantine, yep, I'm in the process to update the README and the website.

@AwlsomeAlex
Copy link

(can be fixed sudo xattr -r -d com.apple.quarantine /Applications/VSCodium.app), it works fine:

sudo isn't required to clear the quarantine flag. Was able to get it working without sudo.

@AwlsomeAlex
Copy link

If you want to learn more about why you need to clear the quarantine flag on Apple Silicon builds, take a look at this Apple Platform Security Document.

Specially under Unsigned x86_64 code:

A Mac with Apple silicon doesn’t permit native arm64 code to execute unless a valid signature is attached.

For binary compatibility, translated x86_64 code is permitted to execute through Rosetta with no signature information at all.

br3ndonland added a commit to br3ndonland/dotfiles that referenced this issue Jun 11, 2022
@daiyam daiyam closed this as completed Jun 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests