joyent/node — Issue #2408: Node installation conflicts with SpiderMonkey
Author: Hamms
Created: 2011-12-23 03:15:02+00:00
State: open

The g++ command that gmake generates when building node prioritizes the global include path over /deps/v8/src. This is extremely problematic when installing node on a system that already has SpiderMonkey installed, as SpiderMonkey globally installs several headers with the same names as those defined in /deps/v8/src. The node installer grabs those files instead of the v8 ones, and everything breaks: https://gist.github.com/1512978

It is possible to work around this issue by setting the environment variable `CXXFLAGS="-I./deps/v8/src"`, but a better solution would be to put the local include path before the global.