Summary: | [GTK] GLContextEGL.cpp: conflicting declaration 'typedef ptrdiff_t GLintptr' | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Andrius Štikonas <andrius> | ||||||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | berto, cgarcia, commit-queue, gnome, pachoramos1, vjaquez, zan | ||||||||
Priority: | P2 | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Other | ||||||||||
OS: | Linux | ||||||||||
URL: | https://bugs.gentoo.org/show_bug.cgi?id=512224 | ||||||||||
Attachments: |
|
AFAIK it is not --disable-glx but --enable-glx=no (In reply to comment #1) > AFAIK it is not --disable-glx but --enable-glx=no Isn't it equivalent? From the build log: checking GL/glx.h usability... yes checking GL/glx.h presence... yes checking for GL/glx.h... yes checking whether to enable GLX support... no checking EGL/egl.h usability... yes checking EGL/egl.h presence... yes checking for EGL/egl.h... yes checking whether to enable EGL support... yes checking GLES2/gl2.h usability... yes checking GLES2/gl2.h presence... yes checking for GLES2/gl2.h... yes checking whether to use OpenGL ES 2 support... yes I spoke too fast: glx.h is included by cairo-gl.h Is cairo compiled with glx? What about recompile it only with egl support? Yes, cairo was compiled with opengl. I think dependencies are incorrectly specified in Gentoo ebuild but I have to double check and recompile. Ok, I can confirm that webkit-gtk builds if cairo is compiled with egl/gles2 support. (In reply to comment #5) > Ok, I can confirm that webkit-gtk builds if cairo is compiled with egl/gles2 support. Thanks, I think we're having the same problem in Debian. We'll investigate and come back here. (In reply to comment #0) > /usr/include/GL/glext.h:6152:19: error: conflicting declaration 'typedef ptrdiff_t GLintptr' > ./Source/ThirdParty/ANGLE/include/GLES2/gl2.h:38:26: error: 'GLintptr' has a previous declaration as 'typedef khronos_intptr_t GLintptr' So the problem is that we are using these two definitions of GLintptr if GLES 2 is enabled. khronos_intptr_t is a signed long int (Source/ThirdParty/ANGLE/include/KHR/khrplatform.h) In amd64 there's no problem because ptrdiff_t is also a long int. However in arm it's a regular int, hence the conflict. Created attachment 232863 [details] Patch (In reply to comment #4) > Yes, cairo was compiled with opengl. I think dependencies are incorrectly specified in Gentoo ebuild but I have to double check and recompile. Can you try this patch? ok, this patch works. Just finished compiling. Updating bug title for clarity Created attachment 233042 [details]
Patch
The problem comes because we include cairo-gl.h for the definition of
cairo_egl_device_create().
However that file also includes some definitions from the GLX headers
that conflict with the ones provided by the WebKit GLES2 headers.
Since we don't need any GLX code in that source file we can disable
the inclusion of those functions.
Comment on attachment 233042 [details]
Patch
Nice.
Comment on attachment 233042 [details] Patch Clearing flags on attachment: 233042 Committed r169935: <http://trac.webkit.org/changeset/169935> All reviewed patches have been landed. Closing bug. Will this fix be included in 2.4.x too? (In reply to comment #15) > Will this fix be included in 2.4.x too? It is very likely: http://trac.webkit.org/wiki/WebKitGTK/2.4.x Thanks! |
Created attachment 232558 [details] build.log.xz WebKit-gtk 2.4.3 fails to build on Gentoo Linux (ARM architecture, GCC 4.7.3 was used to compile it). The error message is: In file included from /usr/include/GL/gl.h:2085:0, from /usr/include/GL/glx.h:32, from /usr/include/cairo/cairo-gl.h:96, from Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:39: /usr/include/GL/glext.h:6152:19: error: conflicting declaration 'typedef ptrdiff_t GLintptr' In file included from Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:32:0: ./Source/ThirdParty/ANGLE/include/GLES2/gl2.h:38:26: error: 'GLintptr' has a previous declaration as 'typedef khronos_intptr_t GLintptr' In file included from /usr/include/GL/gl.h:2085:0, from /usr/include/GL/glx.h:32, from /usr/include/cairo/cairo-gl.h:96, from Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:39: /usr/include/GL/glext.h:6153:19: error: conflicting declaration 'typedef ptrdiff_t GLsizeiptr' In file included from Source/WebCore/platform/graphics/egl/GLContextEGL.cpp:32:0: ./Source/ThirdParty/ANGLE/include/GLES2/gl2.h:39:26: error: 'GLsizeiptr' has a previous declaration as 'typedef khronos_ssize_t GLsizeiptr' The following features were enabled by the standard Gentoo ebuild [ebuild r U ] net-libs/webkit-gtk-2.2.6:3/29 [1.10.2-r300:3/3] USE="egl%* geoloc gles2%* gstreamer introspection jit spell webgl (-aqua) -coverage -debug -libsecret% -opengl% {-test}" 0 kB So it is compiled with EGL and OpenGL ES 2.0 support.