mupen64plus / mupen64plus-user-issues

Issue reports from users go here
http://www.mupen64plus.org/
17 stars 3 forks source link

mupen64plus-video-z64 build failure on linux #704

Closed orbea closed 6 years ago

orbea commented 6 years ago

OS: Slackware64-current Compiler: gcc-8.2.0 Mesa 18.3.0-devel (git-de57926dc9)

Building mupen64plus-video-z64 on Linux results in this build failure for me now.

$ make all
    CC  _obj/osal_dynamiclib_unix.o
    CXX _obj/rgl.o
    CXX _obj/rgl_settings.o
    CXX _obj/rgl_tiles.o
    CXX _obj/rgl_rendermode.o
    CXX _obj/rgl_geometry.o
    CXX _obj/rgl_debugger.o
    CXX _obj/rgl_osdep.o
    CXX _obj/rdp.o
    CXX _obj/glshader.o
In file included from ../../src/glshader.cpp:39:
/usr/include/GL/glext.h:12066:105: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, const GLfloat*)’
 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, const GLfloat *params);
                                                                                                         ^
In file included from ../../src/glshader.cpp:22:
/usr/include/GL/glew.h:18734:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTFVSGIXPROC)(GLenum, GLenum, GLfloat*)’
 typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTFVSGIXPROC) (GLenum light, GLenum pname, GLfloat* params);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/glshader.cpp:39:
/usr/include/GL/glext.h:12068:103: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, const GLint*)’
 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, const GLint *params);
                                                                                                       ^
In file included from ../../src/glshader.cpp:22:
/usr/include/GL/glew.h:18736:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTIVSGIXPROC)(GLenum, GLenum, GLint*)’
 typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTIVSGIXPROC) (GLenum light, GLenum pname, GLint* params);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/glshader.cpp:39:
/usr/include/GL/glext.h:12070:96: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, const GLfloat*)’
 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, const GLfloat *params);
                                                                                                ^
In file included from ../../src/glshader.cpp:22:
/usr/include/GL/glew.h:18730:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTMODELFVSGIXPROC)(GLenum, GLfloat*)’
 typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELFVSGIXPROC) (GLenum pname, GLfloat* params);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/glshader.cpp:39:
/usr/include/GL/glext.h:12072:94: error: conflicting declaration ‘typedef void (* PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, const GLint*)’
 typedef void (APIENTRYP PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, const GLint *params);
                                                                                              ^
In file included from ../../src/glshader.cpp:22:
/usr/include/GL/glew.h:18732:28: note: previous declaration as ‘typedef void (* PFNGLFRAGMENTLIGHTMODELIVSGIXPROC)(GLenum, GLint*)’
 typedef void (GLAPIENTRY * PFNGLFRAGMENTLIGHTMODELIVSGIXPROC) (GLenum pname, GLint* params);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/glshader.cpp:39:
/usr/include/GL/glext.h:12079:104: error: conflicting declaration ‘typedef void (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, GLfloat*)’
 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, GLfloat *params);
                                                                                                        ^
In file included from ../../src/glshader.cpp:22:
/usr/include/GL/glew.h:18743:28: note: previous declaration as ‘typedef void (* PFNGLGETFRAGMENTMATERIALFVSGIXPROC)(GLenum, GLenum, const GLfloat*)’
 typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALFVSGIXPROC) (GLenum face, GLenum pname, const GLfloat* data);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/glshader.cpp:39:
/usr/include/GL/glext.h:12080:102: error: conflicting declaration ‘typedef void (* PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, GLint*)’
 typedef void (APIENTRYP PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, GLint *params);
                                                                                                      ^
In file included from ../../src/glshader.cpp:22:
/usr/include/GL/glew.h:18744:28: note: previous declaration as ‘typedef void (* PFNGLGETFRAGMENTMATERIALIVSGIXPROC)(GLenum, GLenum, const GLint*)’
 typedef void (GLAPIENTRY * PFNGLGETFRAGMENTMATERIALIVSGIXPROC) (GLenum face, GLenum pname, const GLint* data);
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:394: _obj/glshader.o] Error 1
orbea commented 6 years ago

I was able to build it with this patch, is this correct?

diff --git a/src/glshader.cpp b/src/glshader.cpp
index 5ddb8d6..b10df5d 100644
--- a/src/glshader.cpp
+++ b/src/glshader.cpp
@@ -35,9 +35,6 @@
 #include <glext.h>
 #else
 #include <GL/gl.h>
-#ifndef WIN32
-    #include <GL/glext.h>
-#endif
 #endif
 #include "glshader.h"