Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#26 git 02d0f6dd21 doesn't compile on Mac OS X 10.6.2

open
nobody
None
5
2010-01-27
2010-01-27
Holger Rapp
No

Output is the following:

------------------- SNIP -------------------
File "/private/tmp/cgkit/supportlib/SConstruct", line 11, in <module>
26 source files
C++ compiler version: 4.2.1
Checking for C++ header file boost/shared_ptr.hpp... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o obj/polyhedrongeom.o -c -arch i386 -arch ppc -fPIC -Iinclude -I/opt/local/include src/polyhedrongeom.cpp
src/polyhedrongeom.cpp: In member function 'virtual void support3d::PolyhedronGeom::drawGL()':
src/polyhedrongeom.cpp:604: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:604: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:605: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:605: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:606: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:606: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp: In member function 'virtual void support3d::PolyhedronGeom::convert(support3d::GeomObject*)':
src/polyhedrongeom.cpp:1042: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:1042: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:1043: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:1043: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:1044: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:1044: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp: In member function 'virtual void support3d::PolyhedronGeom::drawGL()':
src/polyhedrongeom.cpp:604: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:604: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:605: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:605: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:606: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:606: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp: In member function 'virtual void support3d::PolyhedronGeom::convert(support3d::GeomObject*)':
src/polyhedrongeom.cpp:1042: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:1042: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:1043: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:1043: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
src/polyhedrongeom.cpp:1044: error: invalid conversion from 'GLvoid (*)(...)' to 'GLvoid (*)()'
src/polyhedrongeom.cpp:1044: error: initializing argument 3 of 'void gluTessCallback(GLUtesselator*, GLenum, GLvoid (*)())'
lipo: can't figure out the architecture type of: /var/tmp//ccVhq1xc.out
scons: *** [obj/polyhedrongeom.o] Error 1
scons: building terminated because of errors.
------------------- SNAP -------------------

The Problem is a special handling of an apple include that seems to be invalid on Snow Leopard. I can't say how to fix this more gracefully, but attached is a fix that worked for me.

Discussion

  • Holger Rapp
    Holger Rapp
    2010-01-27

     
  • Matthias Baas
    Matthias Baas
    2010-01-27

    This is a known issue. Earlier versions of OSX required this unusual typedef whereas now on 10.6 it can be compiled just like on other systems. I didn't entirely remove the #ifdef as this would break compilation on those earlier versions of OSX (and I'm still using Tiger). I'm not aware of any preprocessor symbols to detect the version of OSX. If you happen to know that, please let me know and I'll happily apply a patch that works for all systems.