[since 3.32] building always fails for gles2 target
Building mutter with OpenGL disabled and EGL/GLES2 enabled fails because of conflicting types between GL/gl.h and GLES2/gl2.h
After a few commits such as:
mutter will ALWAYS include (for some headers) GL/gl.h or GL/glext.h, even with OpenGL disabled and GLES2 enabled, which results in conflicting types.
In file included from cogl/cogl/cogl-gl-header.h:40:0,
from ../cogl/cogl/cogl-gles2.h:69,
from ../cogl/cogl/winsys/cogl-winsys-private.h:36,
from ../cogl/cogl/cogl-fence-private.h:36,
from ../cogl/cogl/cogl-journal-private.h:37,
from ../cogl/cogl/cogl-framebuffer-private.h:36,
from ../cogl/cogl/cogl-driver.h:36,
from ../cogl/cogl/cogl-renderer-private.h:37,
from ../cogl/cogl/cogl-mutter.h:41,
from ../cogl/cogl/cogl.h:93,
from ../clutter/clutter/clutter-types.h:32,
from ../clutter/clutter/clutter.h:32,
from ../src/compositor/meta-sync-ring.c:40:
/usr/include/GLES2/gl2.h:75:25: error: conflicting types for ‘GLsizeiptr’
typedef khronos_ssize_t GLsizeiptr;
^~~~~~~~~~
In file included from /usr/include/GL/gl.h:2055:0,
from ../src/compositor/meta-sync-ring.c:36:
/usr/include/GL/glext.h:468:19: note: previous declaration of ‘GLsizeiptr’ was here
typedef ptrdiff_t GLsizeiptr;
^~~~~~~~~~
Edited by Ghost User