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

Mac arm64 prebuild #766

Closed
dgrijuela opened this issue Jun 10, 2021 · 8 comments · Fixed by #781
Closed

Mac arm64 prebuild #766

dgrijuela opened this issue Jun 10, 2021 · 8 comments · Fixed by #781
Labels
help wanted Extra attention is needed

Comments

@dgrijuela
Copy link

I'm not being able to package an electron app for the new mac m1 chip. It says it couldn't find leveldown binaries for that system.

These are the binaries found:

Screen Shot 2021-06-10 at 10 11 34

Any help? Thanks :)

@vweevers
Copy link
Member

The ability to produce prebuilt binaries for M1 (Apple silicon) is blocked by actions/runner-images#2187.

Are you able to compile from source?

@vweevers
Copy link
Member

We might be able to cross-compile on an intel mac. Help is wanted, I don't own either.

@vweevers vweevers added the help wanted Extra attention is needed label Jun 10, 2021
@dgrijuela
Copy link
Author

dgrijuela commented Jun 10, 2021

The ability to produce prebuilt binaries for M1 (Apple silicon) is blocked by actions/virtual-environments#2187.

Are you able to compile from source?

I'll try to ask someone with the M1 do the npm i leveldown --build-from-source and post here the results. Thank you @vweevers

@vweevers
Copy link
Member

vweevers commented Jun 12, 2021

We might be able to cross-compile on an intel mac.

An easier option is to build "fat binaries" that work on both x64 and arm64. Here's how fsevents did it: fsevents/fsevents#350.

Tasks:

@ralphtheninja
Copy link
Member

I can help with testing on Intel.

@vweevers
Copy link
Member

Testers wanted! On both Intel and M1. If you have such a machine, please run:

git clone --recurse-submodules https://github.com/Level/leveldown.git
cd leveldown
git checkout apple-silicon
npm i --ignore-scripts
npm run prebuild-darwin-x64+arm64
npm run test-prebuild

@ikreymer
Copy link

ikreymer commented Sep 13, 2021

I can confirm the above steps worked on Apple M1 (updated the package.json to the newly released node-gyp-build 4.3.0).
I was able to manually add the prebuild to a universal osx electron app and it seems to be working. Thanks!

vweevers added a commit that referenced this issue Sep 24, 2021
vweevers added a commit that referenced this issue Sep 28, 2021
On mac, the prebuilt binary (as well as the binary built by
`npm i --build-from-source`) is now a universal binary that's
suitable for both x86_64 (as before) and arm64 (new).

Also sets MACOSX_DEPLOYMENT_TARGET, to 10.7 which is the same target
that Node.js 10 uses and thus what we already supported, but now
explicitly.

Ref #766
@vweevers
Copy link
Member

6.0.3

an9949an pushed a commit to an9949an/leveldown that referenced this issue Aug 15, 2023
On mac, the prebuilt binary (as well as the binary built by
`npm i --build-from-source`) is now a universal binary that's
suitable for both x86_64 (as before) and arm64 (new).

Also sets MACOSX_DEPLOYMENT_TARGET, to 10.7 which is the same target
that Node.js 10 uses and thus what we already supported, but now
explicitly.

Ref Level#766

(cherry picked from commit 26ea717)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants