code-google-com / pyv8

Automatically exported from code.google.com/p/pyv8
0 stars 0 forks source link

Compilation error: error: no matching function for call to ‘v8::Persistent<v8::StackTrace>::New(v8::Isolate*, v8::Handle<v8::StackTrace>&)’ #180

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. pip install pyv8
2. Curse at errors
3. Download r521 (svn checkout http://pyv8.googlecode.com/svn/trunk/ -r 521 .)
4. python setup.py build
5. Additional cursing at the same errors

What is the expected output? What do you see instead?
Expect successful installation. Instead see a bunch of compilation errors.

What version of the product are you using? On what operating system?
Fedora 18 / 3.9.4-200.fc18.i686

Please provide any additional information below.
This looks like the same error reported as fixed in Issue 175:
https://code.google.com/p/pyv8/issues/detail?id=175
but the fix (update to post-r519) doesn't seem to be working.

Original issue reported on code.google.com by mariogiov on 16 Jun 2013 at 8:32

Attachments:

GoogleCodeExporter commented 9 years ago
Confirmed on Debian Squeeze (mixed with Debian Wheezy).
pip version: pip 1.1 from /usr/lib/python3/dist-packages (python 3.2)
python version: Python 3.2.4

I've tried it first by manually checking out and building, same errors.

Original comment by joren...@gmail.com on 28 Jun 2013 at 9:29

Attachments:

GoogleCodeExporter commented 9 years ago
Alright, adding #define V8_USE_UNSAFE_HANDLES back to v8.h at line 222-223 
after TYPE_CHECK (or anywhere before that is good too, but that's where it was).

v8.h is at include/v8.h in the v8 source tree. This is only a workaround and it 
should be fixed by not using the unsafe handles. See v8 mailing list:
https://groups.google.com/forum/#!topic/v8-users/6kSAbnUb-rQ
https://groups.google.com/forum/#!topic/v8-users/oBE_DTpRC08

You will have to build everything manually though and run 'python setup.py 
install' after building V8 (and boost off course).

Unfortunately I've got new errors (full log attached):
In file included from src/Engine.cpp:12:0:
src/AST.h: In member function ‘void 
CAstBlock::AddStatement(CAstStatement&)’:
src/AST.h:218:127: error: ‘class v8::internal::Isolate’ has no member named 
‘runtime_zone’
src/Engine.cpp: In member function ‘void 
CScript::visit(boost::python::api::object, v8::internal::LanguageMode) const’:
src/Engine.cpp:508:3: error: ‘ZoneScope’ is not a member of ‘v8i’
src/Engine.cpp:508:18: error: expected ‘;’ before ‘zone_scope’

Original comment by joren...@gmail.com on 29 Jun 2013 at 8:32

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed the scope errors looking at the changes to deoptimizer.cc, which used 
runtime_zone en zone_scope. See: 
https://code.google.com/p/v8/source/diff?spec=svn15386&r=15386&format=side&path=
/trunk/src/deoptimizer.cc&old_path=/trunk/src/deoptimizer.cc&old=15215

Patch is included, but someone should a look at it as I don't have a complete 
understanding of the code.

Yippy, more errors (full log attached):
src/PrettyPrinter.cpp: In member function ‘virtual void 
v8::internal::PrettyPrinter::VisitLiteral(v8::internal::Literal*)’:
src/PrettyPrinter.cpp:312:22: error: ‘class v8::internal::Literal’ has no 
member named ‘handle’
src/PrettyPrinter.cpp: In member function ‘virtual void 
v8::internal::PrettyPrinter::VisitProperty(v8::internal::Property*)’:
src/PrettyPrinter.cpp:376:35: error: ‘class v8::internal::Literal’ has no 
member named ‘handle’
src/PrettyPrinter.cpp:380:27: error: ‘class v8::internal::Literal’ has no 
member named ‘handle’
src/PrettyPrinter.cpp: In member function ‘virtual void 
v8::internal::AstPrinter::VisitLiteral(v8::internal::Literal*)’:
src/PrettyPrinter.cpp:994:41: error: ‘class v8::internal::Literal’ has no 
member named ‘handle’
src/PrettyPrinter.cpp: In member function ‘virtual void 
v8::internal::AstPrinter::VisitProperty(v8::internal::Property*)’:
src/PrettyPrinter.cpp:1100:35: error: ‘class v8::internal::Literal’ has no 
member named ‘handle’
src/PrettyPrinter.cpp:1101:43: error: ‘class v8::internal::Literal’ has no 
member named ‘handle’
src/PrettyPrinter.cpp: In member function ‘virtual void 
v8::internal::JsonAstBuilder::VisitLiteral(v8::internal::Literal*)’:
src/PrettyPrinter.cpp:1438:35: error: ‘class v8::internal::Literal’ has no 
member named ‘handle’

Original comment by joren...@gmail.com on 29 Jun 2013 at 11:29

Attachments:

GoogleCodeExporter commented 9 years ago
Ok, that was simple refactoring from handle() to value() (see attached patch).

Now, all rests a linking error:
g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro 
build/temp.linux-x86_64-3.2/src/Utils.o 
build/temp.linux-x86_64-3.2/src/Exception.o 
build/temp.linux-x86_64-3.2/src/Context.o 
build/temp.linux-x86_64-3.2/src/Engine.o 
build/temp.linux-x86_64-3.2/src/Wrapper.o 
build/temp.linux-x86_64-3.2/src/Debug.o 
build/temp.linux-x86_64-3.2/src/Locker.o build/temp.linux-x86_64-3.2/src/AST.o 
build/temp.linux-x86_64-3.2/src/PrettyPrinter.o 
build/temp.linux-x86_64-3.2/src/PyV8.o 
-L/home/joren/Documents/googleplusapp/third_party/boost_1_53_0/stage/lib 
-L/home/joren/Documents/googleplusapp/third_party/v8/out/x64.release/obj.target/
tools/gyp/ -lrt -lboost_python -lboost_thread -lboost_system -lv8_base.x64 
-lv8_snapshot -o build/lib.linux-x86_64-3.2/_PyV8.cpython-32mu.so -fPIC
/usr/bin/ld: cannot find -lv8_base.x64
/usr/bin/ld: cannot find -lv8_snapshot
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

I, however, think that's an issue on my side, I'll create a new issue if it 
turns out it isn't.

Original comment by joren...@gmail.com on 30 Jun 2013 at 12:15

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks, PyV8 has ported to the latest V8 API

Original comment by flier...@gmail.com on 10 Jul 2013 at 6:31