Date: Sat, 27 Jun 2015 01:06:04 +0200 From: "piranna@...il.com" <piranna@...il.com> To: musl@...ts.openwall.com Subject: Link problems with static node-canvas I have been trying in the last days to craft a statically linked version of node-canvas (https://github.com/Automattic/node-canvas) to use it in NodeOS (a musl-based Linux OS with no global libraries). In my fork I managed to convert it from needing cairo, libjpeg, freetype and giflib as dynamica libraries to create it as a statically linked shared object that contains all of them inside, making it autonomous (that's the way ideally Node.js addons are build, as .so files -with the extension changed to .node- with all their dependencies statically linked and not needing any dynamic library. This .node files later are loaded with dlopen() when someone requires them by calling the require() function from inside Node.js). When compiling it in Ubuntu using glibc it works correctly, but when compiling it for NodeOS using musl, I got an error about "Error relocating: jinit_arith_decode symbol not found" (https://github.com/Automattic/node-canvas/issues/551#issuecomment-114253760). That function is from libjpeg, and both the jpeg.a and the canvas.node files have references to it. I've trying to use the musl-compiled canvas.node file by using LD_LIBRARY_PATH and it shows the "Error relocating" string, but doesn't clarify where's the error. At first I though it would be a libjpeg-turbo problem, but after removing the support for JPEG in node-canvas, the same "Error relocating" problem showed, only that now regarding to a FreeType function, so since it works correctly with glibc that's why I thought it could be a linking problem related to musl. This is strange since other compiled modules works correctly under NodeOS, but it's true they don't link with other libraries (both startic or dynamic) beyond the C lib or the Linux kernel SysCalls... :-/ Any idea or suggestiong about what could be the culprit or where to continue investigating? -- "Si quieres viajar alrededor del mundo y ser invitado a hablar en un monton de sitios diferentes, simplemente escribe un sistema operativo Unix." – Linus Tordvals, creador del sistema operativo Linux
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.