-
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
Alpine Linux fail / best distro for canvas-prebuilt #31
Comments
Installing https://pkgs.alpinelinux.org/package/edge/main/x86_64/pixman doesn't help, so it's probably wrong bindings stuff. |
Hm, I've never seen that one, looks like |
I am newbie about OS-oriented things, so I cannot help here. |
Chiming in after running into a similar issue: It appears the root problem is that node-canvas-prebuilt is dynamically linked against glibc, whereas alpine uses musl. I've gone through quite a few gymnastics to get node-canvas-prebuilt to run in alpine linux but to no avail. If it were also built against alpine linux, that would be tremendously helpful, however I don't know complicated this would be to add to this project. |
Specifically, I am using the following script with alpine linux to install glibc within alpine. The breakdown happens, however, when trying to load the prebuilt canvas module - libthai is built against glibc, and that breaks things down.
And the error I get when attempting to use canvas-prebuilt:
|
Hm, it doesn't need anything more than glibc though, that should be all you have to do. Maybe see what If you're working in a Docker container it might make more sense to set up the environment for native/regular |
Unfortunately the package I'm using depends on canvas-prebuilt, however I can try using rewire to hack it together. Here's the
|
If the Did you get |
I’ve already jettissoned resemble.js and I’m using a pure javascript implementation to do image diffing (https://www.npmjs.com/package/img-diff-js). Problem solved for me, since I don’t need full canvas capabilities. Thank you for your help!
…On Mar 8, 2018, 1:38 PM -0700, Caleb Hearon ***@***.***>, wrote:
If the libc being linked against (musl) is missing all those symbols you're definitely in trouble.
Did you get glibc installed successfully? I wonder where it gets put since it can't be in /usr/lib/libc.so. You could maybe add a step in your docker file that changes all the references to libc in all node_modules/canvas-prebuilt/canvas/build/Release/* to instead point to wherever glibc is. I've not done that on Linux but it should be possible using something like this in the "change soname" section at the bottom
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
By pure coincidence I noticed that node-pre-gyp just added support for specifying which libc implementation should be downloaded. So I could potentially add support for musl here... |
any update on this ? |
Any news ? Being able to use use it on Alpine would be super helpful. |
Check this Issue (#77), I think it is the same. |
Many docker images are based on Alpine Linux because it's super light. I'm talking about node:alpine precisely.
I've installed canvas-prebuilt with version 1.6.5 and got missing libpng. Found issue and it suggested updating to 2.0.0-alpha.
Updating to 2.0.0-alpha fixed libpng issue, but finished with
(it's GitLab.com CI)
So I wonder - is there Alpine Linux fix or I can switch to any other distro, but I would like to know, which distro should I use for image base. There is no info anywhere which distro works best.
The text was updated successfully, but these errors were encountered: