#142 Build failure on Mac, gcc-4.0

build (28)

I haven't been able to get a build of PyOpenGL to work on Macintosh
(10.4) for some time. I can build_w OK, but during build_ext I get lots
of errors of the form:

from src/interface/GL.3DFX._multisample.c:6:
225: error: field 'st_atimespec' has incomplete type

This is for version, using python 2.4.2, on Mac OSX 10.4.5
with the gcc-4.0 provided by Xcode/Developer tools 2.2.1

I initially tried this on a MacBook pro (Intel), but have since seen the
same errors on a powerpc based Mac. I've also seen them in version, and the cvs source checked out today (3-15-06).

If I'm remembering correctly, this could be workd around (at least in
version by compiling with gcc-3.3 rather than 4.0

I'm not sure that still works, but even if it does, it will be hard luck for
me, since the Intel based macs are only supported by gcc-4.0.

In any case, any help building on recent Macs would be greatly
appreciated. Thanks.

BTW: I also had to edit a line in setup/build_w.py in order to rebuild
the wrappers.
This is line 20:
data = stderr.read()
data = sout.read()+stderr.read()

I was getting the output of "swig -version" on stdout, not stderr, so the
original code resulted in an empty string for "data" and the swig
version check always failed.


  • Graham Cummins

    Graham Cummins - 2006-03-17

    Logged In: YES

    Found a solution for this.

    This error is caused by having /System/Library/Frameworks/
    Kernel.frameworks/Headers in the "include_dirs" defined in config/
    darwin.cfg. It seems that this causes Python.h to include the wrong stat.h.
    Removing that line fixes that issue.

    I got some other errors from files using #include <GL/glext.h>, but I was
    able to solve those with a (very) nasty hack of symlinking /System/Library/
    Frameworks/OpenGL.framework/Headers into itself under the alternate name

    I was still not able to compile, but I with these two modifications I
    could compile for intel macintosh using gcc-4.0, which is good
    enough for me for now.

  • Nobody/Anonymous

    Logged In: NO

    This worked for me


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks