mupen64plus / mupen64plus-video-rice

Video plugin for the Mupen64Plus v2.0 project, using OpenGL. This plugin is based on the RiceVideoLinux plugin from earlier versions of Mupen64Plus.
31 stars 40 forks source link

Cleanup includes order and add missing includes #52

Closed ghost closed 9 years ago

joolswills commented 9 years ago

This has broken building on the pi.

Bisected to 33d7c8824c55365181890988445142cc27d125dc

Looks like some conflict between includes

make -C projects/unix all VC=1  OPTFLAGS=""
make: Entering directory '/home/pi/RetroPie-Setup/tmp/build/mupen64plus/mupen64plus-video-rice/projects/unix'
Makefile:114: Architecture "armv6l" not officially supported.'
    CXX _obj/OGLExtensions.o
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:78:0: warning: "GL_FALSE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:172:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:79:0: warning: "GL_TRUE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:173:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:101:0: warning: "GL_ZERO" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:373:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:102:0: warning: "GL_ONE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:374:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:185:0: warning: "GL_NO_ERROR" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:692:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:484:0: warning: "GL_NONE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:464:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:33:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2ext.h:403:0: warning: "GL_COVERAGE_SAMPLES_NV" redefined [enabled by default]
In file included from ../../src/OGLExtensions.cpp:22:0:
/usr/include/SDL2/SDL_opengl.h:5061:0: note: this is the location of the previous definition
In file included from ../../src/OGLExtensions.h:25:0,
                 from ../../src/OGLExtensions.cpp:25:
../../src/osal_opengl.h:61:0: warning: "GL_CLAMP" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:679:0: note: this is the location of the previous definition
In file included from ../../src/OGLExtensions.h:25:0,
                 from ../../src/OGLExtensions.cpp:25:
../../src/osal_opengl.h:62:0: warning: "GL_MAX_TEXTURE_UNITS" redefined [enabled by default]
In file included from ../../src/OGLExtensions.cpp:22:0:
/usr/include/SDL2/SDL_opengl.h:323:0: note: this is the location of the previous definition
In file included from ../../src/OGLExtensions.h:25:0,
                 from ../../src/OGLExtensions.cpp:25:
../../src/osal_opengl.h:63:0: warning: "GL_MIRRORED_REPEAT_ARB" redefined [enabled by default]
In file included from ../../src/OGLExtensions.cpp:22:0:
/usr/include/SDL2/SDL_opengl.h:1319:0: note: this is the location of the previous definition
distcc[19450] ERROR: compile ../../src/OGLExtensions.cpp on 192.168.1.8/16 failed
distcc[19450] (dcc_build_somewhere) Warning: remote compilation of '../../src/OGLExtensions.cpp' failed, retrying locally
distcc[19450] Warning: failed to distribute ../../src/OGLExtensions.cpp to 192.168.1.8/16, running locally instead
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:78:0: warning: "GL_FALSE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:172:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:79:0: warning: "GL_TRUE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:173:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:101:0: warning: "GL_ZERO" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:373:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:102:0: warning: "GL_ONE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:374:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:185:0: warning: "GL_NO_ERROR" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:692:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:484:0: warning: "GL_NONE" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:464:0: note: this is the location of the previous definition
In file included from /usr/include/SDL2/SDL_opengles2.h:33:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2ext.h:403:0: warning: "GL_COVERAGE_SAMPLES_NV" redefined [enabled by default]
In file included from ../../src/OGLExtensions.cpp:22:0:
/usr/include/SDL2/SDL_opengl.h:5061:0: note: this is the location of the previous definition
In file included from ../../src/OGLExtensions.h:25:0,
                 from ../../src/OGLExtensions.cpp:25:
../../src/osal_opengl.h:61:0: warning: "GL_CLAMP" redefined [enabled by default]
In file included from /usr/include/SDL2/SDL_opengl.h:54:0,
                 from ../../src/OGLExtensions.cpp:22:
/usr/include/GL/gl.h:679:0: note: this is the location of the previous definition
In file included from ../../src/OGLExtensions.h:25:0,
                 from ../../src/OGLExtensions.cpp:25:
../../src/osal_opengl.h:62:0: warning: "GL_MAX_TEXTURE_UNITS" redefined [enabled by default]
In file included from ../../src/OGLExtensions.cpp:22:0:
/usr/include/SDL2/SDL_opengl.h:323:0: note: this is the location of the previous definition
In file included from ../../src/OGLExtensions.h:25:0,
                 from ../../src/OGLExtensions.cpp:25:
../../src/osal_opengl.h:63:0: warning: "GL_MIRRORED_REPEAT_ARB" redefined [enabled by default]
In file included from ../../src/OGLExtensions.cpp:22:0:
/usr/include/SDL2/SDL_opengl.h:1319:0: note: this is the location of the previous definition
In file included from ../../src/OGLExtensions.cpp:25:0:
../../src/OGLExtensions.h:44:45: error: ‘void (* glActiveTexture)(GLenum)’ redeclared as different kind of symbol
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:502:37: error: previous declaration of ‘void glActiveTexture(GLenum)’
../../src/OGLExtensions.cpp:31:38: error: ‘void (* glActiveTexture)(GLenum)’ redeclared as different kind of symbol
In file included from /usr/include/SDL2/SDL_opengles2.h:32:0,
                 from ../../src/osal_opengl.h:46,
                 from ../../src/OGLExtensions.h:25,
                 from ../../src/OGLExtensions.cpp:25:
/opt/vc/include/GLES2/gl2.h:502:37: error: previous declaration of ‘void glActiveTexture(GLenum)’
../../src/OGLExtensions.cpp: In function ‘void OGLExtensions_Init()’:
../../src/OGLExtensions.cpp:49:1: error: assignment of function ‘void glActiveTexture(GLenum)’
../../src/OGLExtensions.cpp:49:1: error: cannot convert ‘PFUNCGLACTIVETEXTUREPROC {aka void (*)(unsigned int)}’ to ‘void(GLenum) {aka void(unsigned int)}’ in assignment
../../src/OGLExtensions.cpp:49:1: warning: the address of ‘void glActiveTexture(GLenum)’ will never be NULL [-Waddress]
../../src/OGLExtensions.cpp:49:1: error: assignment of function ‘void glActiveTexture(GLenum)’
../../src/OGLExtensions.cpp:49:1: error: cannot convert ‘PFUNCGLACTIVETEXTUREPROC {aka void (*)(unsigned int)}’ to ‘void(GLenum) {aka void(unsigned int)}’ in assignment
distcc[19456] ERROR: compile (null) on localhost failed
distcc[19450] ERROR: compile ../../src/OGLExtensions.cpp on localhost failed
Makefile:434: recipe for target '_obj/OGLExtensions.o' failed
make: *** [_obj/OGLExtensions.o] Error 1
make: Leaving directory '/home/pi/RetroPie-Setup/tmp/build/mupen64plus/mupen64plus-video-rice/projects/unix'
gizmo98 commented 9 years ago

Verified. This commit breaks rpi compatibility.