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

Cannot use on M1 Macs #5

Open
eagerestwolf opened this issue Mar 8, 2021 · 3 comments
Open

Cannot use on M1 Macs #5

eagerestwolf opened this issue Mar 8, 2021 · 3 comments

Comments

@eagerestwolf
Copy link

Minor issue, but since the library is hardcoded to use the prebuilt libraries, I feel that I should raise this issue. If a user on an M1 Mac downloads this package because there is no arm64 binary included, node-gyp nukes the build directory and starts from scratch. As a result of this, when the package tries to pull the prebuilt binary it fails because the prebuilt binary doesn't exist because node-gyp never creates the darwin folder (for whatever reason). This is the resulting directory structure on an M1 Mac.

Screen Shot 2021-03-07 at 9 47 23 PM

I'm not entirely sure how this could be handled...unless I were to send you my arm64 compiled node file and you could create say a darwin-arm64 folder...I'm not very good with native addons.

It should be noted, this was the result whether I installed the library directly from NPM, or from the master branch.

@Reon90
Copy link
Owner

Reon90 commented Mar 15, 2021

@eagerestwolf yeah, it's true, could you make PR or send me your compiled folder?
Also could you print it from your terminal node -e 'console.log(process.platform)' ?

@eagerestwolf
Copy link
Author

Sorry, been busy with my day job. Anyhow, my process.platform still reports as Darwin. The issue is process.arch reports as arm64 not x86_64, so that's why node-gyp wants to build a package resulting in the incorrect directory structure. Currently, as far as I am aware node-gyp doesn't provide a way to specify an output directory (although I'm not an expert), but one of the sqlite libraries copies binaries after they've been built [link], maybe that would be of help here?

Screen Shot 2021-03-24 at 8 47 45 PM

@eagerestwolf
Copy link
Author

In the meantime, here is my build artifacts if they are of help.

Release.zip

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

2 participants