Git Product home page Git Product logo

Comments (7)

nathanvda avatar nathanvda commented on June 27, 2024

Hi, I was able to compile locally, not sure how to proceed to include the binary or where to find the binary at all (see also #48).

from libv8.

averell23 avatar averell23 commented on June 27, 2024

We're having a similiar issue on centos 6.3. I was able to build the binary gem manually, but:

  • It seems that libv8_base.a depends on files that are outside of the gem

  • Here's the first few lines from nm libv8_base.a on my system

    /root/libv8/vendor/v8/out/x64.release/obj.target/v8_base/src/accessors.o:
    0000000000000000 r .LC0
    0000000000000015 r .LC1
    U GLOBAL_OFFSET_TABLE
    U _ZN2v88internal10JSFunction11CompileLazyENS0_6HandleIS1_EENS0_18ClearExceptionFlagE
    U _ZN2v88internal10JSFunction12SetPrototypeEPNS0_6ObjectE
    U _ZN2v88internal10JSReceiver12SetPrototypeEPNS0_6ObjectEb
    U _ZN2v88internal11HandleScope16DeleteExtensionsEPNS0_7IsolateE
    U _ZN2v88internal11HandleScope6ExtendEv
    U _ZN2v88internal11StoreBuffer7CompactEv

As you can see, it still knows about the accessors.o file in the build directory. As soon as I remove that, everything comes crashing down. The same seems to be the case with the 3.8.11 version I got from rubygems.

I didn't figure out how to make a completely self-contained binary build, so I'm now always compiling the thing on installation...

from libv8.

nathanvda avatar nathanvda commented on June 27, 2024

Ok, I was able to do a rake binary, which gave me a binary gem (libv8-3.11.8.3-x86_64-linux.gem). I then referred to this gem in my Gemfile as follows:

gem 'libv8', '3.11.8.3', :path => '../github/libv8/pkg'

And then building therubyracer gives me the following errors:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/nva/.rvm/rubies/ruby-1.9.3-p125/bin/ruby extconf.rb 
checking for main() in -lpthread... yes
checking for v8.h... yes
creating Makefile

make
compiling trycatch.cc
compiling invocation.cc
compiling exception.cc
compiling script.cc
compiling accessor.cc
compiling template.cc
compiling locker.cc
compiling constraints.cc
compiling external.cc
compiling v8.cc
v8.cc: In static member function ‘static VALUE rr::V8::IdleNotification(int, VALUE*, VALUE)’:
v8.cc:29:55: error: no matching function for call to ‘v8::V8::IdleNotification(int)’
v8.cc:29:55: note: candidate is:
/usr/include/v8.h:3198:15: note: static bool v8::V8::IdleNotification()
/usr/include/v8.h:3198:15: note:   candidate expects 0 arguments, 1 provided
v8.cc:33:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [v8.o] Error 1


Gem files will remain installed in /home/nva/.rvm/gems/ruby-1.9.3-p125@dpplus/gems/therubyracer-0.11.0beta8 for inspection.
Results logged to /home/nva/.rvm/gems/ruby-1.9.3-p125@dpplus/gems/therubyracer-0.11.0beta8/ext/v8/gem_make.out
An error occured while installing therubyracer (0.11.0beta8), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.11.0beta8'` succeeds before bundling.

Any ideas?

from libv8.

nathanvda avatar nathanvda commented on June 27, 2024

@averell23 I can see the same as you, but I am not entirely sure if that explains the error I am receiving. Frankly, while I have done loads of C/C++ development ages ago, I can't read or interpret the nm output :) Is it just defining the contained methods, with the original source object file, or is it declaring the interface to external methods?

from libv8.

cowboyd avatar cowboyd commented on June 27, 2024

It looks as though it is finding and using an old version of v8 which did not take a parameter to IdleNotification()

/usr/include/v8.h should not be used. Instead it should find the version of v8.h contained in the libv8 gem.

from libv8.

cowboyd avatar cowboyd commented on June 27, 2024

Note that this may very well be a bug in libv8 itself

from libv8.

nathanvda avatar nathanvda commented on June 27, 2024

Ok. I had two weeks holiday, and now my bundle installs perfectly fine. Not sure if that means therubyracer was fixed, or libv8 or something in ubuntu. Anyway: this issue is no longer relevant for me.

from libv8.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.