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

Alpine Linux fail / best distro for canvas-prebuilt #31

Open
soanvig opened this issue Feb 3, 2018 · 13 comments
Open

Alpine Linux fail / best distro for canvas-prebuilt #31

soanvig opened this issue Feb 3, 2018 · 13 comments

Comments

@soanvig
Copy link

soanvig commented Feb 3, 2018

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

Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /builds/soanvig/hptcg-game/node_modules/canvas-prebuilt/canvas/build/Release/libpixman-1.so.0)

(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.

@soanvig
Copy link
Author

soanvig commented Feb 3, 2018

Installing https://pkgs.alpinelinux.org/package/edge/main/x86_64/pixman doesn't help, so it's probably wrong bindings stuff.

@chearon
Copy link
Member

chearon commented Feb 4, 2018

Hm, I've never seen that one, looks like ld.so is in an unusual place. It runs on Debian/Ubuntu/I don't remember what else I tested. The build is done on Wheezy, which is from 2012 (kernel 3.2 it looks like). Do you think it would work if the build was based on Alpine? It looks to me like GitLab CI has an unusual filesystem structure or something...

@soanvig
Copy link
Author

soanvig commented Feb 4, 2018

I am newbie about OS-oriented things, so I cannot help here.

@brentjanderson
Copy link

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.

@brentjanderson
Copy link

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.

#!/bin/sh

apk add --no-cache --update git make gcc g++ zlib-dev glib curl python

# From https://github.com/jeanblanchard/docker-alpine-glibc/blob/master/Dockerfile
GLIBC_VERSION=2.27-r0
curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub
curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk"
curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk"
apk add glibc-bin.apk glibc.apk
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*
git clone --depth 1 -b libpng12 https://github.com/glennrp/libpng.git /tmp/libpng 
cd /tmp/libpng 
./configure 
make check 
make install 
cd /app

And the error I get when attempting to use canvas-prebuilt:

Error: Error relocating /app/node_modules/canvas-prebuilt/canvas/build/Release/libthai.so.0: __snprintf_chk: symbol not found

@chearon
Copy link
Member

chearon commented Mar 8, 2018

Hm, it doesn't need anything more than glibc though, that should be all you have to do. Maybe see what ldd prints for node_modules/canvas-prebuilt/canvas/build/Release/canvas.node.

If you're working in a Docker container it might make more sense to set up the environment for native/regular canvas. It might be as easy as copying the Dockerfile in this repo

@brentjanderson
Copy link

Unfortunately the package I'm using depends on canvas-prebuilt, however I can try using rewire to hack it together. Here's the ldd output for canvas.node:

	ldd (0x7f9be1737000)
	libcairo.so.2 => node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2 (0x7f9be11fb000)
	libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0x7f9be0fd5000)
	libpangocairo-1.0.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libpangocairo-1.0.so.0 (0x7f9be0dc8000)
	libpango-1.0.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libpango-1.0.so.0 (0x7f9be0b7b000)
	libgobject-2.0.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libgobject-2.0.so.0 (0x7f9be092a000)
	libjpeg.so.8 => node_modules/canvas-prebuilt/canvas/build/Release/libjpeg.so.8 (0x7f9be06d5000)
	libgif.so.4 => node_modules/canvas-prebuilt/canvas/build/Release/libgif.so.4 (0x7f9be04cc000)
	libstdc++.so.6 => node_modules/canvas-prebuilt/canvas/build/Release/libstdc++.so.6 (0x7f9be01b9000)
	libm.so.6 => ldd (0x7f9be1737000)
	libc.so.6 => ldd (0x7f9be1737000)
	libpthread.so.0 => ldd (0x7f9be1737000)
	libpixman-1.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libpixman-1.so.0 (0x7f9bdff11000)
	libfontconfig.so.1 => node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1 (0x7f9bdfcd5000)
	libfreetype.so.6 => node_modules/canvas-prebuilt/canvas/build/Release/libfreetype.so.6 (0x7f9bdfa32000)
	libxcb-shm.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libxcb-shm.so.0 (0x7f9bdf82f000)
	libxcb-render.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libxcb-render.so.0 (0x7f9bdf626000)
	libxcb.so.1 => node_modules/canvas-prebuilt/canvas/build/Release/libxcb.so.1 (0x7f9bdf407000)
	libXrender.so.1 => node_modules/canvas-prebuilt/canvas/build/Release/libXrender.so.1 (0x7f9bdf1fd000)
	libX11.so.6 => node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6 (0x7f9bdeec8000)
	libXext.so.6 => node_modules/canvas-prebuilt/canvas/build/Release/libXext.so.6 (0x7f9bdecb6000)
	libz.so.1 => /lib/libz.so.1 (0x7f9bdea9f000)
	librt.so.1 => ldd (0x7f9be1737000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x7f9bde7b0000)
	libpangoft2-1.0.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libpangoft2-1.0.so.0 (0x7f9bde59b000)
	libgmodule-2.0.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libgmodule-2.0.so.0 (0x7f9bde397000)
	libthai.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libthai.so.0 (0x7f9bde18e000)
	libffi.so.6 => node_modules/canvas-prebuilt/canvas/build/Release/libffi.so.6 (0x7f9bddf86000)
	ld-linux-x86-64.so.2 => /lib/ld-linux-x86-64.so.2 (0x7f9bddd5f000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x7f9bddb4d000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x7f9bdd92d000)
	libXau.so.6 => node_modules/canvas-prebuilt/canvas/build/Release/libXau.so.6 (0x7f9bdd729000)
	libXdmcp.so.6 => node_modules/canvas-prebuilt/canvas/build/Release/libXdmcp.so.6 (0x7f9bdd523000)
	libdl.so.2 => ldd (0x7f9be1737000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x7f9bdd2c8000)
	libintl.so.8 => /usr/lib/libintl.so.8 (0x7f9bdd0ba000)
	libharfbuzz.so.0 => node_modules/canvas-prebuilt/canvas/build/Release/libharfbuzz.so.0 (0x7f9bdce65000)
	libdatrie.so.1 => node_modules/canvas-prebuilt/canvas/build/Release/libdatrie.so.1 (0x7f9bdcc5e000)
	libgraphite2.so.3 => node_modules/canvas-prebuilt/canvas/build/Release/libgraphite2.so.3 (0x7f9bdca37000)
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2: __strncpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2: __longjmp_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2: __finite: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2: __printf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libcairo.so.2: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libgobject-2.0.so.0: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libjpeg.so.8: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libjpeg.so.8: __sprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libgif.so.4: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libgif.so.4: __vsprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libstdc++.so.6: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libstdc++.so.6: __cxa_thread_atexit_impl: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libstdc++.so.6: __sprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libpixman-1.so.0: __printf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libpixman-1.so.0: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __vfprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __open_2: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: random_r: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __strncpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __strcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __printf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: initstate_r: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfontconfig.so.1: __sprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfreetype.so.6: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfreetype.so.6: __longjmp_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libfreetype.so.6: __sprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libxcb.so.1: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libxcb.so.1: __strcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __strcat_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __vfprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __fdelt_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __strncpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __strcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libX11.so.6: __sprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libXext.so.6: __printf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libXext.so.6: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libXext.so.6: __sprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libthai.so.0: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libthai.so.0: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libthai.so.0: __strcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libthai.so.0: __fprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libXau.so.6: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libharfbuzz.so.0: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libharfbuzz.so.0: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/libharfbuzz.so.0: __strncpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value8ToUint32ENS_5LocalINS_7ContextEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v814ObjectTemplate21SetInternalFieldCountEi: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN4node6Buffer6LengthEN2v85LocalINS1_6ObjectEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value7IsArrayEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object3SetENS_5LocalINS_7ContextEEENS1_INS_5ValueEEES5_: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object3GetEj: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v816FunctionTemplate11GetFunctionEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v87Isolate14ThrowExceptionENS_5LocalINS_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value8ToStringENS_5LocalINS_7ContextEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value19IsUint8ClampedArrayEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN4node6Buffer4CopyEPN2v87IsolateEPKcm: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: __printf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v815ArrayBufferView10ByteLengthEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value12StrictEqualsENS_5LocalIS0_EE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v811ArrayBuffer3NewEPNS_7IsolateEm: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v816FunctionTemplate11HasInstanceENS_5LocalINS_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN4node6Buffer3NewEPN2v87IsolateEPcm: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v87Integer3NewEPNS_7IsolateEi: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: __memcpy_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object3GetENS_5LocalINS_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v814ObjectTemplate11NewInstanceENS_5LocalINS_7ContextEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value10Int32ValueEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: uv_default_loop: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v820EscapableHandleScopeC1EPNS_7IsolateE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value11NumberValueEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v88Template3SetENS_5LocalINS_4NameEEENS1_INS_4DataEEENS_17PropertyAttributeE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object32SetAlignedPointerInInternalFieldEiPv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v811HandleScope12CreateHandleEPNS_8internal7IsolateEPNS1_6ObjectE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v88Function4CallENS_5LocalINS_7ContextEEENS1_INS_5ValueEEEiPS5_: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v87Isolate17GetCurrentContextEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v89Signature3NewEPNS_7IsolateENS_5LocalINS_16FunctionTemplateEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v815ArrayBufferView6BufferEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v816FunctionTemplate12SetClassNameENS_5LocalINS_6StringEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86String11NewFromUtf8EPNS_7IsolateEPKcNS_13NewStringTypeEi: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN4node6Buffer11HasInstanceEN2v85LocalINS1_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value9IsBooleanEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value11Uint32ValueEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v88TryCatch9HasCaughtEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v814ObjectTemplate11SetAccessorENS_5LocalINS_4NameEEEPFvS3_RKNS_20PropertyCallbackInfoINS_5ValueEEEEPFvS3_NS1_IS5_EERKNS4_IvEEESB_NS_13AccessControlENS_17PropertyAttributeENS1_INS_17AccessorSignatureEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v811HandleScopeC1EPNS_7IsolateE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value12BooleanValueEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v87Integer15NewFromUnsignedEPNS_7IsolateEj: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object20SlowGetInternalFieldEi: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v88TryCatchC1EPNS_7IsolateE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v88Function11NewInstanceENS_5LocalINS_7ContextEEEiPNS1_INS_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v89Exception10RangeErrorENS_5LocalINS_6StringEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object3SetENS_5LocalINS_5ValueEEES3_: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v87Context6GlobalEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v88TryCatchD1Ev: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN4node6Buffer3NewEPN2v87IsolateEPcmPFvS4_PvES5_: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Number3NewEPNS_7IsolateEd: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object38SlowGetAlignedPointerFromInternalFieldEi: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: node_module_register: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value8IsUint32Ev: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value10IsFunctionEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v88External5ValueEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v82V89ClearWeakEPPNS_8internal6ObjectE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value17IsArrayBufferViewEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86String9Utf8ValueC1ENS_5LocalINS_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v816FunctionTemplate11GetFunctionENS_5LocalINS_7ContextEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object16SetInternalFieldEiNS_5LocalINS_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v811HandleScopeD2Ev: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v88External3NewEPNS_7IsolateEPv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object18InternalFieldCountEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value8IsObjectEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v87Isolate36ReportExternalAllocationLimitReachedEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v82V812ToLocalEmptyEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v814ObjectTemplate3NewEPNS_7IsolateENS_5LocalINS_16FunctionTemplateEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v82V813DisposeGlobalEPPNS_8internal6ObjectE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v85Array3NewEPNS_7IsolateEi: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v816FunctionTemplate16InstanceTemplateEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v811HandleScope12CreateHandleEPNS_8internal10HeapObjectEPNS1_6ObjectE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v811HandleScopeD1Ev: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v815ArrayBufferView10ByteOffsetEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Array6LengthEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v820EscapableHandleScope6EscapeEPPNS_8internal6ObjectE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v82V818GlobalizeReferenceEPNS_8internal7IsolateEPPNS1_6ObjectE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86Object3NewEPNS_7IsolateE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value8ToObjectENS_5LocalINS_7ContextEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: __snprintf_chk: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v89Exception5ErrorENS_5LocalINS_6StringEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v811ArrayBuffer11GetContentsEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v87Isolate10GetCurrentEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v816FunctionTemplate17PrototypeTemplateEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: uv_queue_work: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v88TryCatch7ReThrowEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN4node12MakeCallbackEPN2v87IsolateENS0_5LocalINS0_6ObjectEEENS3_INS0_8FunctionEEEiPNS3_INS0_5ValueEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value7ToInt32ENS_5LocalINS_7ContextEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v89Exception9TypeErrorENS_5LocalINS_6StringEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN4node6Buffer4DataEN2v85LocalINS1_6ObjectEEE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value8IsNumberEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v817Uint8ClampedArray3NewENS_5LocalINS_11ArrayBufferEEEmm: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v82V88MakeWeakEPPNS_8internal6ObjectEPvPFvRKNS_16WeakCallbackInfoIvEEENS_16WeakCallbackTypeE: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v810TypedArray6LengthEv: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZNK2v85Value7IsInt32Ev: symbol not found
Error relocating node_modules/canvas-prebuilt/canvas/build/Release/canvas.node: _ZN2v86String9Utf8ValueD1Ev: symbol not found

@chearon
Copy link
Member

chearon commented Mar 8, 2018

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

@brentjanderson
Copy link

brentjanderson commented Mar 8, 2018 via email

@chearon
Copy link
Member

chearon commented Mar 21, 2018

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...

@lukasa1993
Copy link

any update on this ?

@Protectator
Copy link

Any news ? Being able to use use it on Alpine would be super helpful.

@kukovecz
Copy link

Check this Issue (#77), I think it is the same.

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

6 participants