mailing list of musl libc
 help / color / mirror / code / Atom feed
* Link problems with static node-canvas
@ 2015-06-26 23:06 piranna
  2015-06-27  6:18 ` Рысь
  0 siblings, 1 reply; 14+ messages in thread
From: piranna @ 2015-06-26 23:06 UTC (permalink / raw)
  To: musl

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


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-06-28 18:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26 23:06 Link problems with static node-canvas piranna
2015-06-27  6:18 ` Рысь
2015-06-27  9:41   ` piranna
2015-06-27 10:07     ` Рысь
2015-06-27 11:18       ` Szabolcs Nagy
2015-06-27 22:05         ` piranna
     [not found]       ` <CAKfGGh1DvxCjHWYpCENH3mcxDRa9LimHMCPhteoeb+4S0R5Uvg@mail.gmail.com>
2015-06-27 22:20         ` Fwd: " piranna
2015-06-27 22:41           ` Szabolcs Nagy
2015-06-27 23:10             ` piranna
2015-06-28  3:23               ` Рысь
2015-06-28 13:06                 ` piranna
2015-06-28 18:21                   ` piranna
2015-06-28  3:17           ` Рысь
2015-06-28 12:51             ` piranna

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).