compiling on snow leopard

55 views
Skip to first unread message

John

unread,
Nov 5, 2009, 2:58:41 AM11/5/09
to PyV8
after beating up my setup.py all afternoon, i finally got PyV8 to
compile on snow leopard.

I installed boost libraries in /opt/boost/lib, and copied libv8.dylib
to /usr/lib

when I run python, I have to set the DYLIB_LIBRARY_PATH environment
variable in order for the boost libraries to be found, so this is what
I have:

> DYLD_LIBRARY_PATH=/opt/boost/lib python
> Python 2.6.1
>>>> import PyV8
>Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "PyV8.py", line 8, in <module>
> import _PyV8
>ImportError: dlopen(/Library/Python/2.6/site-packages/_PyV8.so, 2): Symbol not found: __ZN2v88internal9Internals13kJSObjectTypeE
> Referenced from: /Library/Python/2.6/site-packages/_PyV8.so
> Expected in: flat namespace
> in /Library/Python/2.6/site-packages/_PyV8.so
>>>

i'm not sure what is causing it. Does anyone have any ideas?

Flier Lu

unread,
Nov 7, 2009, 11:05:23 PM11/7/09
to PyV8
It seems that you linked wrong v8 library, because
__ZN2v88internal9Internals13kJSObjectTypeE is a symbol for
v8::internal::internals::kJSObjectType.

I can't reproduce your issue, because I working on windows and linux
platform, but I think you should try to use static link and ensure
your library is OK

vm-debian-x64:~/pyv8/build/lib.linux-x86_64-2.5$ ldd _PyV8.so
linux-vdso.so.1 => (0x00007fffc78e6000)
libboost_python-py25.so.1.35.0 => /usr/lib/libboost_python-
py25.so.1.35.0 (0x00007ff0d3900000)
librt.so.1 => /lib/librt.so.1 (0x00007ff0d36f7000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007ff0d33ea000)
libm.so.6 => /lib/libm.so.6 (0x00007ff0d3167000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007ff0d2f50000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00007ff0d2d33000)
libc.so.6 => /lib/libc.so.6 (0x00007ff0d29e0000)
libutil.so.1 => /lib/libutil.so.1 (0x00007ff0d27dd000)
libdl.so.2 => /lib/libdl.so.2 (0x00007ff0d25d8000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff0d3ff5000)

James Casbon

unread,
Nov 28, 2009, 9:57:04 AM11/28/09
to PyV8
I had a similar problem on leopard. I turned out libboost_python was
linked to system python rather than my install.
You need to use "otool -L library" to find out what is linked, and
"install_name_tool -change" to fix.

Flier Lu

unread,
Nov 28, 2009, 10:07:27 AM11/28/09
to PyV8
Thanks for your advises

Could you do me a favor to write some comments and update the wiki
page about how to compile it on leopard?

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

James Casbon

unread,
Nov 28, 2009, 10:10:37 AM11/28/09
to py...@googlegroups.com
Don't think I have permission.

2009/11/28 Flier Lu <flie...@gmail.com>:
> --
>
> You received this message because you are subscribed to the Google Groups "PyV8" group.
> To post to this group, send email to py...@googlegroups.com.
> To unsubscribe from this group, send email to pyv8+uns...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyv8?hl=en.
>
>
>

Jeff Lindsay

unread,
Dec 6, 2009, 7:24:06 AM12/6/09
to PyV8
FYI, I was getting this as well. Like Flier suggested, doing a static
compilation of v8 got it working (also as arch=x64)
Reply all
Reply to author
Forward
0 new messages