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

Will there be support for macOS/AArch64? #2068

Closed
jgoldverg opened this issue Nov 29, 2020 · 20 comments
Closed

Will there be support for macOS/AArch64? #2068

jgoldverg opened this issue Nov 29, 2020 · 20 comments

Comments

@jgoldverg
Copy link

jgoldverg commented Nov 29, 2020

Question

Hi all I was wondering if there is any intention to have Mongo Compass run natively on macOS/AArch64.

Currently I have gotten it running using Rosetta 2, but this has obvious flaws(huge battery consumption to start with). It would be really awesome if there could support for the new m1 Macs.

Additional context

I am not sure what work this would take, but if there is anything you need to provide or do please let me know. If there could be an issue tracker for this that would be great!
Thanks

@LinusU
Copy link

LinusU commented Jan 11, 2021

Electron is currently fixed at version 6.1.7, we need to get to at least 11.0.0 for arm64 support.

"electron": "6.1.7",

Trying to upgrade it I ran into issues with it being stuck at 6.x in hadron-build: mongodb-js/hadron-build#430

@jgoldverg
Copy link
Author

Was just looking into the current electron version, seems they are v12.0.5. Any chance that you could try again @LinusU?

@ngohungphuc
Copy link

I'm still waiting for m1 version :(

@Anemy
Copy link
Member

Anemy commented Mar 2, 2022

@ngohungphuc @jgoldverg Can you confirm if the newest beta (1.31.0-beta.11 at the time of writing): https://github.com/mongodb-js/compass/releases fixes this issue? We've upgraded electron versions which should address the issue. We're in the process of further upgrading the version as well.

@LinusU
Copy link

LinusU commented Mar 3, 2022

@Anemy I believe that this issue is asking for native M1 support, it seems like darwin-x64 packages attached to the linked release?

If you're on a recent version of Electron, it should be easy to do that as well. I'm not familiar with the Hadron build tools, but in e.g. electron-packages and Electron Forge you can pass in --arch=arm64 when you build.

@AbdullahDiaa
Copy link

Yep, it seems there's only darwin-x64 packages attached to the release.
the application uses rosetta 2 translation layer on M1 macs.
Screen Shot 2022-03-04 at 12 06 50 AM

@Anemy
Copy link
Member

Anemy commented Mar 16, 2022

Just a heads up - we've got a ticket in our jira to track/triage this - https://jira.mongodb.org/browse/COMPASS-5574 - hopefully we can get it to y'all soon! We'll post back here as well when there's an update. Thanks for opening the issue

@petrhaus
Copy link

petrhaus commented May 25, 2022

2 months later, and with the jira ticket still unassigned, I'd like to ask if "soon" is really going to happen any soon :-)

@dungmv
Copy link

dungmv commented May 26, 2022

2 years

@lockieluke
Copy link

as far as i know compass is already on electron v13 theres no way they cant support apple silicon

@neumann-nico
Copy link

@Anemy Is there any news for the native m1 version?
Looking forward to the update and thanks to the team for taking the time :)

@RodrigoRosmaninho
Copy link

I've taken the current master branch (as of this reply) and compiled it on an Apple Silicon machine.
Everything seems perfectly functional, and Activity Manager now shows "Kind: Apple" for all the MongoDB Compass processes 🙂

You can get the dmg file I generated on this link and try it for yourself while you wait for an official release: https://drive.google.com/file/d/1Gzx1YXxv2ZimEZ6wFUEx94h4HGYNJkaw/view?usp=sharing

After dragging the app to the Applications folder you'll need to run this:
xattr -d com.apple.quarantine /Applications/MongoDB\ Compass\ Dev.app

Because Apple places App files downloaded from the internet (from unknown developers/sources) in quarantine and reports them as "damaged" to the user.

@neumann-nico
Copy link

@RodrigoRosmaninho Thank you very much! Which steps did you do to compile it?

@dungmv
Copy link

dungmv commented Jul 15, 2022

I've taken the current master branch (as of this reply) and compiled it on an Apple Silicon machine. Everything seems perfectly functional, and Activity Manager now shows "Kind: Apple" for all the MongoDB Compass processes 🙂

You can get the dmg file I generated on this link and try it for yourself while you wait for an official release: https://drive.google.com/file/d/1Gzx1YXxv2ZimEZ6wFUEx94h4HGYNJkaw/view?usp=sharing

After dragging the app to the Applications folder you'll need to run this: xattr -d com.apple.quarantine /Applications/MongoDB\ Compass\ Dev.app

Because Apple places App files downloaded from the internet (from unknown developers/sources) in quarantine and reports them as "damaged" to the user.

You are my hero :D

@RodrigoRosmaninho
Copy link

RodrigoRosmaninho commented Jul 16, 2022

@RodrigoRosmaninho Thank you very much! Which steps did you do to compile it?

@neumann-nico here are the steps I went through:

  1. Clone the repo
  2. Bump node version to one that supports Apple Silicon in package.json, package-lock.json and packages/compass/package.json (I used 16.16.0)
  3. Bump electron-packager to version 15.5.1 in packages/hadron-build/package.json
  4. Find and replace all instances of darwin-x64 to darwin-arm64 in packages/hadron-build/lib/target.js and packages/hadron-build/commands/release.js
  5. Run npm install in the packages/compass directory to download all dependencies
  6. Run npm install -g typescript
  7. Run tsc inside the configs/webpack-config-compass directory (If the typescript isn't compiled, compass won't be able to import this module)
  8. Run npm start in the packages/compass directory to confirm that MongoDB Compass builds and starts successfully
  9. Run npm run package-compass in the packages/compass directory to create the .App file. In my case this command threw an error at the end, but the .App file had already been successfully created in packages/compass/dist.

@neumann-nico
Copy link

neumann-nico commented Jul 16, 2022

@RodrigoRosmaninho Thank you very much! Which steps did you do to compile it?

@neumann-nico here are the steps I went through:

1. Clone the repo

2. Bump node version to one that supports Apple Silicon in package.json, package-lock.json and packages/compass/package.json (I used 16.16.0)

3. Bump electron-packager to version 15.5.1 in packages/hadron-build/package.json

4. Find and replace all instances of `darwin-x64` to `darwin-arm64` in packages/hadron-build/lib/target.js and packages/hadron-build/commands/release.js

5. Run `npm install` in the packages/compass directory to download all dependencies

6. Run `npm install -g typescript`

7. Run `tsc` inside the configs/webpack-config-compass directory (If the typescript isn't compiled, compass won't be able to import this module)

8. Run `npm start` in the packages/compass directory to confirm that MongoDB Compass builds and starts successfully

9. Run `npm run package-compass` in the packages/compass directory to create the .App file. In my case this command threw an error at the end, but the .App file had already been successfully created in packages/compass/dist.

Thanks it worked! You should create a pull request :)
Even though there is an error at the end, I think not a lot is missing to be fully working.

Edit: I could get rid of the error: Error: Command failed: bless --folder /Volumes/MongoDB Compass Dev --openfolder /Volumes/MongoDB Compass Dev bless: The 'openfolder' is not supported on Apple Silicon devices

Updating appdmg from 0.6.0 to 0.6.4 helped. Now it also generated the .dmg file :)

@petrhaus
Copy link

I've taken the current master branch (as of this reply) and compiled it on an Apple Silicon machine.
Everything seems perfectly functional, and Activity Manager now shows "Kind: Apple" for all the MongoDB Compass processes 🙂

The performance boost is incredible. Can't wait for the official version.

@neumann-nico
Copy link

@RodrigoRosmaninho
Things are getting serious: #3269

@RodrigoRosmaninho
Copy link

Thanks for the update 👍

@gribnoysup
Copy link
Contributor

arm64 build for macOS is now available in the download center for the latest beta (1.33.0-beta.2) and will be available in the next stable release so I'm closing the issue. If something in the beta doesn't work for you, please feel free to open a new issue with a specific issue details

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