Skip to content

Instantly share code, notes, and snippets.

@bartek
Created March 15, 2011 01:54
Show Gist options
  • Save bartek/870193 to your computer and use it in GitHub Desktop.
Save bartek/870193 to your computer and use it in GitHub Desktop.
Building node.js on Snow Leopard sometimes sucks!
"""
If you're having trouble building node.js on OSX (Snow Leopard seems to be problematic here) with an error like this:
""""
$ brew install node
==> Downloading http://nodejs.org/dist/node-v0.4.2.tar.gz
File already downloaded and cached to /Users/bartekc/Library/Caches/Homebrew
==> ./configure --prefix=/usr/local/Cellar/node/0.4.2
==> make install
........
scons: Reading SConscript files ...
scons: warning: Ignoring missing SConscript 'obj/test/release/SConscript'
File "/private/tmp/homebrew-node-0.4.2-mrww/node-v0.4.2/deps/v8/SConstruct", line 1201, in BuildSpecific
scons: done reading SConscript files.
scons: Building targets ...
/usr/bin/c++ -o obj/release/accessors.o -c -O3 -march=core2 -msse4.1 -w -pipe -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -mmacosx-version-min=10.4 -fno-rtti -fno-exceptions -Wall -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m64 -O3 -fomit-frame-pointer -fdata-sections -ffunction-sections -ansi -mmacosx-version-min=10.4 -DV8_TARGET_ARCH_X64 -DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -I/private/tmp/homebrew-node-0.4.2-mrww/node-v0.4.2/deps/v8/src /private/tmp/homebrew-node-0.4.2-mrww/node-v0.4.2/deps/v8/src/accessors.cc
scons: *** [obj/release/accessors.o] Error 127
scons: building terminated because of errors.
Waf: Leaving directory `/private/tmp/homebrew-node-0.4.2-mrww/node-v0.4.2/build'
Build failed: -> task failed (err #2):
{task: libv8.a SConstruct -> libv8.a}
"""
The error seems to be a problem with compiling V8 (http://code.google.com/p/v8/)
If you grab V8 from Google code: http://code.google.com/p/v8/wiki/Source?tm=4
You can try building it:
"""
svn checkout http://v8.googlecode.com/svn/trunk/ v8
cd v8
scons
"""
This might also break with an error similar to:
"""
*** [obj/release/accessors.o] Error 127
"""
There is an outstanding bug on the V8 issue board: http://code.google.com/p/v8/issues/detail?id=631#c6 that is very similar to the errors I've seen and the arch of my system.
After I ran sudo scons on the checked out v8 code, it succesfully installed, and node.js did as well, yay!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment