marylinh / pyv8

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

Runtime failure of PyV8 v0.8 with v8 trunk@r3837 #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am trying to use PyV8 on Linux and Mac OS X. The build is ok but the 
following error occurs (on both platforms) while importing PyV8 in python.

$ python
Python 2.6.1 (r261:67515, Jul  7 2009, 23:51:51) 
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import PyV8
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "PyV8.py", line 8, in <module>
    import _PyV8
ImportError: dlopen(./_PyV8.so, 2): Symbol not found: 
__ZN2v819RegisteredExtension16first_extension_E
  Referenced from: ...pyv8-read-only/build/lib.macosx-10.6-universal-2.6/_PyV8.so
  Expected in: flat namespace
 in ...pyv8-read-only/build/lib.macosx-10.6-universal-2.6/_PyV8.so

Both platforms show similar error messages:
Ubuntu 9.10 32 bits
Mac OS X 10.6.2 (with 64 bits Python) 

Original issue reported on code.google.com by edwincheese on 12 Feb 2010 at 9:51

GoogleCodeExporter commented 9 years ago
Did you compile and link v8 and pyv8 with x64 mode? It seems the symbol of 
RegisteredExtension::first_extension doesn't exists in the libv8.a?

http://code.google.com/p/pyv8/wiki/HowToBuild

On the other hand, could you try build the PyV8 from SVN trunk, because I 
remember the developing version has fixed some Mac OS X issues.

Thanks

Original comment by flier...@gmail.com on 12 Feb 2010 at 1:47

GoogleCodeExporter commented 9 years ago
Thank you. I have compiled both v8 and pyv8 in 64 bits (and set the apple 
specific -arch x86_64 gcc 
flag). I read the symbols in the libv8.dylib using nm and it has the missing 
symbol. I have tried the pyv8 
trunk too, but the build fails in related to AST.

In addition, I have tried it on a PC running ubuntu and the same error 
occurred.   

Original comment by edwincheese on 13 Feb 2010 at 1:06

GoogleCodeExporter commented 9 years ago
I'm sorry, I can't reproduce your issue at this time, because I'm on vacation 
in two 
weeks, so I haven't x64 environment :S

Could you try to link v8 as static library?

Original comment by flier...@gmail.com on 13 Feb 2010 at 1:15

GoogleCodeExporter commented 9 years ago
It seems be a link issue, pyv8 suggest to static link with v8 library.

Original comment by flier...@gmail.com on 9 Apr 2010 at 9:59