Installing Google V8 Javascript Engine in Mac OS X and in Linux
This documents describes how to install V8. V8 is Google’s open source JavaScript engine. We use V8 on JotForm to generate form code on the server side.
Installing on Mac OS X
Download and install XCODE 3.2 or higher. Download latest stable version of scons from http://www.scons.org/
Extract package, cd into directory then run: # sudo python setup.py install
Check out V8 javascript engine into library # sudo svn checkout http://v8.googlecode.com/svn/trunk/ /Library/v8
Build V8 with scons # cd /Library/v8 # sudo scons # sudo scons sample=shell # sudo scons d8
Create short cut for d8 # sudo vi /usr/bin/d8 — #!/bin/bash
/Library/v8/d8 $@ — # sudo chmod +x /usr/bin/d8
Installing on Linux Server
Install C++ compiler for V8 # sudo apt-get install g++ OR # sudo yum install distcc.x86_64
Install scons for building V8 # sudo apt-get install scons OR # sudo yum install scons
Check out V8 from repository # sudo svn checkout http://v8.googlecode.com/svn/trunk/ /usr/local/v8
Go into v8 directory # cd /usr/local/v8
Build V8 with scons # sudo scons
IF you are on 64 bit machine and get an error, run these: