Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby2.2 -r ./siteconf20160523-1400-1x811sw.rb extconf.rb
checking for main() in -lpthread... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling mini_racer_extension.cc
In file included from mini_racer_extension.cc:4:0:
/var/lib/gems/2.2.0/gems/libv8-5.0.71.48.3-x86-linux/vendor/v8/include/v8.h:341:1: error: expected unqualified-id before ‘using’
/var/lib/gems/2.2.0/gems/libv8-5.0.71.48.3-x86-linux/vendor/v8/include/v8.h:477:1: error: expected unqualified-id before ‘using’
/var/lib/gems/2.2.0/gems/libv8-5.0.71.48.3-x86-linux/vendor/v8/include/v8.h:871:1: error: expected unqualified-id before ‘using’
mini_racer_extension.cc:136:51: error: ‘Handle’ has not been declared
mini_racer_extension.cc:136:57: error: expected ‘,’ or ‘...’ before ‘<’ token
mini_racer_extension.cc: In function ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’:
mini_racer_extension.cc:140:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:144:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:148:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:152:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:156:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:160:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:165:55: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:171:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:175:9: error: ‘value’ was not declared in this scope
mini_racer_extension.cc:184:53: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:186:57: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:193:26: error: ‘value’ was not declared in this scope
mini_racer_extension.cc: At global scope:
mini_racer_extension.cc:197:8: error: ‘Handle’ does not name a type
mini_racer_extension.cc: In function ‘VALUE rb_context_eval_unsafe(VALUE, VALUE)’:
mini_racer_extension.cc:299:61: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:306:63: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:348:56: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc: In function ‘void* gvl_ruby_callback(void*)’:
mini_racer_extension.cc:396:2: error: ‘Handle’ was not declared in this scope
mini_racer_extension.cc:396:17: error: expected primary-expression before ‘>’ token
mini_racer_extension.cc:396:19: error: ‘external’ was not declared in this scope
mini_racer_extension.cc:396:45: error: expected primary-expression before ‘>’ token
mini_racer_extension.cc:396:46: error: ‘::Cast’ has not been declared
mini_racer_extension.cc:409:65: error: cannot convert ‘v8::Local<v8::Value>’ to ‘int’ for argument ‘2’ to ‘VALUE convert_v8_to_ruby(v8::Isolate*, int)’
mini_racer_extension.cc:430:2: error: ‘Handle’ was not declared in this scope
mini_racer_extension.cc:430:14: error: expected primary-expression before ‘>’ token
mini_racer_extension.cc:430:16: error: ‘v8_result’ was not declared in this scope
mini_racer_extension.cc:430:73: error: ‘convert_ruby_to_v8’ was not declared in this scope
make: *** [mini_racer_extension.o] Error 1
make failed, exit code 2
Gem files will remain installed in /tmp/bundler20160523-1400-1fbh6n7/mini_racer-0.1.3/gems/mini_racer-0.1.3 for inspection.
Results logged to /tmp/bundler20160523-1400-1fbh6n7/mini_racer-0.1.3/extensions/x86-linux/2.2.0/mini_racer-0.1.3/gem_make.out
An error occurred while installing mini_racer (0.1.3), and Bundler cannot continue.
Make sure that `gem install mini_racer -v '0.1.3'` succeeds before bundling.
@fantasticfears Thanks for the suggestion, but uninstalling and re-installing libv8 hasn’t fixed it. Note that this is actually a virtual ubuntu environment.
Er, sorry, missed that. That could be a little tricky. Ubuntu doesn’t deliver a new v8. Some PPA offers 5.1 but it doesn’t match libv8 version. Compiler errors might be some flags or gcc version issues.
But libv8 has binary distributions. The command in below should help. x86_64-linux or x86-linux depends on ubuntu installation. gem install libv8 -v '5.0.71.48.3' --platform=x86_64-linux
Oh my god , don’t get me started on vagrant, this may be the straw that breaks my back and gets me to delete it from the repo
Precise is ending its life early next year we are just about to ship xenial to all our customers, our developers get precise which is 8 releases behind
Which is why we should never ship dev environments we do not actively use
@angus how did you get it to work? I tried changing config.vm.box = 'discourse/discourse-1.3.0' to config.vm.box = 'ubuntu/trusty64' and removing config.vm.box_url, but then ran into authentication problems on vagrant up.
The end result will be a fully functional discourse when the person first types vagrant up.
I’ll submit it as a PR when ready. I’ll upload the image to a public dropbox, though obviously it would be better if somebody from discourse uploaded it where the old image is.