Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 663642 - media-libs/mesa-18.2.0_rc2: USE=-egl is broken
Summary: media-libs/mesa-18.2.0_rc2: USE=-egl is broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo X packagers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-14 22:51 UTC by Alexander Tsoy
Modified: 2018-08-30 17:50 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Tsoy 2018-08-14 22:51:16 UTC
The following logic in ebuild is incorrect:

    if use egl; then
        emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
    fi


If "platforms" value is not defined, all supported platforms are automatically enabled, because the default value of platforms is ['auto']. For example with USE="-vulkan -egl":

  ...
  Program wayland-scanner found: NO
                                   
  meson.build:1276:2: ERROR:  Program(s) ['wayland-scanner'] not found or not executable


Also platforms is not egl-only thing. It should contain at least "x11", as required by GLX. For example If I pass "-Dplatforms=" to meson:

  ...
  meson.build:328:4: ERROR:  Problem encountered: Cannot build GLX support without X11 platform support and at least one OpenGL API
Comment 1 Alexander Tsoy 2018-08-14 23:18:03 UTC
With the following patch I can build mesa with USE=-egl:

@@ -293,6 +291,8 @@
 
 	if use egl; then
 		emesonargs+=( -Dplatforms=x11,surfaceless$(use wayland && echo ",wayland")$(use gbm && echo ",drm") )
+	else
+		emesonargs+=( -Dplatforms=x11 )
 	fi
 
 	if use gallium; then
Comment 2 Matt Turner gentoo-dev 2018-08-30 16:58:01 UTC
Ah, thank you. Yes, this flag used to be called --with-egl-platforms= and was changed. I will confirm your patch is correct and then apply it.
Comment 3 Matt Turner gentoo-dev 2018-08-30 17:49:50 UTC
Actually, I think we just want to pass -Dplatforms= unconditionally.
Comment 4 Larry the Git Cow gentoo-dev 2018-08-30 17:50:00 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=462b00b1b5a789c26f48530ef3302c7e97fa4b94

commit 462b00b1b5a789c26f48530ef3302c7e97fa4b94
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2018-08-30 17:39:23 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2018-08-30 17:49:40 +0000

    media-libs/mesa: Unconditionally pass -Dplatforms=...
    
    Closes: https://bugs.gentoo.org/663642

 media-libs/mesa/mesa-9999.ebuild | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)