building on mac os lion

187 views
Skip to first unread message

Johan Roxendal

unread,
Aug 28, 2011, 11:21:30 AM8/28/11
to py...@googlegroups.com
hey,

I've been having problems building pyv8 on mac os lion, so i figured i'd see if anyone's managed to get it right. 

i'm using python 2.6 and boost 1.47 through macports. v8 is built with arch=x64 and library=static. pyv8 is the latest from trunk.

the error i'm getting from pyv8 is along the lines of:

src/Locker.h:38: error: no matching function for call to ‘v8::Locker::IsLocked(NULL)’
/Users/johan/Development/v8/include/v8.h:2757: note: candidates are: static bool v8::Locker::IsLocked()

full output here: http://pastebin.com/jgfazVTA

any ideas?

thanks,
Johan Roxendal

Flier Lu

unread,
Aug 28, 2011, 11:25:24 AM8/28/11
to PyV8
It seems v8 changed its internal API, I will fix the build error soon.
Could you submit a issue to follow it? Thanks

http://code.google.com/p/pyv8/issues/list

Flier Lu

unread,
Aug 28, 2011, 11:36:40 AM8/28/11
to PyV8
I can't reproduce your issue at PyV8 trunk code r395 with V8 trunk
code r9030, what's your version?

Thanks

On Aug 28, 11:21 pm, Johan Roxendal <jo...@roxendal.com> wrote:

Johan Roxendal

unread,
Oct 20, 2011, 5:38:26 AM10/20/11
to PyV8
Hey,

I've tried getting pyv8 installed a few more times now, I no longer
get the error above on mac os lion. now, building and install succeeds
but when i try to import pyv8, i get:

>>> import PyV8
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap: 6

so that's with v8 rev 9653 and pyv8 rev 418. i use HomeBrew as my
package manager so i've changed the line in setup.py under the is_osx
section (line 234) and changed the include dir line to:

include_dirs += [
"/usr/local/Cellar/boost/1.47.0/include"
]

i haven't added anything to my env, though, should I?

thanks,
johan

Flier Lu

unread,
Oct 20, 2011, 9:42:41 AM10/20/11
to py...@googlegroups.com
Sorry for the trouble, since I haven't Mac OS X environment yet, so I can't reproduce your issue at now.

The good message is that I have buy a MacBook and it on the way, I think I could solve those Mac issues at next week :)

2011/10/20 Johan Roxendal <jo...@roxendal.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.


Johan Roxendal

unread,
Oct 20, 2011, 11:07:47 AM10/20/11
to PyV8
awesome, hope to hear from you then!

Flier Lu

unread,
Oct 31, 2011, 12:37:37 PM10/31/11
to py...@googlegroups.com
Please verify the HomeBrew support with PyV8 SVN trunk code after r422, thanks for your suggestion

2011/10/20 Johan Roxendal <jo...@roxendal.com>

Johan Roxendal

unread,
Oct 31, 2011, 5:07:11 PM10/31/11
to PyV8
I'm afraid it's still not working... I did the following:

svn update to 422
sudo python setup.py build
sudo python setup.py install

it all seems to be working, then when i try to import I still get:

>>> import PyV8

Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap: 6

does it work for you on the mac? i've tried it on three different
macs, all with the same result.

thanks for the help,
Johan

Flier Lu

unread,
Oct 31, 2011, 9:41:38 PM10/31/11
to py...@googlegroups.com
It seems you build with a boost which linked to different Python version, please verify it and ensure you only have one boost installed with HomeBrew.

flier@~$ whereis python
/usr/bin/python

flier@~$ python -V
Python 2.7.2

flier@~$ brew info boost
boost 1.47.0
/usr/local/Cellar/boost/1.47.0 (8615 files, 306M)

flier@~$ otool -L /usr/local/lib/libboost_python-mt.dylib 
/usr/local/lib/libboost_python-mt.dylib:
/usr/local/lib/libboost_python-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/System/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.1)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.0.0)


2011/11/1 Johan Roxendal <jo...@roxendal.com>

Johan Roxendal

unread,
Nov 1, 2011, 3:29:42 PM11/1/11
to PyV8
ah, I see. it seems to work using the os python interpreter, so in
order to get it working using the homebrew one I gather I have to use
install_name_tool -change? could you tell me how? i've tried with a
few different combinations, but I see no change when inspecting with
otool.

thanks,
Johan

On Nov 1, 2:41 am, Flier Lu <flier...@gmail.com> wrote:
> It seems you build with a boost which linked to different Python version,
> please verify it and ensure you only have one boost installed with HomeBrew.
>
> flier@~$ whereis python
> /usr/bin/python
>
> flier@~$ python -V
> Python 2.7.2
>
> flier@~$ brew info boost
> boost 1.47.0http://www.boost.org
> /usr/local/Cellar/boost/1.47.0 (8615 files, 306M)http://github.com/mxcl/homebrew/commits/master/Library/Formula/boost.rb

Flier Lu

unread,
Nov 2, 2011, 12:37:49 PM11/2/11
to py...@googlegroups.com
sorry, I'm not  familiar with HomeBrew, but the key is use the Python version which you build the boost library, because both HomeBrew or MacPort will build its boost when you install it, so, please use the right Python with your boost.

2011/11/2 Johan Roxendal <jo...@roxendal.com>

Johan Roxendal

unread,
Nov 2, 2011, 7:51:39 PM11/2/11
to PyV8
Ok, that's cool, i'm really glad it's working now, thanks for the
help!

/ Johan

Flier Lu

unread,
Nov 2, 2011, 9:49:34 PM11/2/11
to py...@googlegroups.com
You are welcome :)

2011/11/3 Johan Roxendal <jo...@roxendal.com>
Reply all
Reply to author
Forward
0 new messages