Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 525936 - 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’
Summary: media-libs/gst-plugins-bad USE=egl,gles2 - In file included from .../work/gst...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: GStreamer package maintainers
URL:
Whiteboard:
Keywords: NeedPatch
: 540084 (view as bug list)
Depends on:
Blocks: gstreamer-1.4
  Show dependency tree
 
Reported: 2014-10-20 04:59 UTC by Maciej Piechotka
Modified: 2016-12-17 13:27 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build log (media-libs:gst-plugins-bad-1.4.3:20141020-004109.log.gz,142.07 KB, application/x-gzip)
2014-10-20 04:59 UTC, Maciej Piechotka
Details
Build log (media-libs-gst-plugins-bad-1.4.3-20141020-004109.log.gz,142.07 KB, application/gzip)
2014-10-20 21:20 UTC, Matt Turner
Details
x86 config.log (config.log,231.70 KB, text/x-log)
2014-10-20 21:38 UTC, Michał Górny
Details
media-libs:gst-plugins-bad-1.4.3:20141021-121328.log (media-libs:gst-plugins-bad-1.4.3:20141021-121328.log,207.40 KB, text/plain)
2014-10-21 12:21 UTC, Michał Górny
Details
gst-plugins-bad-1.4.5-fix-both-opengl-gles2.patch (gst-plugins-bad-1.4.5-fix-both-opengl-gles2.patch,2.88 KB, patch)
2015-02-04 22:49 UTC, Andrei Slavoiu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Piechotka 2014-10-20 04:59:22 UTC
Created attachment 387010 [details]
Build log

media-libs/gst-plugins-bad fails as it produces mismatched ABI headers.

Portage 2.2.14_rc1 (python 3.3.5-final-0, default/linux/amd64/13.0/desktop/gnome, gcc-4.9.1, glibc-2.19-r1, 3.16.0-pf1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.16.0-pf1-x86_64-Intel-R-_Core-TM-_i7-3820QM_CPU_@_2.70GHz-with-gentoo-2.2
KiB Mem:    16051524 total,   5741296 free
KiB Swap:   20971484 total,  20969988 free
Timestamp of tree: Sun, 19 Oct 2014 21:45:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p30
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.1-r1
dev-lang/python:          2.7.8, 3.3.5-r1, 3.4.2
dev-util/cmake:           3.0.2
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.1
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.14.1
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.3, 4.9.1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.1
sys-kernel/linux-headers: 3.17 (virtual/os-headers)
sys-libs/glibc:           2.19-r1
Repositories: gentoo crossdev gentoo-haskell vala steam-overlay bumblebee rust x11 gnome local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections -fgcse-sm -fgcse-las -fgcse-after-reload -floop-block -floop-interchange -ftree-loop-distribution -floop-strip-mine"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections -fgcse-sm -fgcse-las -fgcse-after-reload -floop-block -floop-interchange -ftree-loop-distribution -floop-strip-mine"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="-j8 --load-average=7"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fail-clean fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.mirrors.hoobly.com/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.llarian.net/"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=both -Wl,--sort-common -Wl,--no-keep-memory"
MAKEOPTS="-j4 -l7"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage-crossdev /var/lib/layman/haskell /var/lib/layman/vala /var/lib/layman/steam /var/lib/layman/bumblebee /var/lib/layman/rust /var/lib/layman/x11 /var/lib/layman/gnome /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 avx berkdb bluetooth branding bzip2 bzr c++0x cairo caps cdda cdr cli clutter colord cracklib crypt cryptsetup cups cxx dbus dconf debugger device-mapper dri dri3 dts dvd dvdr eds egl emacs emboss encode evo exif fam ffmpeg firefox flac flash fontconfig fortran fprint fuse g3dvl gbm gdbm gdm gif git glamor gmp gnome gnome-keyring gnome-online-accounts gnuplot google gpm grilo gsettings gstreamer gtk gtk3 gtkstyle gui iconv inotify introspection iproute2 ipsec ipv6 ipython irc ithreads jabber jemalloc jit jpeg kerberos laptop latex lcms ldap libkms libnotify libproxy libsecret llvm lvm lzma mad map mercurial mmx mng modules mp3 mp4 mpeg multilib nautilus ncurses networking networkmanager nls nptl nsplugin nss ogg opencl opengl openmp oss pam pango parted pch pcre pdf perl pkcs11 plotutils png policykit ppds profiler pulseaudio python python3 qemu qt4 readline realtime rss samba scanner sdl session smartcard sna socialweb spell spice sqlite sse sse2 sse4_1 sse4_2 ssl ssse3 startup-notification steamruntime subversion svg symlink systemd tcpd telepathy theora threads tiff tracker truetype udev udisks unicode upnp upower usb v4l vaapi vala vdpau virt-network virtfs vorbis vpx webkit wxwidgets x264 xattr xcb xcomposite xinerama xml xrandr xv xvid zeitgeist zlib zsh-completion" ABI_X86="32 64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="caps crypt lvm" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-64" INPUT_DEVICES="evdev synaptics mouse mutouch" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en pl en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_3" PYTHON_TARGETS="python3_4 python3_3 pypy python2_7" QEMU_SOFTMMU_TARGETS="arm x86_64 i386" QEMU_USER_TARGETS="arm x86_64 i386" RUBY_TARGETS="ruby20 ruby21" SANE_BACKENDS="gt68xx" USERLAND="GNU" VIDEO_CARDS="intel nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC

=================================================================
                        Package Settings
=================================================================

media-libs/gst-plugins-bad-1.2.4-r1 was built with the following:
USE="egl introspection nls orc -vnc" ABI_X86="32 64 -x32"
CFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections"
CXXFLAGS="-O2 -march=native -pipe -ggdb -Wa,--compress-debug-sections"
Comment 1 Pacho Ramos gentoo-dev 2014-10-20 10:04:12 UTC
Not sure if we will need to wrap that header now :/
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-20 17:18:34 UTC
--- 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?
Comment 3 Matt Turner gentoo-dev 2014-10-20 21:20:57 UTC
Created attachment 387088 [details]
Build log
Comment 4 Matt Turner gentoo-dev 2014-10-20 21:22:16 UTC
(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.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-20 21:33:36 UTC
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.
Comment 6 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-20 21:38:41 UTC
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...
Comment 7 Mart Raudsepp gentoo-dev 2014-10-21 07:47:41 UTC
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...
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 11:56:32 UTC
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 :).
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 12:21:33 UTC
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.
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-10-21 14:14:42 UTC
Oh, and this is no longer a multilib issue :).
Comment 11 Pacho Ramos gentoo-dev 2015-02-03 20:35:17 UTC
Can you please recheck with 1.4.5 in the tree to see if we can improve/fix anything more?

Thanks
Comment 12 Mart Raudsepp gentoo-dev 2015-02-04 05:59:35 UTC
gles2 without egl makes zero sense. You can't instantiate gles2 without EGL, I don't think...
Comment 13 Mart Raudsepp gentoo-dev 2015-02-04 06:01:48 UTC
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.
Comment 14 Andrei Slavoiu 2015-02-04 21:33:23 UTC
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".
Comment 15 Andrei Slavoiu 2015-02-04 22:49:46 UTC
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.
Comment 16 Andrei Slavoiu 2015-02-04 23:28:19 UTC
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.
Comment 17 Pacho Ramos gentoo-dev 2015-02-05 08:42:36 UTC
(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
Comment 18 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-15 08:36:08 UTC
*** Bug 540084 has been marked as a duplicate of this bug. ***
Comment 19 Pacho Ramos gentoo-dev 2015-02-15 12:29:27 UTC
+  15 Feb 2015; Pacho Ramos <pacho@gentoo.org> gst-plugins-bad-1.4.5.ebuild:
+  gles2 also collides with opengl (#525936)
+
Comment 20 Michael Palimaka (kensington) gentoo-dev 2015-11-19 16:03:27 UTC
(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?
Comment 21 Pacho Ramos gentoo-dev 2016-02-28 16:23:40 UTC
[master 34904cf] media-libs/gst-plugins-bad: gles2 <-> egl blocker wasn't really needed (#525936#c20)
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 22 Pacho Ramos gentoo-dev 2016-12-14 11:54:55 UTC
*** Bug 602512 has been marked as a duplicate of this bug. ***
Comment 23 Pacho Ramos gentoo-dev 2016-12-14 11:55:26 UTC
This constraint needs to be dropped too:
egl? ( !gles2 )
Comment 24 Pacho Ramos gentoo-dev 2016-12-17 13:27:31 UTC
[master b24a1ed] media-libs/gst-plugins-bad: Drop bogus REQUIRED_USE restraint (#525936, #602512)
 1 file changed, 1 deletion(-)