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

Support of Alpine Linux / Musl libc builds #249

Closed
Flarna opened this issue Nov 7, 2016 · 4 comments
Closed

Support of Alpine Linux / Musl libc builds #249

Flarna opened this issue Nov 7, 2016 · 4 comments

Comments

@Flarna
Copy link

Flarna commented Nov 7, 2016

As far as I know node-pre-gyp uses os, bitness , node module version to select the pre-built binaries to download.

Isn't this an issue for Linux systems using Musl libc? As far as I know they are not 100% ABI compatible therefore it may happen that non working binaries are downloaded.

Or is it currently needed to compile from source for Musl libc always?

@reconbot
Copy link

reconbot commented Nov 7, 2016

We don't currently have flags for things like c library or arm version or
os variant.

On Mon, Nov 7, 2016, 8:50 AM Flarna notifications@github.com wrote:

As far as I know node-pre-gyp uses os, bitness , node module version to
select the pre-built binaries to download.

Isn't this an issue for Linux systems using Musl libc? As far as I know
they are not 100% ABI compatible therefore it may happen that non working
binaries are downloaded.

Or is it currently needed to compile from source for Musl libc always?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#249, or mute the thread
https://github.com/notifications/unsubscribe-auth/AABlbmEguahYpdKFWxPYm_Ham26o33V8ks5q7yymgaJpZM4KrO0S
.

@springmeyer
Copy link
Contributor

@Flarna correct. Alternative C or C++ libraries are not supported by default. However, If you want to produce binaries for them you can. You would use the --toolset argument (https://github.com/mapbox/node-pre-gyp/blob/105ecdcb82131594178d17575f60f48ec32c5ac6/CHANGELOG.md#060). What you would do is:

  • Compile a given module on alpine linux and pass --toolset=musl where the musl could be any string you want.
  • Publish the binary like node-pre-gyp package publish --toolset=musl
  • Then you could install the binary like: npm install --toolset=musl

@Flarna
Copy link
Author

Flarna commented Nov 7, 2016

Thanks a lot!

@Flarna Flarna closed this as completed Nov 7, 2016
@coreprocess
Copy link
Contributor

coreprocess commented Nov 2, 2017

@Flarna node-pre-gyp just released a new version, which support the {libc} token in the path and package name variables. The token resolves to glibc or musl.

See:

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

4 participants