These notes come from two sources:
The steps are repeated here because the order is different from the base instructions:
- I’m using a VM, so make sure you have plenty of RAM. 4gm was inconsistent, so I bumped mine up to 7 just in case.
- Install needed build dependencies
sudo apt-get install build-essential g++ flex bison gperf ruby perl \
libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev \
libpng-dev libjpeg-dev python libx11-dev libxext-dev
- Clone the repo and move to the 2.0 branch
git clone git://github.com/ariya/phantomjs.git
cd phantomjs
git checkout 2.0
- Apply the changes from Patch with forward declares. If you trust me, here’s a patch you can directly apply:[[file:0001-Added-forward-defs-to-get-code-to-compile.patch]].
- Build phantomjs2 (this should detect the number of cores and parallelize the build, if not you can add –jobs 4, for example)
./build.sh --confirm
- If this fails, you might need to up your memory and make sure you are not doing anything else.
- If you get an error related to a problem with a .o or some object missing from a library, up your memory as well. And then do this to restart the whole build
git clean -fdx
./build.sh --qt-config "-I /usr/local/include/ -L /usr/local/lib/" --confirm
Comments