-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add musl build based on alpine linux image #116
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thank you!
Not sure about the segfault but only supporting newer Node seems reasonable.
@@ -0,0 +1,46 @@ | |||
FROM alpine:3.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that Alpine 3.11 uses musl libc 1.1.24, released in October. Assuming musl adds symbols between releases, anyone with older versions won't be able to link against the binary. That's why the other Dockerfile uses an old Debian and compiles from source. So I think that might be one pre-req to merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I can make the change to an older version of alpine. How far back are you looking to go though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chearon I was looking at this again and I think it makes sense to leave musl at 1.1.24. They are planning to EOL the 1.1 branch with the release of 1.2 in February but will be back-porting bug fixes down to 1.1.25 in the future. Also, all versions prior to 1.1.24 have security issues.
Similar to how musl will only be supported for node versions >= 12 (released in April 2019) I don't think it's unreasonable to only "officially" support musl >= 1.1.24 (released in Oct 2019). What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to jump in - given the EOL, eventual complications and that there are no better options either ways so far - having recent support now is better than having legacy support but too late.
Probably a lot of people in the K8S world are using Alpine as a base and are struggling / consuming power to build these for nothing :)
what's about this pull request? Will it be merged? |
We're wrapping up some work to do builds in the main repo using GitHub Actions, so once we get that completed we can move this PR to node-canvas. @Logikgate sounds good on #116 (comment), sorry for the late reply. |
@chearon Do you have any update about this PR? Seems like #1568 was already merged. |
Sorry, we ran into issues: Automattic/node-canvas#1622 (comment). If someone else wants to help over there and/or migrate this PR, I'll do my best to help get it merged. Native build stuff takes a lot of time so not sure when I'll be able to do it otherwise. |
Automattic/node-canvas#1622 is closed already. What else is needed here for this PR to be accepted? I would be willing to help if I can. |
Is this pull request still active? If yes, what is missing? If no, is there another pull request/issue that is? |
This is an attempt to add pre-built musl binaries, ref #77
For some reason this only works for nodejs v12 and higher. The binary builds without errors on lower versions but the final
node -e "require('./node-canvas')"
test results in a Segmentation Fault. I have tried trouble shooting it but can't seem to get anywhere. If you have any ideas why this would be I would appreciate a second set of 👀 .In the meantime it seems adding node 12 and 13 musl binaries would still be of value so I'm opening this PR now for review, please let me know what you think.