rubyjs / therubyracer

Embed the V8 Javascript Interpreter into Ruby
1.66k stars 191 forks source link

gem install therubyracer -v '0.12.1' fails on fedora 20. #329

Closed cchavez closed 9 years ago

cchavez commented 9 years ago

Hi all, I got the following error messages while install the gem:

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20150302-776-3bl26g.rb extconf.rb 

checking for main() in -lpthread... yes checking for v8.h... yes creating Makefile

make "DESTDIR=" clean

make "DESTDIR=" compiling gc.cc compiling object.cc compiling message.cc compiling context.cc In file included from context.cc:1:0: context.cc: In static member function ‘static VALUE rr::Context::SetEmbedderData(VALUE, VALUE, VALUE)’: context.cc:81:23: error: ‘class v8::Context’ has no member named ‘SetEmbedderData’ Void(Context(self)->SetEmbedderData(NUM2INT(index), Value(data))); ^ rr.h:33:20: note: in definition of macro ‘Void’

define Void(expr) expr; return Qnil;

                ^

context.cc: In static member function ‘static VALUE rr::Context::GetEmbedderData(VALUE, VALUE)’: context.cc:85:23: error: ‘class v8::Context’ has no member named ‘GetEmbedderData’ Void(Context(self)->GetEmbedderData(NUM2INT(index))); ^ rr.h:33:20: note: in definition of macro ‘Void’

define Void(expr) expr; return Qnil;

                ^

make: *\ [context.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/rvm/gems/ruby-2.1.5@fat_free_crm/gems/therubyracer-0.12.1 for inspection. Results logged to /usr/local/rvm/gems/ruby-2.1.5@fat_free_crm/extensions/x86-linux/2.1.0/therubyracer-0.12.1/gem_make.out An error occurred while installing therubyracer (0.12.1), and Bundler cannot continue. Make sure that gem install therubyracer -v '0.12.1' succeeds before bundling.

As I mentioned I'm on fedora 20.

In my bundle configuration I also tried: bundle config build.libv8 --with-system-v8

and gem install therubyracer -v '0.12.1' -- --with-system-v8

but it did not work.

I was able to install the v8 gems with the last trick, but therubyracer did not work.

cowboyd commented 9 years ago

In order to compile with the system v8, it must be from the 3.16.14 release series. Otherwise, it will not have the API on which The Ruby Racer depends.