Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 555186

Summary: x11-apps/mesa-progs-8.2.0 can't build with media-libs/mesa-10.6.2: "error: ‘EGL_SCREEN_BIT_MESA’ undeclared"
Product: Gentoo Linux Reporter: Paolo Pedroni <paolo.pedroni>
Component: Current packagesAssignee: Matt Turner <mattst88>
Status: RESOLVED FIXED    
Severity: normal CC: 1i5t5.duncan, alexander, chutzpah, dschridde+gentoobugs, leonchik1976, mail, ncosmin, rhill, rose, timo, vityokster, x11
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=91020
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: mesa-progs-8.2.0:20150717-105142.log.gz
[untested][upstream bug report patch]Fix build against EGL implementations that don't support the EGL_MESA_screen_surface extension

Description Paolo Pedroni 2015-07-17 10:59:29 UTC
Created attachment 407000 [details]
mesa-progs-8.2.0:20150717-105142.log.gz

As in summary, after emerging media-libs/mesa-10.6.2 I can't manage to build x11-apps/mesa-progs anymore. I get the following error:

eglut_screen.c:38:8: error: unknown type name ‘EGLScreenMESA’
 static EGLScreenMESA kms_screen;
        ^
eglut_screen.c:39:8: error: unknown type name ‘EGLModeMESA’
 static EGLModeMESA kms_mode;
        ^
eglut_screen.c: In function ‘_eglutNativeInitDisplay’:
eglut_screen.c:46:27: error: ‘EGL_SCREEN_BIT_MESA’ undeclared (first use in this function)
    _eglut->surface_type = EGL_SCREEN_BIT_MESA;
                           ^
eglut_screen.c:46:27: note: each undeclared identifier is reported only once for each function it appears in
eglut_screen.c: In function ‘init_kms’:
eglut_screen.c:61:4: error: unknown type name ‘EGLModeMESA’
    EGLModeMESA modes[MAX_MODES];
    ^
eglut_screen.c: In function ‘_eglutNativeInitWindow’:
eglut_screen.c:120:26: warning: assignment makes pointer from integer without a cast
    win->native.u.surface = eglCreateScreenSurfaceMESA(_eglut->dpy,

Last known good mesa was mesa-10.3.4 in december 2014, I have no idea for all the versions in between.

# emerge --info =x11-apps/mesa-progs-8.2.0
Portage 2.2.20 (python 2.7.9-final-0, default/linux/amd64/13.0/desktop, gcc-4.9.3, glibc-2.20-r2, 4.0.5-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.0.5-gentoo-x86_64-AMD_Phenom-tm-_II_X4_965_Processor-with-gentoo-2.2
KiB Mem:    12275644 total,   8971964 free
KiB Swap:    8380412 total,   8380412 free
Timestamp of repository gentoo: Thu, 16 Jul 2015 05:15:01 +0000
sh dash 0.5.8.2
ld GNU gold (Gentoo 2.25 p1.2 2.25) 1.11
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.22.0::gentoo
dev-lang/python:          2.7.9-r1::gentoo, 3.4.2::gentoo
dev-util/ccache:          3.1.9-r4::gentoo
dev-util/cmake:           3.2.2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.17::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.11.6-r1::gentoo, 1.14.1::gentoo
sys-devel/binutils:       2.25-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo
sys-devel/gcc-config:     1.7.3::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 3.18::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000

kde
    location: /var/lib/layman/kde
    sync-type: git
    sync-uri: git://anongit.gentoo.org/proj/kde.git
    masters: gentoo kde
    priority: 0

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 1

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=amdfam10 -msahf -mlzcnt -mpopcnt --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -flto=5 -fuse-linker-plugin -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
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"
CXXFLAGS="-O2 -pipe -march=amdfam10 -msahf -mlzcnt -mpopcnt --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -flto=5 -fuse-linker-plugin -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going y --with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs cgroup compress-build-logs config-protect-if-modified distcc distlocks ebuild-locks ipc-sandbox merge-sync news parallel-fetch protect-owned sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/ http://ftp.halifax.rwth-aachen.de/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -flto=5 -fuse-linker-plugin -floop-interchange -floop-strip-mine -floop-block -fgraphite-identity"
MAKEOPTS="-j12"
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"
USE="3dnow X a52 aac aalib acl acpi alsa amd64 ao audiofile bash-completion bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus dga djvu dri dts dvd dvdr emboss encode exif expat fbcon ffmpeg fftw flac fontconfig fortran ftp gd gdbm gif glamor gmp gnutls gpm graphviz gstreamer gtk iconv icu idn ieee1394 imagemagick imlib inotify introspection ipv6 java javascript jbig jpeg jpeg2k kde lame lcms libass libcaca libnotify libsamplerate lm_sensors lua lzma lzo mad mmap mmx mmxext mng modules mp3 mp4 mpeg mplayer multilib musicbrainz ncurses nls nptl nsplugin offensive ogg openal openexr opengl openmp pam pango pcre pdf png policykit postscript ppds pulseaudio qt3support qt4 rdesktop readline sdl session smartcard sndfile speex spell sqlite sse sse2 ssl startup-notification svg symlink syslog systemd taglib theora threads tiff truetype udev udisks unicode upower usb vaapi vcd vdpau vim-syntax vorbis wavpack wayland win32codecs wmf wxwidgets x264 xattr xcb xcomposite xine xinerama xml xpm xscreensaver xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel virmidi" 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="kodak ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="gnutls" 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" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver" LINGUAS="it it_IT" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 pypy pypy3" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

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

x11-apps/mesa-progs-8.2.0::gentoo was built with the following:
USE="egl gles1 gles2" ABI_X86="64"

# emerge -1pqv =x11-apps/mesa-progs-8.2.0
[ebuild   R   ] x11-apps/mesa-progs-8.2.0  USE="egl gles1 gles2"
Comment 1 Scott Jones 2015-07-17 16:48:08 UTC
I can confirm this too.  The only way I can get mesa-progs-8.2.0 to build now is with USE="-egl".
Comment 2 Paolo Pedroni 2015-07-17 16:49:36 UTC
(In reply to Scott Jones from comment #1)
> I can confirm this too.  The only way I can get mesa-progs-8.2.0 to build
> now is with USE="-egl".

Yep, and that means losing some functionality.
Comment 3 Mario Bachmann 2015-07-17 17:12:56 UTC
I can confirm the bug. 
Same here on a AMD Athlon 5350 (Kabini) with Radeon 8400.
Comment 4 Duncan 2015-07-18 17:00:03 UTC
Seeing it here, too. =:^( CCing.
Comment 5 Juergen Rose 2015-07-20 10:53:47 UTC
The same for me.
Comment 6 Cosmin Giradu 2015-07-21 06:55:50 UTC
Same result with mesa-progs-9999
Comment 7 Jeremi Piotrowski 2015-07-23 23:37:49 UTC
Created attachment 407492 [details, diff]
[untested][upstream bug report patch]Fix build against EGL implementations that don't support the EGL_MESA_screen_surface extension

This is a link to the upstream bug report:

https://bugs.freedesktop.org/attachment.cgi?id=117106

Apparently this `EGL_MESA_screen_surface` stuff was never actually implemented, so it was finally removed in May.

I am attaching the patch from the upstream bug report, I can't test it myself as I'm sitting on stable mesa-10.3.7.
Comment 8 Jeremi Piotrowski 2015-07-23 23:39:00 UTC
Wrong link, here is the bug report:

https://bugs.freedesktop.org/show_bug.cgi?id=91020
Comment 9 timemars 2015-08-05 05:10:01 UTC
(In reply to Jeremi Piotrowski from comment #7)
> Created attachment 407492 [details, diff] [details, diff]
> [untested][upstream bug report patch]Fix build against EGL implementations
> that don't support the EGL_MESA_screen_surface extension
> 
> This is a link to the upstream bug report:
> 
> https://bugs.freedesktop.org/attachment.cgi?id=117106
> 
> Apparently this `EGL_MESA_screen_surface` stuff was never actually
> implemented, so it was finally removed in May.
> 
> I am attaching the patch from the upstream bug report, I can't test it
> myself as I'm sitting on stable mesa-10.3.7.

Thanks. The patch works, except that file src/egl/opengl/eglscreen.c did not exist so I skipped it, and the package compiled successfully.
Comment 10 Matt Turner gentoo-dev 2015-08-28 23:54:47 UTC
Turns out the programs that these compile failures were coming from weren't useful anyway, so I removed them.
Comment 11 Paolo Pedroni 2015-08-29 13:03:25 UTC
Nope, still failing. Can't post log ATM, but it'still failing if patch is not applied. :(
Comment 12 Matt Turner gentoo-dev 2015-08-29 17:47:42 UTC
Indeed, you're right. There's more that I didn't spot.

I've added a patch now. Hopefully all fixed this time. :)
Comment 13 Matt Turner gentoo-dev 2015-08-29 17:48:00 UTC
commit ae997dc2325c0b74ad1c9b6ee8542d44354c60b4
Author: Matt Turner <mattst88@gentoo.org>
Date:   Sat Aug 29 10:49:52 2015 -0700

    x11-apps/mesa-progs: Patch out more of EGL_MESA_screen_surface.
    
    Bug: https://bugs.gentoo.org/555186
Comment 14 Juergen Rose 2015-08-29 19:08:44 UTC
(In reply to Matt Turner from comment #12)
> Indeed, you're right. There's more that I didn't spot.
> 
> I've added a patch now. Hopefully all fixed this time. :)

Where is the patch?
Comment 15 Matt Turner gentoo-dev 2015-08-29 19:16:09 UTC
(In reply to Juergen Rose from comment #14)
> (In reply to Matt Turner from comment #12)
> > Indeed, you're right. There's more that I didn't spot.
> > 
> > I've added a patch now. Hopefully all fixed this time. :)
> 
> Where is the patch?

That's a strange question. I provided the SHA1 of the commit. In any case, here's a URL to it:

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae997dc2325c0b74ad1c9b6ee8542d44354c60b4
Comment 16 Matt Turner gentoo-dev 2015-08-29 21:22:23 UTC
*** Bug 559126 has been marked as a duplicate of this bug. ***