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

Should allow native Apple Sillicon support since Mongo 6.X #714

Closed
Moumouls opened this issue Nov 7, 2022 · 7 comments
Closed

Should allow native Apple Sillicon support since Mongo 6.X #714

Moumouls opened this issue Nov 7, 2022 · 7 comments
Labels
Distribution support Add / modify an (linux) distribution released Pull Request released | Issue is fixed

Comments

@Moumouls
Copy link

Moumouls commented Nov 7, 2022

Versions

  • NodeJS: 16
  • mongodb-memory-server-*: 8.9.5
  • mongodb(the binary version): 6.X
  • mongodb(the js package): 0.0.0
  • mongoose: 0.0.0
  • system: Mac OS Apple Sillicon

package: mongo-memory-server

What is the Problem?

MongoDB now support Apple Sillicon natively (bin download URL example: https://fastdl.mongodb.org/osx/mongodb-macos-arm64-6.0.2.tgz)

I found the following code

        if (this.arch === 'aarch64') {
            log('getArchiveNameOsx: Arch is "aarch64", using x64 binary');
            this.arch = 'x86_64';
        }

Starting mongo 6.X, the arch x86 should not be forced.

The current workaround I'm using to be able to use native MongoDB on M1

if (process.arch === "arm64" && process.platform === "darwin") {
  process.env.MONGOMS_DOWNLOAD_URL = "https://fastdl.mongodb.org/osx/mongodb-macos-arm64-6.0.2.tgz"
}

Code Example

No code

Debug Output

Debug Output
spawn Unknown system error -86spawn Unknown system error -86, Is Rosetta Installed and Setup correctly?

Do you know why it happenes?

no

@Moumouls Moumouls added the bug label Nov 7, 2022
@hasezoey hasezoey added Distribution support Add / modify an (linux) distribution and removed bug labels Nov 9, 2022
@github-actions
Copy link

github-actions bot commented Nov 9, 2022

@github-actions github-actions bot added the released Pull Request released | Issue is fixed label Nov 9, 2022
@hasezoey
Copy link
Collaborator

hasezoey commented Nov 9, 2022

the support for 6.0.0 and up arm64 native binaries is in 8.10.0, please test to confirm that these binaries actually work as intended (i dont have a mac device)

@Moumouls
Copy link
Author

Moumouls commented Nov 9, 2022

@hasezoey it's working perfectly and is also see that you updated the docs so it's perfect !

Thanks for your reactivity!

@maximilianschmid
Copy link

Thanks for supporting Apple Silicon!

@ghost
Copy link

ghost commented May 25, 2023

Hi,
I'm using apple m1 and it fails on system error -86 code.

I'm uisng 8.11.x without rosetta (We have issues in the company when setting rosetta for other installations so we decided not to deal with it).

Any guidance on what can I do?

Thanks

CC @hasezoey

@hasezoey
Copy link
Collaborator

@Attrash-Islam if you dont set a custom version, then 5.0.x will be used, to get macos arm binaries you will have to manually set a version that is 6.0.2 or higher, see Config Options: VERSION

@ghost
Copy link

ghost commented May 25, 2023

Will try this next week! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Distribution support Add / modify an (linux) distribution released Pull Request released | Issue is fixed
Projects
None yet
Development

No branches or pull requests

3 participants