Compile errors with PhantomJS

PhantomJS is a headless WebKit scriptable Javascript API, which I wanted to try out. Unfortunately there aren't many binary packages available so I had to compile it from source, but it came up with a bunch of compile errors.

Error message

This is the error message I got, but you'll probably get a different specific error, depending at which stage the compilation process fails:

I found on this message threada suggestion to increase the amount of RAM on the system. I was running a Debian 7.9 virtual machine on VMWare Fusion with just under 1GB of RAM. I shut it down, upped the RAM to 2GB, rebooted and started the build process again. This time it worked.

Unfortunately you may not have the luxury of simply adding more RAM to a VPS or VM, which potentially means you can't build it yourself. However, try running the build process again after it fails, because it will have already done a lot of the work and possibly won't need to much RAM next time.