Use of libuv

The libuv README reads:

libuv is a multi-platform support library with a focus on asynchronous I/O. It was primarily developed for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others.

Both node.js and Julia use libuv, but it is possible to have them coexist in the same program space even when the versions of libuv are not compatible when using OS/X and Linux.

Depending on the Linker

For purposes of calling the Julia embedding API from a node native module as node-julia does, potential conflicts can be resolved by the linker. For OS/X this appears to happen by default, but for Linux this is not the case without the help of the linker flag -Bsymbolic-functions.

From the Linux ld man page:


When creating a shared library, bind references to global function symbols to the definition within the shared library, if any. This option is only meaningful on ELF platforms which support shared libraries.

The effect is that functions that are defined in Julia's version of libuv are used by libjulia and the version of libuv defined in node is used by node.


Historically, Julia was not built using -Bsymbolic-functions flag by default, but now the latest distributions are (as of December 1, 2014) and so this problem should be considered resolved.

Problematic distributions when using Julia compiled from source.

Some versions of Linux (for example Redhat Enterprise 5) do not natively have a linker that supports this flag, but this problem can be avoided by using The CERN toolset instead.

node 0.10 and Julia 0.4

Recent changes in version 0.4 of Julia has led to an error during initialization.