Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608858 - media-video/mpv-0.23.0-r1[opengl] wrongly requires [X] or [aqua]
Summary: media-video/mpv-0.23.0-r1[opengl] wrongly requires [X] or [aqua]
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Coacher
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-10 10:57 UTC by Cedric Sodhi
Modified: 2017-05-01 18:20 UTC (History)
3 users (show)

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 Cedric Sodhi 2017-02-10 10:57:13 UTC
This seems to have been introduced in the 0.23.0. Now the "opengl" USE flag requires either "X" or "aqua" although neither are required with Wayland. Meanwhile, the USE="egl -opengl" compiles OpenGL support anyway.
Comment 1 Coacher 2017-02-10 13:05:37 UTC
Both 'egl' and 'opengl' USE flags provide an opengl video output, which has several backends. Wayland backend works via EGL. 'opengl' USE flag means "give me an opengl backend that works without having EGL enabled" and these are X11/GLX and Cocoa (USE=aqua) for X11 and Mac OS X platforms respectively.

opengl USE requirements that you are talking about were incorrectly dropped around 0.16.0 by me and are now reinstated in 0.23.0.
Thanks for the report, but this is not a bug.
Comment 2 Cedric Sodhi 2017-02-10 18:03:33 UTC
I think this doesn't make sense. USE=opengl normally and sensibly means "I want opengl support", an additional egl USE-flag then signifies "I want EGL support" (possibly exlcuding GLX support).

Having USE="-opengl +egl" signify "I want OpenGL support" seems wrong. I suggest this is changed according what is customary in the rest of portage.
Comment 3 Coacher 2017-02-10 22:06:32 UTC
(In reply to Cedric Sodhi from comment #2)
> I think this doesn't make sense. USE=opengl normally and sensibly means "I
> want opengl support", an additional egl USE-flag then signifies "I want EGL
> support" (possibly exlcuding GLX support).
opengl USE gives you GLX/CGL backends that use an OpenGL context, egl USE gives you EGL backends that use an EGL context. Hence ebuild gives you those features that you explicitly requested. This looks normally and sensibly IMO.

Since OpenGL and EGL backends are independent, I don't see why opengl USE should be an artificial prerequisite for egl USE. By making egl USE exclude GLX support you artificially reduce the number of available configurations.

 
> Having USE="-opengl +egl" signify "I want OpenGL support" seems wrong.
Because you are mistaken. It signifies "I only want EGL support" and provides just that. EGL is not a subset of OpenGL.


> suggest this is changed according what is customary in the rest of portage.
I believe you are mistaken again. I've looked through most recent ebuilds of all packages in the current Gentoo tree that have both opengl and egl USEs:
dev-libs/DirectFB
dev-libs/efl
kde-plasma/kinfocenter
media-libs/gst-plugins-bad
media-plugins/gst-plugins-vaapi
media-video/mpv
net-libs/webkit-gtk
www-plugins/gnash
x11-libs/libva

In all these packages, except for kinfocenter, opengl and egl USE flags allow independent control of OpenGL and EGL. In a couple of cases opengl USE pulls X11 stuff, too. Though DirectFB has a weird dep with opengl, egl, gles2 all thrown together. Not sure about this one.
Comment 4 Coacher 2017-02-10 22:12:12 UTC
Look, I understand that you are frustrated because USE flags enabled by default pull X11 stuff on Wayland systems. Sorry, but unless Gentoo provides an ability to explicitly target Wayland systems in profiles/ or Wayland becomes mainstream, I will continue prioritize X11 systems.

Wayland users are skilful enough to understand what portage says to them and adjust their package.use accordingly.
Comment 5 Coacher 2017-02-10 22:18:53 UTC
(In reply to Coacher from comment #4)
> Look, I understand that you are frustrated because USE flags enabled by
> default pull X11 stuff on Wayland systems. Sorry, but unless Gentoo provides
> an ability to explicitly target Wayland systems in profiles/ or Wayland
> becomes mainstream, I will continue prioritize X11 systems.
This is also what desktop profiles do anyway.
Comment 6 Cedric Sodhi 2017-02-11 09:44:13 UTC
I think there are a few packages which suffer from weird or wrong opengl/egl/gles USE flag combos. See for example bug 602512 and references therein. The confusion, as I see it, comes from the ambiguity of "OpenGL" which can either mean *just* OpenGL or *full* OpenGL. However, I don't see how you can say EGL and OpenGL backends are independent. EGL (like GLX and WGL) is the windowing system specific calls for managing OpenGL contexts. Therefore, EGL implies the use of OpenGL and is indeed a subset of the latter!

You may be referrering to the distinction between "full OpenGL" and "GLES" which are two independend (in a sense) GL implementations.
Comment 7 Coacher 2017-02-12 18:42:08 UTC
(In reply to Cedric Sodhi from comment #6)
> I think there are a few packages which suffer from weird or wrong
> opengl/egl/gles USE flag combos. See for example bug 602512 and references
> therein. The confusion, as I see it, comes from the ambiguity of "OpenGL"
> which can either mean *just* OpenGL or *full* OpenGL.
What are "just OpenGL" and "full OpenGL"?

> However, I don't see
> how you can say EGL and OpenGL backends are independent. EGL (like GLX and
> WGL) is the windowing system specific calls for managing OpenGL contexts.
> Therefore, EGL implies the use of OpenGL and is indeed a subset of the
> latter!
> 
> You may be referrering to the distinction between "full OpenGL" and "GLES"
> which are two independend (in a sense) GL implementations.
Sorry, this is incorrect.

Does a proper OpenGL API spec implementation need to implement EGL API spec?
No.
Can an OpenGL application function without EGL support from underlying system?
Yes.
Thus EGL is not a subset of OpenGL. That's it.

Does a proper EGL API spec implementation need to implement OpenGL API spec?
No.
Can an EGL application function without OpenGL support from underlying system?
Yes, if the application supports client APIs other that OpenGL, e.g. GLES.
Thus EGL doesn't always imply the use of OpenGL, since GLES < OpenGL.

Does mpv EGL code supports client APIs other than OpenGL?
Yes, mpv can use GLES and the choice is made at runtime.
Thus OpenGL is not a requirement for EGL backends in mpv.
Comment 8 Cedric Sodhi 2017-02-12 19:26:02 UTC
"Full OpenGL" as in "Full OpenGL" (aka Desktop GL) vs. "GLES". From what you explained I understand by OpenGL it is here meant "Full OpenGL". I guess then yes, it makes indeed sense to speak of "+egl -opengl" if we thereby mean for instance EGL and GLES. Thanks for the clarification.
Comment 9 Coacher 2017-02-12 19:37:34 UTC
(In reply to Cedric Sodhi from comment #8)
> "Full OpenGL" as in "Full OpenGL" (aka Desktop GL) vs. "GLES". From what you
> explained I understand by OpenGL it is here meant "Full OpenGL". I guess
> then yes, it makes indeed sense to speak of "+egl -opengl" if we thereby
> mean for instance EGL and GLES. Thanks for the clarification.
Glad to hear this. Thanks for the bug, it's a good one.
Please report any other suggestions you have (in separate bugs though).
Comment 10 Coacher 2017-05-01 18:20:35 UTC
Since 0.25.0 the 'opengl' USE is mapped to the 'opengl' video output.
This should simplify things for you and other wayland users as the default set of USE flags no longer explicitly pulls X11.
Please track https://github.com/gentoo/gentoo/pull/4510