PSA - When trying to install plv8, don’t blindly clone the v8 dev branch
I just wasted way more time than I should have trying to get this working so I thought I would share my results. When trying to get plv8 installed, the compiling process would fail miserably every time. The error message pointed to include/v8.h as the problem but nobody else seemed to be having this issue on the internet, or more likely they just gave up and moved on with their life, settling for pl/perl.
The full error message can be found here: http://pastebin.com/yB3wQiU7
After trying many different variants of flags while compiling V8, and a similar slew of options while compiling plv8, I finally took a look at the V8 repository on github and I noticed quite a bit of action in the include/* folder lately.
Assuming all these latest changes were the culprit, rather than just cloning the repo as every single plv8 instructional document suggests, I cloned the latest stable branch (3.18 in this case):
git clone http://github.com/v8/v8.git -b 3.18 v8 && cd v8
Once I ran my usual make commands (make native library=shared), and moved the files to their usual locations, compiling plv8 worked like a charm.
Every time I try to install plv8 on a new system it’s a brand new battle but hopefully this post will help somebody else out in the future.