[Xquartz-dev] X11 vs freeglut 2.6.0-rc1

Jack Howarth howarth at bromo.med.uc.edu
Sat Apr 25 20:03:03 PDT 2009


   While attempting to build some test packaging for
the new freeglut 2.6.0-rc1 release on Intel Darwin,
I discovered that their build fails in the freeglut
demo programs with the error...

Making all in smooth_opengl3
gcc -DHAVE_CONFIG_H -I. -I../../..   -I/sw/include -I../../../include -I/usr/X11R6/include -O3 -DTARGET_HOST_POSIX_X11 -c -o smooth_opengl3-smooth_opengl3.o `test -f 'smooth_opengl3.c' || echo './'`smooth_opengl3.c
smooth_opengl3.c:101: error: redefinition of typedef 'PFNGLGENBUFFERSPROC'
/usr/X11R6/include/GL/gl.h:1884: error: previous declaration of 'PFNGLGENBUFFERSPROC' was here
smooth_opengl3.c:104: error: redefinition of typedef 'PFNGLBINDBUFFERPROC'
/usr/X11R6/include/GL/gl.h:1882: error: previous declaration of 'PFNGLBINDBUFFERPROC' was here
smooth_opengl3.c:107: error: redefinition of typedef 'PFNGLBUFFERDATAPROC'
/usr/X11R6/include/GL/gl.h:1886: error: previous declaration of 'PFNGLBUFFERDATAPROC' was here
smooth_opengl3.c:110: error: redefinition of typedef 'PFNGLCREATESHADERPROC'
/usr/X11R6/include/GL/gl.h:1939: error: previous declaration of 'PFNGLCREATESHADERPROC' was here
smooth_opengl3.c:113: error: redefinition of typedef 'PFNGLSHADERSOURCEPROC'
/usr/X11R6/include/GL/gl.h:1940: error: previous declaration of 'PFNGLSHADERSOURCEPROC' was here
smooth_opengl3.c:116: error: redefinition of typedef 'PFNGLCOMPILESHADERPROC'
/usr/X11R6/include/GL/gl.h:1941: error: previous declaration of 'PFNGLCOMPILESHADERPROC' was here
smooth_opengl3.c:119: error: redefinition of typedef 'PFNGLCREATEPROGRAMPROC'
/usr/X11R6/include/GL/gl.h:1942: error: previous declaration of 'PFNGLCREATEPROGRAMPROC' was here
smooth_opengl3.c:122: error: redefinition of typedef 'PFNGLATTACHSHADERPROC'
/usr/X11R6/include/GL/gl.h:1943: error: previous declaration of 'PFNGLATTACHSHADERPROC' was here
smooth_opengl3.c:125: error: redefinition of typedef 'PFNGLLINKPROGRAMPROC'
/usr/X11R6/include/GL/gl.h:1944: error: previous declaration of 'PFNGLLINKPROGRAMPROC' was here
smooth_opengl3.c:128: error: redefinition of typedef 'PFNGLUSEPROGRAMPROC'
/usr/X11R6/include/GL/gl.h:1945: error: previous declaration of 'PFNGLUSEPROGRAMPROC' was here
smooth_opengl3.c:131: error: redefinition of typedef 'PFNGLGETSHADERIVPROC'
/usr/X11R6/include/GL/gl.h:1969: error: previous declaration of 'PFNGLGETSHADERIVPROC' was here
smooth_opengl3.c:134: error: redefinition of typedef 'PFNGLGETSHADERINFOLOGPROC'
/usr/X11R6/include/GL/gl.h:1972: error: previous declaration of 'PFNGLGETSHADERINFOLOGPROC' was here
smooth_opengl3.c:137: error: redefinition of typedef 'PFNGLGETPROGRAMIVPROC'
/usr/X11R6/include/GL/gl.h:1970: error: previous declaration of 'PFNGLGETPROGRAMIVPROC' was here
smooth_opengl3.c:140: error: redefinition of typedef 'PFNGLGETPROGRAMINFOLOGPROC'
/usr/X11R6/include/GL/gl.h:1973: error: previous declaration of 'PFNGLGETPROGRAMINFOLOGPROC' was here
smooth_opengl3.c:143: error: redefinition of typedef 'PFNGLGETATTRIBLOCATIONPROC'
/usr/X11R6/include/GL/gl.h:1981: error: previous declaration of 'PFNGLGETATTRIBLOCATIONPROC' was here
smooth_opengl3.c:146: error: redefinition of typedef 'PFNGLVERTEXATTRIBPOINTERPROC'
/usr/X11R6/include/GL/gl.h:1930: error: previous declaration of 'PFNGLVERTEXATTRIBPOINTERPROC' was here
smooth_opengl3.c:149: error: redefinition of typedef 'PFNGLENABLEVERTEXATTRIBARRAYPROC'
/usr/X11R6/include/GL/gl.h:1931: error: previous declaration of 'PFNGLENABLEVERTEXATTRIBARRAYPROC' was here
smooth_opengl3.c:152: error: redefinition of typedef 'PFNGLGETUNIFORMLOCATIONPROC'
/usr/X11R6/include/GL/gl.h:1974: error: previous declaration of 'PFNGLGETUNIFORMLOCATIONPROC' was here
smooth_opengl3.c:155: error: redefinition of typedef 'PFNGLUNIFORMMATRIX4FVPROC'
/usr/X11R6/include/GL/gl.h:1966: error: previous declaration of 'PFNGLUNIFORMMATRIX4FVPROC' was here
smooth_opengl3.c: In function 'main':
smooth_opengl3.c:425: error: 'GLUT_FORWARD_COMPATIBLE' undeclared (first use in this function)
smooth_opengl3.c:425: error: (Each undeclared identifier is reported only once
smooth_opengl3.c:425: error: for each function it appears in.)
smooth_opengl3.c:425: error: 'GLUT_DEBUG' undeclared (first use in this function)
make[4]: *** [smooth_opengl3-smooth_opengl3.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1

This appears to be coming from the definitions that exist in our gl.h. These definitions don't exist in the
gl.h of Fedora 10 but are in glext.h instead. I noticed we have the comment...

/* The following macros exist to address conflicts between the names given to
 * function pointers by the MESA API and OpenGL.framework's API.
 */

We should probably make the freeglut developers aware of this issue so we don't have to
heavily patch the freeglut 2.6.0 release. Any particular comments on this?
                        Jack


More information about the Xquartz-dev mailing list