build on OSX error

18 views
Skip to first unread message

khinester

unread,
Dec 22, 2010, 11:21:22 AM12/22/10
to PyV8
Hello,
I am trying to setup PyV8 on my OSX 10.6.4

Boost is installed through DarwinPorts

$ port installed |grep boost
boost @1.42.0_0
boost @1.44.0_0
boost @1.44.0_0+python26
boost @1.45.0_1+python26 (active)
boost-jam @3.1.17_0
boost-jam @3.1.18_0 (active)

I have installed V8 as follows:

$ cd Sandboxes/v8-read-only/
$ svn update
U test/es5conform/es5conform.status
...

U benchmarks/base.js
U .
Updated to revision 6113.

$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...

...

$ scons sample=shell
...

$ vim ~/.profile

# Set V8_HOME
export V8_HOME=$HOME/Sandboxes/v8-read-only

# Set BOOST_HOME
export BOOST_HOME=/opt/local/include/boost

$ ~/Sandboxes/pyv8-read-only

$ svn update
At revision 315.

$ sudo /opt/local/bin/python setup.py install
running install
running build
running build_py
running build_ext
building '_PyV8' extension
/usr/bin/gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -O2 -
DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch x86_64 -
DBOOST_PYTHON_STATIC_LIB -DV8_NATIVE_REGEXP -DENABLE_DISASSEMBLER -
DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -
DV8_TARGET_ARCH_X64 -I/Users/khinester/Sandboxes/v8-read-only/include -
I/Users/khinester/Sandboxes/v8-read-only -I/Users/khinester/Sandboxes/
v8-read-only/src -I/opt/local/include -I/opt/local/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6 -c src/Exception.cpp -
o build/temp.macosx-10.6-x86_64-2.6/src/Exception.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid
for C/ObjC but not for C++
src/Exception.cpp:13:26: error: linux/string.h: No such file or
directory
src/Exception.cpp: In member function ‘void
CJavascriptStackTrace::Dump(std::ostream&) const’:
src/Exception.cpp:154: warning: comparison between signed and unsigned
integer expressions
src/Exception.cpp: In static member function ‘static void
CJavascriptException::ThrowIf(v8::TryCatch&)’:
src/Exception.cpp:370: warning: comparison between signed and unsigned
integer expressions
src/Exception.cpp: In static member function ‘static void
ExceptionTranslator::Construct(PyObject*,
boost::python::converter::rvalue_from_python_stage1_data*)’:
src/Exception.cpp:456: warning: unused variable ‘cpp_err’
error: command '/usr/bin/gcc-4.2' failed with exit status 1

what am i missing?

thanks



mcot

unread,
Dec 22, 2010, 1:37:30 PM12/22/10
to PyV8
Looks like you need to build v8 with RTTI.

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

See the section: Runtime Type Information and C++ Exception in v8 3.0

khinester

unread,
Dec 22, 2010, 6:10:04 PM12/22/10
to PyV8


On Dec 22, 7:37 pm, mcot <atm1...@gmail.com> wrote:
> Looks like you need to build v8 with RTTI.
>
> http://code.google.com/p/pyv8/wiki/HowToBuild
>
> See the section: Runtime Type Information and C++ Exception in v8 3.0

i did this, re-run scons on v8, but still the same error.

Flier Lu

unread,
Dec 22, 2010, 9:31:02 PM12/22/10
to PyV8
Sorry, it caused by a missing header file, I use strcasecmp to compare
two strings, but it doesn't exist in the MAC OSX.

src/Exception.cpp:13:26: error: linux/string.h: No such file or
directory

Please update your pyv8 to the latest SVN trunk and try again :)

btw: please compile v8 as x64 mode in the MAC OSX

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

khinester

unread,
Dec 23, 2010, 4:09:37 AM12/23/10
to PyV8
thanks, this now works.
Reply all
Reply to author
Forward
0 new messages