Compiling with recent V8?

55 views
Skip to first unread message

alvaro...@gmail.com

unread,
Jun 29, 2013, 12:34:22 PM6/29/13
to te...@googlegroups.com
Hi

I'm trying to compile TeaJS with an up-to-date version of V8. I didn't know a specific version was needed.

It seems there have been API changes that make TeaJS source incompatible. One repeating error relates to the GetPointerFromInternalField() and SetPointerInInternalField() functions which were deprecated and then removed.

Here is a discussion about how to replace them:

https://groups.google.com/forum/#!topic/v8-users/aaSY-02HWzA

For 2-byte-aligned pointers there is GetAlignedPointerFromInternalField, but for the general case it's a bit more tricky.

And there are many other errors for API changes: cannot access private member in v8::Persistent and v8::Handle, etc.

Do you plan to update the code to more a recent V8?

Have you tried to compile with Visual Studio 2010?
Message has been deleted

Ondřej Žára

unread,
Jul 1, 2013, 2:39:42 AM7/1/13
to te...@googlegroups.com
Hi Alvaro,

I am aware of the recent changes in V8 API. From time to time, I try to update TeaJS's source accordingly; this work is typically done in the "isolates" branch. Please try switching to that branch before compiling against the most recent V8. However, the current code in the "isolates" branch is about 2 months old, so might not reflect some of the more recent changes (the Get/SetPointerInInternalField is implemented). I will try to fix that.

Generally, I try to maintain TeaJS against the libv8-dev commonly found in OS packages today (Debian, Ubuntu). I am not sure what is the correct way to handle such dramatic (and backwards-incompatible!) API changes. Moreover, I have heard that even more changes of this type are coming to V8.

Finally: TeaJS is compiled using MinGW on Windows. I have no idea if and how the compilation with VS works; I had to switch to MinGW in order to support some third-party software TeaJS interfaces with (such as the Apache web server, PostgreSQL etc.).

Feel free to contact me if you encounter any other issues!


Sincerely,
Ondrej Zara



2013/6/29 <alvaro...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "TeaJS (formerly v8cgi)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to teajs+un...@googlegroups.com.
To post to this group, send email to te...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/teajs/bd5f3374-e747-48e6-9f0e-9e015ac8c39e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
+------------------+
|tn=b.             |
|p==n              |
|+j1               |
|=+                |
|1          #  ##  |
|           # #    |
|           #  ##  |
|        #  #    # |
|         ##   ##  |
+------------------+
 jsstyle.github.com

niknah

unread,
Jul 7, 2013, 2:28:03 AM7/7/13
to te...@googlegroups.com
To fix the "private member in ..." compiling problems.  Add this before any #include <v8.h>

#define V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR 1
#include <v8.h>

...and you have to remove the private: line in v8.h:769    It's maybe a mistake by the v8 devs.


I am using Ubuntu 13.04, v8-3.8.9.20 and the isolates branch.  It doesn't compile, first error is...
src/lib/binary/binary.cc:309:19: error: no matching function for call to 'v8::Persistent<v8::FunctionTemplate>::New(v8::Isolate*, v8::Local<v8::FunctionTemplate>)

Ondřej Žára

unread,
Jul 7, 2013, 11:14:53 AM7/7/13
to te...@googlegroups.com
Yeah, I spent some time discussing these changes with V8 devs. It looks like basically every TeaJS function must get rewritten - because they changed the way values are returned from C++ to SJ. This will take a lot of time; I will do that once those API changes are stable and final. The same applies to Persistent handles, which are completely refactored as well.

O.


2013/7/7 niknah <nik...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "TeaJS (formerly v8cgi)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to teajs+un...@googlegroups.com.
To post to this group, send email to te...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages