Closed GoogleCodeExporter closed 9 years ago
This is failing in the include of Python.h in the kernel headers, there's
pretty much nothing I can do from my end
to fix it. My suggestion is to try installing Python 2.5.2 from MacPorts
(because it gives you the framework
version) and use that.
The code is being developed on MacOS 10.5.4 and Python 2.5.2. I know Apple does
some funky things with the
system python install, and this may not be helping matters. If using your own
2.5.2 doesn't work, I can try
making a binary,
Original comment by casey.du...@gmail.com
on 14 Aug 2008 at 2:10
That's strange, because I'm using a framework build of python2.5 (the standard
one on
python.org). I don't think a binary version will help, because it will probably
be
linked off the wrong version of python (unless c modules are small version
compatible).
Original comment by naveen.m...@gmail.com
on 14 Aug 2008 at 2:28
I just tried building it from scratch against the system 2.5.1, and that worked
fine, though since you're using the
framework build, that's not very representable. I'll try it against the
official framework build and see if I can
reproduce this.
Original comment by casey.du...@gmail.com
on 14 Aug 2008 at 2:55
With the binary 2.5.2 build from python.org I got a different, but seemingly
related error:
running build_ext
building 'lepton.group' extension
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -Wno-long-
double -no-cpp-precomp -mno-fused-madd -fno-common -dynamic -DNDEBUG -g -O3 -
I/System/Library/Frameworks/OpenGL.framework/Headers -
I/System/Library/Frameworks/GLUT.framework/Headers -
I/System/Library/Frameworks/Kernel.framework/Headers -
I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -c
lepton/group.c -o
build/temp.macosx-10.3-i386-2.5/lepton/group.o
In file included from
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:239
,
from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57,
from lepton/vector.h:9,
from lepton/group.h:6,
from lepton/group.c:18:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/time.h:89: error: redefinition of
'struct timespec'
In file included from
/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/pyport.h:239
,
from /Library/Frameworks/Python.framework/Versions/2.5/include/python2.5/Python.h:57,
from lepton/vector.h:9,
from lepton/group.h:6,
from lepton/group.c:18:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/time.h:89: error: redefinition of
'struct timespec'
lipo: can't figure out the architecture type of:
/var/folders/w6/w6-PROQDG7WeKqkAmIvUf++++aI/-Tmp-
//ccgdCNhc.out
error: command 'gcc' failed with exit status 1
I tried futzing with py_config.h to no avail, I'll keep trying
Original comment by casey.du...@gmail.com
on 14 Aug 2008 at 3:42
I managed to build it, but i had to compile each file by hand. I had another
python c
module that i've written, and so i just cut and pasted the initial portion of
the gcc
command and replaced the c and o files from the output of the failed gcc
command (and
then called python2.5 setup.py build to try to compile the next file, until
they were
all compiled and then it linked). This is the gcc line that worked for me (of
course,
some headers are unnecessary):
gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
-fno-common
-dynamic -DNDEBUG -g -O3
-I/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/
numpy-1.1.0-py2.5-macosx-10.3-fat.egg/numpy/core/include
-I/System/Library/Frameworks/vecLib.framework/Versions/A/Headers
-I/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
Original comment by naveen.m...@gmail.com
on 14 Aug 2008 at 4:02
After some more digging, I identified the source of the problem. My setup.py
was including kernel headers
that it shouldn't have. This didn't effect my source builds of python or the
apple builds, but it did cause it to
fail with the binary from python.org.
The following diff was applied to setup.py, google code appears to be having
issues right now, so I can't
check it in, but I will once it clears up. Please apply the patch and see if it
helps.
Index: setup.py
===================================================================
--- setup.py (revision 49)
+++ setup.py (working copy)
@@ -23,8 +23,7 @@
libraries = ['opengl32']
elif sys.platform == 'darwin':
include_dirs = ['/System/Library/Frameworks/OpenGL.framework/Headers',
- '/System/Library/Frameworks/GLUT.framework/Headers',
- '/System/Library/Frameworks/Kernel.framework/Headers']
+ '/System/Library/Frameworks/GLUT.framework/Headers']
library_dirs = []
libraries = []
extra_link_args = ['-framework:OpenGL']
Original comment by casey.du...@gmail.com
on 14 Aug 2008 at 4:10
Yep, deleting that line did the trick. Thanks for the quick response.
Original comment by naveen.m...@gmail.com
on 14 Aug 2008 at 4:17
The change is now in r59, thanks for the report!
Original comment by casey.du...@gmail.com
on 14 Aug 2008 at 4:22
Original issue reported on code.google.com by
naveen.m...@gmail.com
on 13 Aug 2008 at 9:20