Be Kind To New Users
Be Kind To New Users

Reputation: 10063

Error while building V8 on Mac Lion

I am following these instructions to attempt to build V8 on Mac Lion: http://code.google.com/apis/v8/build.html

I get this error:

    $ scons sample=shell mode=release snapshot=on
scons: Reading SConscript files ...
OSError: [Errno 2] No such file or directory:
  File "/Users/pottmi/Tools/v8/v8-read-only/SConstruct", line 1569:
    Build()
  File "/Users/pottmi/Tools/v8/v8-read-only/SConstruct", line 1517:
    opts = GetOptions()
  File "/Users/pottmi/Tools/v8/v8-read-only/SConstruct", line 1153:
    AddOptions(SIMPLE_OPTIONS, result)
  File "/Users/pottmi/Tools/v8/v8-read-only/SConstruct", line 1137:
    default = guess(guess_env)
  File "/Users/pottmi/Tools/v8/v8-read-only/SConstruct", line 959:
    stdout=subprocess.PIPE).communicate()[0]
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 672:
    None
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1202:
    None

Here are the versions of the software that I have installed:

svn, version 1.6.17 (r1128011)
Python 2.7.1
SCons by Steven Knight et al.:
        script: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
        engine: v2.1.0.r5357[MODIFIED], 2011/09/09 21:31:03, by bdeegan on ubuntu
        engine path: ['/usr/local/lib/scons-2.1.0/SCons']

The /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ path exists, but there is no subprocess.py file.

Upvotes: 2

Views: 673

Answers (2)

Bryson
Bryson

Reputation: 1266

I have had much better luck in the last two years with using Homebrew than with compiling things manually. Installing the v8 Javascript Engine through Homebrew is as simple as the following:

[12:26] Bryson@Galactica  ~ :$ brew install v8
==> Installing v8 dependency: scons
==> Downloading http://downloads.sourceforge.net/scons/scons-2.2.0.tar.gz
######################################################################## 100.0%
==> /usr/bin/gzip scons-time.1
==> /usr/bin/gzip scons.1
==> /usr/bin/gzip sconsign.1
==> /usr/bin/python setup.py install --prefix=/usr/local/Cellar/scons/2.2.0 --standalone-lib --install-lib=/usr/
/usr/local/Cellar/scons/2.2.0: 393 files, 4.2M, built in 4 seconds
==> Installing v8
==> Downloading https://github.com/v8/v8/tarball/3.9.24
######################################################################## 100.0%
==> scons -j 8 arch=x64 mode=release snapshot=on library=shared visibility=default console=readline sample=shell
==> install_name_tool -change libv8.dylib /usr/local/Cellar/v8/3.9.24/lib/libv8.dylib /usr/local/Cellar/v8/3.9.2
/usr/local/Cellar/v8/3.9.24: 12 files, 5.8M, built in 55 seconds

Dependancies are installed, versions are checked, etc. From here, just type v8 and you're into the shell.

Upvotes: 0

aughey
aughey

Reputation: 458

I believe the recommended way to build v8 is with gyp. Please see http://code.google.com/p/v8/wiki/BuildingWithGYP for information on building it that way.

Upvotes: 1

Related Questions