WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
133550
[GTK] GLContextEGL.cpp: conflicting declaration 'typedef ptrdiff_t GLintptr'
https://bugs.webkit.org/show_bug.cgi?id=133550
Summary
[GTK] GLContextEGL.cpp: conflicting declaration 'typedef ptrdiff_t GLintptr'
Andrius Štikonas
Reported
2014-06-05 09:51:22 PDT
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.
Attachments
build.log.xz
(214.82 KB, application/x-xz)
2014-06-05 09:51 PDT
,
Andrius Štikonas
no flags
Details
Patch
(764 bytes, patch)
2014-06-11 07:20 PDT
,
Alberto Garcia
no flags
Details
Formatted Diff
Diff
Patch
(1.42 KB, patch)
2014-06-13 05:21 PDT
,
Alberto Garcia
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Víctor M. Jáquez L.
Comment 1
2014-06-09 06:25:00 PDT
AFAIK it is not --disable-glx but --enable-glx=no
Alberto Garcia
Comment 2
2014-06-09 06:28:04 PDT
(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
Víctor M. Jáquez L.
Comment 3
2014-06-09 06:31:17 PDT
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?
Andrius Štikonas
Comment 4
2014-06-09 06:38:08 PDT
Yes, cairo was compiled with opengl. I think dependencies are incorrectly specified in Gentoo ebuild but I have to double check and recompile.
Andrius Štikonas
Comment 5
2014-06-09 15:44:50 PDT
Ok, I can confirm that webkit-gtk builds if cairo is compiled with egl/gles2 support.
Alberto Garcia
Comment 6
2014-06-11 05:02:39 PDT
(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.
Alberto Garcia
Comment 7
2014-06-11 06:07:44 PDT
(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.
Alberto Garcia
Comment 8
2014-06-11 07:20:20 PDT
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?
Andrius Štikonas
Comment 9
2014-06-11 12:09:58 PDT
ok, this patch works. Just finished compiling.
Alberto Garcia
Comment 10
2014-06-13 05:11:27 PDT
Updating bug title for clarity
Alberto Garcia
Comment 11
2014-06-13 05:21:15 PDT
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.
Gustavo Noronha (kov)
Comment 12
2014-06-13 05:35:59 PDT
Comment on
attachment 233042
[details]
Patch Nice.
WebKit Commit Bot
Comment 13
2014-06-13 06:34:09 PDT
Comment on
attachment 233042
[details]
Patch Clearing flags on attachment: 233042 Committed
r169935
: <
http://trac.webkit.org/changeset/169935
>
WebKit Commit Bot
Comment 14
2014-06-13 06:34:12 PDT
All reviewed patches have been landed. Closing bug.
Pacho Ramos
Comment 15
2014-06-16 02:59:45 PDT
Will this fix be included in 2.4.x too?
Víctor M. Jáquez L.
Comment 16
2014-06-16 03:42:18 PDT
(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
Pacho Ramos
Comment 17
2014-06-16 23:55:32 PDT
Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug