The OpenGLShims.h header does not contain any X11- nor GLX-specific definitions, and actually in some cases failing to include it can result failing to complete the build when GLX is not available in the system. This is known to happen in some setups where the main OpenGL library is provided by libglvnd (see related bug #236592, too)
Thanks for Haelwenn “lanodan” Monnier who pointed the issue on IRC :)
At some point we may be able to simplify things, see bug #146680 for an idea to always use libepoxy, but for the build fix I want to solve here I will do the minimum amount of changes needed, taking into account that: - For USE(LIBEPOXY) we should use <epoxy/gl.h> - Else, for USE(OPENGL_ES) we should use <GLES2/gl2.h> directly - Otherwise, we use WebCore's "OpenGLShims.h" (There is also "OpenGLESShims.h", which adds a few definitions only without trying to piggyback on top of <GLES2/gl2.h>; I think it is okay to include it only in sources which use definitions from it.)
Can we delete this mess if we require epoxy? Seems like past time to do that?
(In reply to Michael Catanzaro from comment #3) > Can we delete this mess if we require epoxy? Seems like past time to do that? Yes, that would be bug #146680 which I linked earlier. Here I only want to do the minimum needed to get things going, because replacing usage if USE(OPENGL_ES) with USE(LIBEPOXY) requires substantially more work and testing — but sure I agree it would be neat to remove choices here.
Created attachment 451941 [details] Patch
Comment on attachment 451941 [details] Patch This looks suspiciously similar to bug #208907. Please look at that one too before landing.
*** Bug 208907 has been marked as a duplicate of this bug. ***
Let's land this, I have tested builds of WPE with this patch, and of the GTK port with Mesa, both with and without GLX; and tests passed. Also lanodan has tried a build with the patch applied in Gentoo with the set of build options that were making the build fail there, and that worked fine as well. The build failure from the api-gtk EWS builder is unrelated to the patch.
Committed r289795 (247260@main): <https://commits.webkit.org/247260@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 451941 [details].
<rdar://problem/88953005>