node-chakracore
node-chakracore copied to clipboard
Problems while building against node-chakracore master
When building an addon against a version of Node.js compiled from source, the following steps are necessary:
export npm_config_nodedir=<absolute path to the Node.js repo root>
export PATH=${npm_config_nodedir}:${PATH}
alias npm=${npm_config_nodedir}/deps/npm/bin/npm-cli.js
After these steps, it is possible to run npm install, npm test, etc., and the headers used for compilation and the node binary used for execution will be the ones residing at ${npm_config_nodedir}.
It is not possible to use the node-chakracore repo root in such a way because of the followings:
out/common.gypiis not created. This can be solved withln -s ../common.gypi outfrom the node-chakracore repo root.- For some reason, the following directories are added to the include search path (
/home/nix/node/node-chakracoreis the repo root):
The directory-I/home/nix/node/node-addon-api -I/home/nix/node/node-chakracore/out/include/node -I/home/nix/node/node-chakracore/out/src -I/home/nix/node/node-chakracore/out/deps/openssl/config -I/home/nix/node/node-chakracore/out/deps/openssl/openssl/include -I/home/nix/node/node-chakracore/out/deps/uv/include -I/home/nix/node/node-chakracore/out/deps/zlib -I/home/nix/node/node-chakracore/out/deps/chakrashim/includeoutshould not be part of the path, unless the required directories really are copied/linked to those paths.ln -s ../src outfixes this problem for the Node.js headers.