-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Allow cross platform installation by custom libc flag #2692
Conversation
Would adding support for an optional $ npm install --platform=linux --libc=musl ... This would arrive via |
I could not follow your idea completely. You mean something like
? Would it make more sense to provide a patch to |
That code sample looks like it does what I was thinking, yes. Does that solve your problem? I'd prefer to address this in |
3f2e222
to
3e08ba7
Compare
OK. I updated my PR. Type of So |
b3b8144
to
73a248a
Compare
I've fixed the syntax and thus CI builds and updated the doc with hint of cross platform builds by Feel free to rephrase it. |
Thanks for the updates. I've just had a thought - what method/flags are you currently using to "cross" install at the moment? I ask as, having said e.g. |
As I've written my usecase is to install linux-x64 from a linux-arm64 host and vise versa. The libc detection check is only triggered on linux hosts and I am looking for an I-know-what-I-am-doing thing. AFAIK setting the plattform to Further feedback and suggestions are wellcome ;-) |
After some thought the semantic of the I propose the the initial change of a |
Yes, I've been thinking about this more too and I agree with you, let's keep this simple like you initially suggested. In terms of naming, I can't remember/find what you first proposed, but we could follow the existing "I know what I'm doing" |
Thank you for your reply. I'm fine with What about with a more general name of |
OK, Perhaps we should still perform the checks but log a warning rather than throw an Error? If we go for this then the |
73a248a
to
f872c85
Compare
I've updated the code and introduced Works and feels good so far ;-) If I should change/rename/document anything, please let me know. |
f872c85
to
e31ffa7
Compare
Another question: Why is the CI job for FreeBSD 13.0 failing?
Is this error triggered by this PR? Or is this a general issue? |
Thank you very much for this, it will be included in v0.28.2. (The FreeBSD CI is currently failing due to the out-of-date vips package.) |
Thank you very much for accepting my PR. Awesome |
I would like to create cross platform bundles including sharp prebuilds, e.g. installing sharp for darwin-x64 on a linux-arm64 machine. For that reason the libc checks needs to be disabled - or the installation needs to be forced.
I am aware that this flag is kind of I-know-what-I-am-doing - I am open for discussions
And again: Thank you for this great library :-)