Summary: | media-libs/gst-plugins-bad USE=egl,gles2 - In file included from .../work/gst-plugins-bad-1.4.3/gst-libs/gst/gl/x11/gstgldisplay_x11.c:25: /usr/include/GLES2/gl2.h:69:25: error: conflicting types for ‘GLsizeiptr’ | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Maciej Piechotka <uzytkownik2> |
Component: | [OLD] GNOME | Assignee: | GStreamer package maintainers <gstreamer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 1i5t5.duncan, ansla80, esigra, kensington, kripton, manday, mgorny, orzel, silvio.gerli, x11 |
Priority: | Normal | Keywords: | NeedPatch |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://bugzilla.gnome.org/show_bug.cgi?id=744020 https://bugs.gentoo.org/show_bug.cgi?id=563626 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 517672 | ||
Attachments: |
Build log
Build log x86 config.log media-libs:gst-plugins-bad-1.4.3:20141021-121328.log gst-plugins-bad-1.4.5-fix-both-opengl-gles2.patch |
Description
Maciej Piechotka
2014-10-20 04:59:22 UTC
Not sure if we will need to wrap that header now :/ --- work/gst-plugins-bad-1.4.3-abi_x86_32.x86/gst-libs/gst/gl/gstglconfig.h 2014-10-20 18:21:23.625401677 +0200 +++ work/gst-plugins-bad-1.4.3-abi_x86_64.amd64/gst-libs/gst/gl/gstglconfig.h 2014-10-20 18:21:22.835553182 +0200 @@ -12,7 +12,7 @@ G_BEGIN_DECLS #define GST_GL_HAVE_OPENGL 1 -#define GST_GL_HAVE_GLES2 0 +#define GST_GL_HAVE_GLES2 1 #define GST_GL_HAVE_GLES3 0 #define GST_GL_HAVE_WINDOW_X11 1 @x11, is GLES2 not supported on 32-bit systems, or is that a problem with our setup? Created attachment 387088 [details]
Build log
(In reply to Michał Górny from comment #2) > @x11, is GLES2 not supported on 32-bit systems, or is that a problem with > our setup? Yes, GLES2 is supported on 32-bit systems. So the difference is: checking whether it is possible to include both GL and GLES2 headers... no configure: WARNING: Disabling GL|ES 2.0 support in x86 run. Would be nice if someone with native x86 could confirm whether it is x86- or multilib-specific. Created attachment 387090 [details]
x86 config.log
And the specific bits from config.log:
configure:33943: checking whether it is possible to include both GL and GLES2 headers
configure:33962: x86_64-pc-linux-gnu-gcc-4.9.1 -m32 -std=gnu99 -c -march=k8-sse3 -O2 -pipe -frecord-gcc-switches conftest.c >&5
distcc[1156] ERROR: compile /tmp/ccache/tmp/conftest.tmp.pomiot.1152.i on localhost failed
In file included from /usr/include/GL/gl.h:2055:0,
from conftest.c:79:
/usr/include/GL/glext.h:468:19: error: conflicting types for 'GLsizeiptr'
typedef ptrdiff_t GLsizeiptr;
^
In file included from conftest.c:71:0:
/usr/include/GLES2/gl2.h:69:25: note: previous declaration of 'GLsizeiptr' was here
typedef khronos_ssize_t GLsizeiptr;
[...]
Long story short, the two header files use conflicting types for the same typedefs...
I ported over my gl related changes from my overlay, which I forgot when bringing this over. I am quite sure the problem persist (but behind a USE=gles2 flag), but it should be more correct ebuild now for testing. Missing various REQUIRED_USE in combination with USE=egl though (probably egl? ( || opengl egl ) or something along those lines). The version I will introduce to the tree will completely disable glimagesink and co until we figure this stuff out... Now that leio has fixed the automagic selection of GL extensions and USE=gles2 controls GLES2 support we no longer have the header mismatch. Now the package correctly fails to compile :). Created attachment 387132 [details]
media-libs:gst-plugins-bad-1.4.3:20141021-121328.log
As I see it, we have two options now:
1. if upstream doesn't support mixing egl & gles2, we should probably add unconditional REQUIRED_USE'^^ ( egl gles2 )'
2. if upstream supports mixing the two, they should probably fix the bugs. In meantime, we can add REQUIRED_USE='abi_x86_32? ( ^^ ( egl gles2 ) )' and likes for the necessary arches.
Oh, and this is no longer a multilib issue :). Can you please recheck with 1.4.5 in the tree to see if we can improve/fix anything more? Thanks gles2 without egl makes zero sense. You can't instantiate gles2 without EGL, I don't think... Ok, Matt says you can via GLX_EXT_create_context_es2_profile but likely no such thing on platforms where GLES2 instead of GL is preferred (or rather GL does not exist in the first place). Also no GLX* on Wayland. Guys, this is wrong, there is no problem with using both egl and gles2, the problem is with gles2 and opengl on 32bit. Like the config log states it's not possible to include both GL and GLES2 headers on x86, but unlike the warning message "configure: WARNING: Disabling Desktop GL support" GL is not actually being disabled. This is why the compile phase will end up including both headers and fail. USE="egl gles2 -abi_x86_32" or USE="egl gles2 -opengl" will also make the build succeed. So the restriction should be more like "you can't enable gles2, opengl and abi_x86_32 at the same time". Created attachment 395560 [details, diff]
gst-plugins-bad-1.4.5-fix-both-opengl-gles2.patch
Found the problem in configure.ac: the "X, GLX and OpenGL" block would set USE_OPENGL based on the value of HAVE_GL before the "check if we can include both GL and GLES2 at the same time" block is executed and sets HAVE_GL to false.
There would be 2 ways of fixing this: change the order of the blocks or set USE_OPENGL to false in the second block as well. But I found an even more interesting thing: the "check if we can include both GL and GLES2 at the same time" block contains a typo, it checks for NEED_OPENGL instead of NEED_GL and whe fixing that configure will fail with "error: Cannot seem to include both GL and GLES2 headers. Try disabling one API".
I actually liked the auto-fallback to disabling Desktop OpenGL when both can't be used, but apparently that is not what the devs intended to happen when both APIs are explicitly requested.
Submitted this upstream, https://bugzilla.gnome.org/show_bug.cgi?id=744020 I guess for Gentoo it's not needed to include the patch as it will only change the error message when building with the wrong USE flags. All it's required is to replace the current USE depends. (In reply to Andrei Slavoiu from comment #14) > "you can't enable > gles2, opengl and abi_x86_32 at the same time". Does it make sense to allow gles2 and opengl at the same time on abi_x86_64 too or we can disallow gles2+opengl on all setups? Thanks *** Bug 540084 has been marked as a duplicate of this bug. *** + 15 Feb 2015; Pacho Ramos <pacho@gentoo.org> gst-plugins-bad-1.4.5.ebuild: + gles2 also collides with opengl (#525936) + (In reply to Andrei Slavoiu from comment #14) > Guys, this is wrong, there is no problem with using both egl and gles2, the > problem is with gles2 and opengl on 32bit. Can we please remove the gles2 <-> egl blocker then? [master 34904cf] media-libs/gst-plugins-bad: gles2 <-> egl blocker wasn't really needed (#525936#c20) 1 file changed, 1 insertion(+), 1 deletion(-) *** Bug 602512 has been marked as a duplicate of this bug. *** This constraint needs to be dropped too: egl? ( !gles2 ) [master b24a1ed] media-libs/gst-plugins-bad: Drop bogus REQUIRED_USE restraint (#525936, #602512) 1 file changed, 1 deletion(-) |