Closed GoogleCodeExporter closed 9 years ago
Original comment by flier...@gmail.com
on 3 May 2010 at 11:29
I've having the same problem. Any advice would be great.
daniel-yaminss-macbook-pro:pyv8-read-only dyamins$ python setup.py install
running install
running build
running build_py
creating build
creating build/lib.macosx-10.5-intel-2.6
copying PyV8.py -> build/lib.macosx-10.5-intel-2.6
running build_ext
building '_PyV8' extension
creating build/temp.macosx-10.5-intel-2.6
creating build/temp.macosx-10.5-intel-2.6/src
/usr/bin/gcc-4.0 -arch i386 -arch x86_64 -isysroot / -fno-strict-aliasing
-fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
-DBOOST_PYTHON_STATIC_LIB -DV8_NATIVE_REGEXP -DENABLE_DISASSEMBLER
-DENABLE_LOGGING_AND_PROFILING -DENABLE_DEBUGGER_SUPPORT -DV8_TARGET_ARCH_IA32
-I/Users/dyamins/v8/include -I/Users/dyamins/v8 -I/Users/dyamins/v8/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.5-intel-2.6/src/Exception.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC
but not for C++cc1plus: warning: command line option "-Wstrict-prototypes" is
valid for C/ObjC but not for C++
In file included from /Users/dyamins/v8/src/v8.h:56,
from src/Exception.cpp:15:
/Users/dyamins/v8/src/globals.h:82:2: error: #error Target architecture ia32 is
only supported on ia32 host
src/Exception.cpp: In static member function ‘static void
ExceptionTranslator::Construct(PyObject*,
boost::python::converter::rvalue_from_python_stage1_data*)’:
src/Exception.cpp:262: warning: unused variable ‘cpp_err’
src/Exception.cpp: In static member function ‘static void
ExceptionTranslator::Construct(PyObject*,
boost::python::converter::rvalue_from_python_stage1_data*)’:
src/Exception.cpp:262: warning: unused variable ‘cpp_err’
lipo: can't figure out the architecture type of:
/var/folders/bg/bgz2csGfGV8iJu5gTN+tdU+++TI/-Tmp-//ccpbLMZP.out
error: command '/usr/bin/gcc-4.0' failed with exit status 1
Original comment by dyam...@gmail.com
on 15 Jun 2010 at 2:39
Sorry, I haven't MAC OS X environment, But I think I could try to find one and
fix it, thanks
Original comment by flier...@gmail.com
on 15 Jun 2010 at 2:47
But do you have any sense of why it's happening? Normally I get such errors
when some library wasn't compiled 64-bit.
Btw, I'm using OSX 10.5, Leopard (not Snow Leopard 10.6)
Original comment by dyam...@gmail.com
on 15 Jun 2010 at 3:46
Did you build v8 with x64 mode? Google v8 support ia32, x64 and mips
architecture.
export CCFLAGS=-fPIC
scons arch=x64
I found the following error in your log
/Users/dyamins/v8/src/globals.h:82:2: error: #error Target architecture ia32 is
only supported on ia32 host
Original comment by flier...@gmail.com
on 15 Jun 2010 at 3:52
Hi dyamins,
How about your build? Was it caused by the x64 mode?
Original comment by flier...@gmail.com
on 17 Jun 2010 at 11:18
Yes, I did use those flags when I built v8.
When I built it in regular mode, the resulting binary (e.g. libv8.a) was
broken, due to some 64-bit architecture issue. However, when I built it in
debug mode ("scons arch=x64 debug=true"), the resulting binary (libv8_g.a)
works fine -- independently of pyv8. I wrote to the v8 list but did not get a
satisfactory answer.
I then deleted the original binary, and tried to rebuild pyv8, hoping the new
binary file would work, but it didnt -- I got the same problem.
Original comment by dyam...@gmail.com
on 25 Jun 2010 at 2:55
Could you check the following document? Chrome also need V8 on Mac OS X
http://code.google.com/p/chromium/wiki/MacBuildInstructions
I think I must find a OS X to reproduce it :S
Original comment by flier...@gmail.com
on 25 Jun 2010 at 3:01
I had a look at that link, but I'm not sure what you wanted me to do with it :)
Yeah, I think you're probably right, you'll probably have to just try it
yourself ... thanks for the help tho! (I have it working on my ubuntu box, no
problem, so ...)
Original comment by dyam...@gmail.com
on 25 Jun 2010 at 4:18
This appears to be because Apple's GCC supports multiple -arch targets on one
invocation. python-config --cflags returns:
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6
-fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall
-Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64
Note that all three Mac architectures are present.
These flags confuse V8's architecture detection when passed
-DV8_TARGET_ARCH_X64 as gcc first compiles in i386 mode, then ppc, then x86_64.
I don't know what the solution is.
Original comment by alecatho...@gmail.com
on 25 Jul 2010 at 8:46
I've found a solution.
export ARCHFLAGS='-arch x86_64' # (or whatever arch you want)
This will force compilation for a specific architecture. setup.py still needs
some minor hacking to buid cleanly.
Original comment by alecatho...@gmail.com
on 22 Aug 2010 at 4:44
That's sounds great, could you contribute a patch to the setup.py and
HowToBuild wiki?
Thanks
Original comment by flier...@gmail.com
on 22 Aug 2010 at 4:48
I will, definitely.
What revisions of V8 and PyV8 will currently work together? I can't build
either PyV8 0.9 or head against current V8 head.
Original comment by alecatho...@gmail.com
on 23 Aug 2010 at 12:16
It caused by v8 which changed the method signature of IndexedPropertyQuery
from
typedef Handle<Boolean> (*IndexedPropertyQuery)(uint32_t index,
const AccessorInfo& info);
to
typedef Handle<Integer> (*IndexedPropertyQuery)(uint32_t index,
const AccessorInfo& info);
Please try to use PyV8 from SVN trunk after r272
http://code.google.com/p/pyv8/source/detail?r=272
Original comment by flier...@gmail.com
on 23 Aug 2010 at 1:35
Okay, it's all working! I've attached the patch to
http://code.google.com/p/pyv8/issues/detail?id=57
Original comment by alecatho...@gmail.com
on 23 Aug 2010 at 2:54
Alec has submitted a patch for Snow Leopard in issues #57, just merge those
issues
Original comment by flier...@gmail.com
on 9 Sep 2010 at 6:12
Original issue reported on code.google.com by
overbom...@gmail.com
on 2 May 2010 at 4:01