Bug 185639

Summary: [WPE] Build failure with RPi userland drivers and gstreamer-gl
Product: WebKit Reporter: Carlos Alberto Lopez Perez <clopez>
Component: WPE WebKitAssignee: Carlos Alberto Lopez Perez <clopez>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, bugs-noreply, calvaris, clopez, mcatanzaro, pnormand, zan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Carlos Alberto Lopez Perez 2018-05-14 18:57:44 PDT
Trying to build WPE (upstream) with RPi userland drivers and gstreamer-gl currently results in a build failure due to some mismatches on the definitions of the GLsync types.

The issue seems to be the following one:

 1. RPi userland drivers doesn't define GLsync in the GLESv2 headers
 2. Therefore gstreamer-plugins-bad define "GST_GL_HAVE_GLSYNC 0" at configure time
 3. libepoxy enables GLsync in its headers
 4. In WPE in MediaPlayerPrivateGStreamerBase.cpp we include first the libepoxy headers before the gstreamer-gl ones
 5. gstreamer-gl headers try to give a type definition to GLsync (due to 2.) but it conflicts with the one already assigned from libepoxy (3. and .4)
 6. Build error happens

| /home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/rpi_userland/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.20.2-r0/recipe-sysroot/usr/include/gstreamer-1.0/gst/gl/glprototypes/gstgl_compat.h:40:18: error: conflicting declaration 'typedef void* GLsync'
|  typedef gpointer GLsync;
|                   ^~~~~~
| In file included from /home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/rpi_userland/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.20.2-r0/recipe-sysroot/usr/include/epoxy/gl.h:89:0,
|                  from /home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/rpi_userland/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.20.2-r0/releases/WebKitGTK/webkit-2.20/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:62:
| /home/igalia/clopez/yocto/commit-builds/meta-webkit/builds/rpi_userland/build/tmp/work/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/wpewebkit/2.20.2-r0/recipe-sysroot/usr/include/epoxy/gl_generated.h:83:26: note: previous declaration as 'typedef struct __GLsync* GLsync'
|  typedef struct __GLsync *GLsync;
|                           ^~~~~~


This issue seems to be already workarounded in the wpewebkit-downstream repository. We should fix this upstream as well.
Comment 1 Carlos Alberto Lopez Perez 2018-05-14 20:05:06 PDT
There seem to be more types conflicting, which cause build errors like this:

${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:502:68: error: 'void epoxy_glActiveTexture(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:503:82: error: 'void epoxy_glAttachShader(GLuint, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:504:107: error: 'void epoxy_glBindAttribLocation(GLuint, GLuint, const GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:505:79: error: 'void epoxy_glBindBuffer(GLenum, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:506:89: error: 'void epoxy_glBindFramebuffer(GLenum, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:507:91: error: 'void epoxy_glBindRenderbuffer(GLenum, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:508:81: error: 'void epoxy_glBindTexture(GLenum, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:509:110: error: 'void epoxy_glBlendColor(GLclampf, GLclampf, GLclampf, GLclampf)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:510:67: error: 'void epoxy_glBlendEquation(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:511:94: error: 'void epoxy_glBlendEquationSeparate(GLenum, GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:512:80: error: 'void epoxy_glBlendFunc(GLenum, GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:513:120: error: 'void epoxy_glBlendFuncSeparate(GLenum, GLenum, GLenum, GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:514:115: error: 'void epoxy_glBufferData(GLenum, GLsizeiptr, const GLvoid*, GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:515:121: error: 'void epoxy_glBufferSubData(GLenum, GLintptr, GLsizeiptr, const GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:516:76: error: 'GLenum epoxy_glCheckFramebufferStatus(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:517:61: error: 'void epoxy_glClear(GLbitfield)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:518:110: error: 'void epoxy_glClearColor(GLclampf, GLclampf, GLclampf, GLclampf)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:519:66: error: 'void epoxy_glClearDepthf(GLclampf)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:520:60: error: 'void epoxy_glClearStencil(GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:521:113: error: 'void epoxy_glColorMask(GLboolean, GLboolean, GLboolean, GLboolean)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:522:67: error: 'void epoxy_glCompileShader(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:523:194: error: 'void epoxy_glCompressedTexImage2D(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:524:205: error: 'void epoxy_glCompressedTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:525:167: error: 'void epoxy_glCopyTexImage2D(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:526:163: error: 'void epoxy_glCopyTexSubImage2D(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:527:58: error: 'GLuint epoxy_glCreateProgram()' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:528:64: error: 'GLuint epoxy_glCreateShader(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:529:60: error: 'void epoxy_glCullFace(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:530:86: error: 'void epoxy_glDeleteBuffers(GLsizei, const GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:531:96: error: 'void epoxy_glDeleteFramebuffers(GLsizei, const GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:532:68: error: 'void epoxy_glDeleteProgram(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:533:98: error: 'void epoxy_glDeleteRenderbuffers(GLsizei, const GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:534:66: error: 'void epoxy_glDeleteShader(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:535:88: error: 'void epoxy_glDeleteTextures(GLsizei, const GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:536:61: error: 'void epoxy_glDepthFunc(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:537:64: error: 'void epoxy_glDepthMask(GLboolean)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:538:81: error: 'void epoxy_glDepthRangef(GLclampf, GLclampf)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:539:82: error: 'void epoxy_glDetachShader(GLuint, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:540:58: error: 'void epoxy_glDisable(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:541:77: error: 'void epoxy_glDisableVertexAttribArray(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:542:90: error: 'void epoxy_glDrawArrays(GLenum, GLint, GLsizei)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:543:115: error: 'void epoxy_glDrawElements(GLenum, GLsizei, GLenum, const GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:544:57: error: 'void epoxy_glEnable(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:545:76: error: 'void epoxy_glEnableVertexAttribArray(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:546:51: error: 'void epoxy_glFinish()' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:547:50: error: 'void epoxy_glFlush()' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:548:144: error: 'void epoxy_glFramebufferRenderbuffer(GLenum, GLenum, GLenum, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:549:140: error: 'void epoxy_glFramebufferTexture2D(GLenum, GLenum, GLenum, GLuint, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:550:61: error: 'void epoxy_glFrontFace(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:551:77: error: 'void epoxy_glGenBuffers(GLsizei, GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:552:68: error: 'void epoxy_glGenerateMipmap(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:553:87: error: 'void epoxy_glGenFramebuffers(GLsizei, GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:554:89: error: 'void epoxy_glGenRenderbuffers(GLsizei, GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:555:79: error: 'void epoxy_glGenTextures(GLsizei, GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:556:159: error: 'void epoxy_glGetActiveAttrib(GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:557:160: error: 'void epoxy_glGetActiveUniform(GLuint, GLuint, GLsizei, GLsizei*, GLint*, GLenum*, GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:558:124: error: 'void epoxy_glGetAttachedShaders(GLuint, GLsizei, GLsizei*, GLuint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:559:92: error: 'int epoxy_glGetAttribLocation(GLuint, const GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:560:83: error: 'void epoxy_glGetBooleanv(GLenum, GLboolean*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:561:103: error: 'void epoxy_glGetBufferParameteriv(GLenum, GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:562:53: error: 'GLenum epoxy_glGetError()' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:563:79: error: 'void epoxy_glGetFloatv(GLenum, GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:564:137: error: 'void epoxy_glGetFramebufferAttachmentParameteriv(GLenum, GLenum, GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:565:79: error: 'void epoxy_glGetIntegerv(GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:566:96: error: 'void epoxy_glGetProgramiv(GLuint, GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:567:123: error: 'void epoxy_glGetProgramInfoLog(GLuint, GLsizei, GLsizei*, GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:568:109: error: 'void epoxy_glGetRenderbufferParameteriv(GLenum, GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:569:94: error: 'void epoxy_glGetShaderiv(GLuint, GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:570:121: error: 'void epoxy_glGetShaderInfoLog(GLuint, GLsizei, GLsizei*, GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:571:136: error: 'void epoxy_glGetShaderPrecisionFormat(GLenum, GLenum, GLint*, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:572:119: error: 'void epoxy_glGetShaderSource(GLuint, GLsizei, GLsizei*, GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:573:63: error: 'const GLubyte* epoxy_glGetString(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:574:102: error: 'void epoxy_glGetTexParameterfv(GLenum, GLenum, GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:575:100: error: 'void epoxy_glGetTexParameteriv(GLenum, GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:576:100: error: 'void epoxy_glGetUniformfv(GLuint, GLint, GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:577:98: error: 'void epoxy_glGetUniformiv(GLuint, GLint, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:578:93: error: 'int epoxy_glGetUniformLocation(GLuint, const GLchar*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:579:101: error: 'void epoxy_glGetVertexAttribfv(GLuint, GLenum, GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:580:99: error: 'void epoxy_glGetVertexAttribiv(GLuint, GLenum, GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:581:108: error: 'void epoxy_glGetVertexAttribPointerv(GLuint, GLenum, GLvoid**)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:582:71: error: 'void epoxy_glHint(GLenum, GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:583:62: error: 'GLboolean epoxy_glIsBuffer(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:584:60: error: 'GLboolean epoxy_glIsEnabled(GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:585:72: error: 'GLboolean epoxy_glIsFramebuffer(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:586:64: error: 'GLboolean epoxy_glIsProgram(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:587:74: error: 'GLboolean epoxy_glIsRenderbuffer(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:588:62: error: 'GLboolean epoxy_glIsShader(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:589:64: error: 'GLboolean epoxy_glIsTexture(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:590:63: error: 'void epoxy_glLineWidth(GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:591:66: error: 'void epoxy_glLinkProgram(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:592:77: error: 'void epoxy_glPixelStorei(GLenum, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:593:83: error: 'void epoxy_glPolygonOffset(GLfloat, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:594:142: error: 'void epoxy_glReadPixels(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:595:66: error: 'void epoxy_glReleaseShaderCompiler()' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:596:127: error: 'void epoxy_glRenderbufferStorage(GLenum, GLenum, GLsizei, GLsizei)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:597:87: error: 'void epoxy_glSampleCoverage(GLclampf, GLboolean)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:598:95: error: 'void epoxy_glScissor(GLint, GLint, GLsizei, GLsizei)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:599:144: error: 'void epoxy_glShaderBinary(GLsizei, const GLuint*, GLenum, const GLvoid*, GLsizei)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:600:125: error: 'void epoxy_glShaderSource(GLuint, GLsizei, const GLchar**, const GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:601:87: error: 'void epoxy_glStencilFunc(GLenum, GLint, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:602:108: error: 'void epoxy_glStencilFuncSeparate(GLenum, GLenum, GLint, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:603:63: error: 'void epoxy_glStencilMask(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:604:84: error: 'void epoxy_glStencilMaskSeparate(GLenum, GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:605:89: error: 'void epoxy_glStencilOp(GLenum, GLenum, GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:606:110: error: 'void epoxy_glStencilOpSeparate(GLenum, GLenum, GLenum, GLenum)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:607:194: error: 'void epoxy_glTexImage2D(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:608:96: error: 'void epoxy_glTexParameterf(GLenum, GLenum, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:609:105: error: 'void epoxy_glTexParameterfv(GLenum, GLenum, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:610:94: error: 'void epoxy_glTexParameteri(GLenum, GLenum, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:611:103: error: 'void epoxy_glTexParameteriv(GLenum, GLenum, const GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:612:191: error: 'void epoxy_glTexSubImage2D(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:613:75: error: 'void epoxy_glUniform1f(GLint, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:614:98: error: 'void epoxy_glUniform1fv(GLint, GLsizei, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:615:73: error: 'void epoxy_glUniform1i(GLint, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:616:96: error: 'void epoxy_glUniform1iv(GLint, GLsizei, const GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:617:86: error: 'void epoxy_glUniform2f(GLint, GLfloat, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:618:98: error: 'void epoxy_glUniform2fv(GLint, GLsizei, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:619:82: error: 'void epoxy_glUniform2i(GLint, GLint, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:620:96: error: 'void epoxy_glUniform2iv(GLint, GLsizei, const GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:621:97: error: 'void epoxy_glUniform3f(GLint, GLfloat, GLfloat, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:622:98: error: 'void epoxy_glUniform3fv(GLint, GLsizei, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:623:91: error: 'void epoxy_glUniform3i(GLint, GLint, GLint, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:624:96: error: 'void epoxy_glUniform3iv(GLint, GLsizei, const GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:625:108: error: 'void epoxy_glUniform4f(GLint, GLfloat, GLfloat, GLfloat, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:626:98: error: 'void epoxy_glUniform4fv(GLint, GLsizei, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:627:100: error: 'void epoxy_glUniform4i(GLint, GLint, GLint, GLint, GLint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:628:96: error: 'void epoxy_glUniform4iv(GLint, GLsizei, const GLint*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:629:129: error: 'void epoxy_glUniformMatrix2fv(GLint, GLsizei, GLboolean, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:630:129: error: 'void epoxy_glUniformMatrix3fv(GLint, GLsizei, GLboolean, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:631:129: error: 'void epoxy_glUniformMatrix4fv(GLint, GLsizei, GLboolean, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:632:65: error: 'void epoxy_glUseProgram(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:633:70: error: 'void epoxy_glValidateProgram(GLuint)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:634:77: error: 'void epoxy_glVertexAttrib1f(GLuint, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:635:90: error: 'void epoxy_glVertexAttrib1fv(GLuint, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:636:88: error: 'void epoxy_glVertexAttrib2f(GLuint, GLfloat, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:637:90: error: 'void epoxy_glVertexAttrib2fv(GLuint, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:638:99: error: 'void epoxy_glVertexAttrib3f(GLuint, GLfloat, GLfloat, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:639:90: error: 'void epoxy_glVertexAttrib3fv(GLuint, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:640:110: error: 'void epoxy_glVertexAttrib4f(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:641:90: error: 'void epoxy_glVertexAttrib4fv(GLuint, const GLfloat*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:642:153: error: 'void epoxy_glVertexAttribPointer(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid*)' redeclared as different kind of symbol
${build_dir}/recipe-sysroot/usr/include/GLES2/gl2.h:643:96: error: 'void epoxy_glViewport(GLint, GLint, GLsizei, GLsizei)' redeclared as different kind of symbol


It seems this can be avoiding by defining __gl2_h_ before including the gst gl headers, to ensure the definitions/types from libepoxy are used.
Comment 2 Carlos Alberto Lopez Perez 2018-05-14 20:08:22 PDT
Created attachment 340389 [details]
Patch
Comment 3 Zan Dobersek 2018-05-14 23:57:40 PDT
What's the GStreamer version you're compiling? I don't think this happens with newer ones.
Comment 4 Carlos Alberto Lopez Perez 2018-05-15 03:20:14 PDT
(In reply to Zan Dobersek from comment #3)
> What's the GStreamer version you're compiling? I don't think this happens
> with newer ones.

1.12.2
Comment 5 Philippe Normand 2018-05-15 03:33:56 PDT
(In reply to Carlos Alberto Lopez Perez from comment #4)
> (In reply to Zan Dobersek from comment #3)
> > What's the GStreamer version you're compiling? I don't think this happens
> > with newer ones.
> 
> 1.12.2

Can you try with 1.14 then? 1.12.2 is a bit old :)
Comment 6 Carlos Alberto Lopez Perez 2018-05-15 04:44:02 PDT
(In reply to Philippe Normand from comment #5)
> (In reply to Carlos Alberto Lopez Perez from comment #4)
> > (In reply to Zan Dobersek from comment #3)
> > > What's the GStreamer version you're compiling? I don't think this happens
> > > with newer ones.
> > 
> > 1.12.2
> 
> Can you try with 1.14 then? 1.12.2 is a bit old :)

Tried. I can't reproduce with 1.14

However, I'm still interested in fixing this issue with 1.12 (which will be a supported version for us for a long time)

I will try to add a version check to the patch.
Comment 7 Carlos Alberto Lopez Perez 2018-05-15 05:40:42 PDT
Created attachment 340405 [details]
Patch

Patch v2, add a GST_CHECK_VERSION()
Comment 8 Carlos Alberto Lopez Perez 2018-05-15 08:14:19 PDT
Comment on attachment 340405 [details]
Patch

Clearing flags on attachment: 340405

Committed r231801: <https://trac.webkit.org/changeset/231801>
Comment 9 Carlos Alberto Lopez Perez 2018-05-15 08:14:23 PDT
All reviewed patches have been landed.  Closing bug.