sony / v8eval

Multi-language bindings to JavaScript engine V8
MIT License
403 stars 37 forks source link

[ruby] require 'v8eval' raises LoadError; native extension build error #9

Closed ktimothy closed 8 years ago

ktimothy commented 8 years ago

code:

require 'v8eval'

exception:

/home/vagrant/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- v8eval/v8eval (LoadError)
    from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/v8eval-0.2.1/ruby/lib/v8eval.rb:2:in `<top (required)>'
    from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
    from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
    from /home/vagrant/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
ktimothy commented 8 years ago

Oh, I look like something was wrong with the installation. Now I get an error:

compiling v8eval_wrap.cxx
cc1plus: error: unrecognized command line option '-std=c++11'
make: *** [v8eval_wrap.o] Error 1

make failed, exit code 2

I guess I have wrong version of g++ or something else... Any ideas?

ktimothy commented 8 years ago

I have solved the problem: I had g++ compiler 4.6 while v8 (or swig or whatever else) needed 4.8 to build.

I think it is good to add to README that g++ 4.8 is needed.

YoshiyukiMineo commented 8 years ago

Hi

What is your platform?

v8eval supports Mac and Linux. v8eval/build.sh uses clang that is the default compiler in Mac or uses clang that is fetched together with V8 in Linux.

See https://github.com/sony/v8eval/blob/master/build.sh#L5-L20

ktimothy commented 8 years ago

Hi, I use Ubuntu 12.04.5 LTS.

YoshiyukiMineo commented 8 years ago

I think v8eval don't set the compiler correctly in 'gem install'. We will fix the bug.

YoshiyukiMineo commented 8 years ago

We have fixed this issue. Thank you for your feedback.