Coder Social home page Coder Social logo

v8js compile errors about v8js HOT 4 CLOSED

phpv8 avatar phpv8 commented on August 21, 2024
v8js compile errors

from v8js.

Comments (4)

rbro avatar rbro commented on August 21, 2024

I tried a few different v8 versions and I was able to get v8js to compile with version 3.19.18.4, but I had to compile v8js with -D_GLIBCXX_USE_NANOSLEEP. Is there a certain version of v8 that should be used with v8js?

from v8js.

stesie avatar stesie commented on August 21, 2024

@rbro when using recent v8 versions together with v8js you need to compile with -DV8_USE_UNSAFE_HANDLES=1 as shown in the README file. Your compiler output above obviously is missing this directive. See issue #19 for details.

Compiling with -D_GLIBCXX_USE_NANOSLEEP is a work around for broken libstdc++ installations. See here for details: http://stackoverflow.com/questions/12523122/what-is-glibcxx-use-nanosleep-all-about

from v8js.

rbro avatar rbro commented on August 21, 2024

Thank you for your help. I was compiling with -DV8_USE_UNSAFE_HANDLES=1, but I think the issue is that I was compiling against the latest trunk of v8. When I used version 3.21.11 as you mentioned in issue #40, it worked.

Regarding -D_GLIBCXX_USE_NANOSLEEP, I think I needed to do that because of my g++ version. I am running CentOS 6.4 which has g++ version 4.4.7. I was though able to get v8js and v8 to compile under that version with the following workarounds:

  1. compile v8 with:

make native library=shared -j8 werror=no

Without the werror=no, I was getting an error:

../src/splay-tree-inl.h: In member function "virtual void v8::internal::AstTyper::VisitVariableProxy(v8::internal::VariableProxy*)":
../src/splay-tree-inl.h:236: error: "dummy_node" may be used uninitialized in this function
../src/splay-tree-inl.h:236: note: "dummy_node" was declared here

  1. In the v8js Makefile:
  • changed all references to -std=c++11 to be -std=c++0x
  • added -D_GLIBCXX_USE_NANOSLEEP to the compile line for v8js.lo

I'm not sure what side effects this may cause, but I was able to compile it and it runs under PHP 5.5.4.

from v8js.

yllierop avatar yllierop commented on August 21, 2024

This issue appears to be resolved now.

from v8js.

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.