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

Bug 563626

Summary: dev-qt/qtgui-5.5.1 Complex plasma5/kde5/qt5 USE=egl/gles2/opengl knot forming around qtgui
Product: Gentoo Linux Reporter: Duncan <1i5t5.duncan>
Component: [OLD] KDEAssignee: Gentoo KDE team <kde>
Status: RESOLVED FIXED    
Severity: normal CC: kripton, martijn.schmidt, orzel
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=525936
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 565588    
Bug Blocks:    

Description Duncan 2015-10-21 05:58:44 UTC
With the recent USE flag changes in qt-5.5.1, the forming Gordian knot around the egl/gles2/opengl USE flags seems to have gotten rather worse, to the point that I'm having trouble solving it here, and if I can't easily solve it with the advanced stuff I do with portage, I don't have a clue how ordinary users are going to deal with it.

And I don't really have a clue how best to setup this bug report, either.  If I did, I'd probably have figured it out myself by now and wouldn't be filing it.  So apologies for the scattershot presentation, here. =8^0

While I use a no-multilib profile, I've been looking at the desktop/plasma profile for hints as well, and that's not helping but to tie the knot even tighter.  Of course the plasma profile sets USE=qml, while its desktop profile parent sets USE=opengl, so at least those are defaulted on.

Also, kwin:5 wants at least local USE=egl for mesa, based on the plasma-profile package.use.


First, the two conflicting deps that sprung the trap, with my previous USE flags of egl,-gles2,opengl,qml...

kde-frameworks/plasma-5.15.0 has this:

egl? (media-libs/mesa[egl] )
opengl? (
        dev-qt/qtgui:5[opengl(+),-gles2]
        ...
)


That -gles2 is the tough one to get, because this conflicts:

dev-qt/qtmultimedia-5.5.1 (newly added dep):

qml? (
        ...
        egl? ( >=dev-qt/qtgui-${PV}:5[egl,gles2] )
        !egl? ( >=dev-qt/qtgui-${PV}:5[-egl] )
        ...
)

qml is set by the plasma profile (and I think required), so it'll want gles2 if egl is on for qtgui, from qtmultimedia.  opengl is set by the desktop profile, and it'll trigger the qtgui opengl,-gles2, in plasma, for the same qtgui.  So at least with egl set, one requires qtgui -gles2, while the other requires qtgui +gles2.

Meanwhile, egl is showing up all sorts of places now, and is even required by kwin:5.  It doesn't seem to be set globally in the profile yet, but that seems to be where things are headed, and certainly some users will be seeing that trend and trying to set it, as I have.

Oh, and kde-plasma/kwin-5.4.2 also has an involved qtgui dep:

dev-qt/qtgui:5[gles2=,opengl(+)]

And dev-qt/qtopengl has this:

~dev-qt/qtgui-${PV}[gles2=]
~dev-qt/qtwidgets-${PV}[gles2=]

And dev-qt/qtquick1 has:

opengl? (
        >=dev-qt/qtgui-${PV}:5[gles2=]
        >=dev-qt/qtopengl-${PV}:5
)

Of course the easiest fix for all this, given all these positive use-deps, would be if the kde-frameworks/plasma opengl-conditional dep on -gles2 was a typo, and that was supposed to be a positive gles2 or gles2=, like most of the other deps seem to be.

If plasma's -gles2 dep is correct, however, we have an problem.  Mask and/or recommend on the wiki's plasma page not to set USE=egl globally?  Package.use it off for qtmultimedia:5 and qtgui:5, thereby killing qtmultimedia:5's +gles2 requirement?

Maybe something else?

Right now, some indication of whether it's reasonable to start unsetting USE=opengl and setting USE=egl globally, in kde/plasma terms, and what about gles2, in addition to some solution to the immediate plasma wants qtgui:5 -gles2 while most everything else wants gles2 set, Gordian knot, would be useful.

Again, for most folks I imagine putting the settings in the plasma profile would work, and for me they'd at least give me a hint.  Then, for specifically hard knots like this one, something on the wiki's kde/plasma5-upgrade page, which seems to have the most detailed gentoo-specific plasma5 info at the moment, would be useful.

https://wiki.gentoo.org/wiki/KDE/Plasma_5_upgrade

Thanks.
Comment 1 Andreas Sturmlechner gentoo-dev 2015-10-21 10:47:17 UTC
Do this:

kde-frameworks/plasma -opengl
kde-plasma/kwin gles2
dev-qt/* gles2
Comment 2 Michael Palimaka (kensington) gentoo-dev 2015-10-21 12:06:31 UTC
I pushed this change to try and address this behaviour: https://gitweb.gentoo.org/proj/kde.git/commit/?id=15c417c8f8765fd1802f425d07253e597132e9b1
Comment 3 Thomas Capricelli 2015-10-22 16:52:01 UTC
This doesn't work here :-(

All my computers are now blocked because of this. I remember there was some problems related to egl/gles2/opengl few months ago, the nightmare is back it seems.
Comment 4 Michael Palimaka (kensington) gentoo-dev 2015-10-22 16:53:29 UTC
(In reply to Thomas Capricelli from comment #3)
> This doesn't work here :-(
> 
> All my computers are now blocked because of this. I remember there was some
> problems related to egl/gles2/opengl few months ago, the nightmare is back
> it seems.

Can you please add the portage output after rebuilding kde-frameworks/plasma with USE="-opengl" ?
Comment 5 Thomas Capricelli 2015-10-22 17:10:28 UTC
emerging kde-frameworks/plasma with USE="X egl -debug -doc -opengl {-test}"
fails with :

[100%] Linking CXX shared library libcorebindingsplugin.so
cd /tmp/portage/kde-frameworks/plasma-5.15.0/work/plasma-5.15.0_build/src/declarativeimports/core && /usr/bin/cmake -E cmake_link_script CMakeFiles/corebindingsplugin.dir/link.txt --verbose=1
/usr/bin/x86_64-pc-linux-gnu-g++  -fPIC -march=native -pipe -O2  -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -std=c++0x -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -pedantic -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--enable-new-dtags -Wl,--no-undefined -Wl,--fatal-warnings -Wl,--enable-new-dtags  -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname,libcorebindingsplugin.so -o libcorebindingsplugin.so CMakeFiles/corebindingsplugin.dir/corebindingsplugin.cpp.o CMakeFiles/corebindingsplugin.dir/colorscope.cpp.o CMakeFiles/corebindingsplugin.dir/datamodel.cpp.o CMakeFiles/corebindingsplugin.dir/datasource.cpp.o CMakeFiles/corebindingsplugin.dir/svgitem.cpp.o CMakeFiles/corebindingsplugin.dir/fadingnode.cpp.o CMakeFiles/corebindingsplugin.dir/framesvgitem.cpp.o CMakeFiles/corebindingsplugin.dir/quicktheme.cpp.o CMakeFiles/corebindingsplugin.dir/tooltip.cpp.o CMakeFiles/corebindingsplugin.dir/tooltipdialog.cpp.o CMakeFiles/corebindingsplugin.dir/serviceoperationstatus.cpp.o CMakeFiles/corebindingsplugin.dir/dataenginebindings.cpp.o CMakeFiles/corebindingsplugin.dir/iconitem.cpp.o CMakeFiles/corebindingsplugin.dir/units.cpp.o CMakeFiles/corebindingsplugin.dir/windowthumbnail.cpp.o CMakeFiles/corebindingsplugin.dir/corebindingsplugin_automoc.cpp.o /usr/lib64/libQt5Script.so.5.5.0 ../../plasmaquick/libKF5PlasmaQuick.so.5.15.0 /usr/lib64/libKF5QuickAddons.so.5.15.0 -lSM -lICE -lX11 -lXext -lxcb -lxcb-damage -lxcb-composite -lxcb-shape /usr/lib64/libEGL.so ../../plasma/libKF5Plasma.so.5.15.0 /usr/lib64/libKF5Declarative.so.5.15.0 /usr/lib64/libQt5Quick.so.5.5.0 /usr/lib64/libQt5Qml.so.5.5.0 /usr/lib64/libKF5Package.so.5.15.0 /usr/lib64/libKF5Service.so.5.15.0 /usr/lib64/libKF5IconThemes.so.5.15.0 /usr/lib64/libKF5WindowSystem.so.5.15.0 /usr/lib64/libQt5Network.so.5.5.0 /usr/lib64/libKF5ConfigCore.so.5.15.0 /usr/lib64/libKF5CoreAddons.so.5.15.0 /usr/lib64/libQt5X11Extras.so.5.5.0 /usr/lib64/libQt5Widgets.so.5.5.0 /usr/lib64/libQt5Gui.so.5.5.0 /usr/lib64/libQt5Core.so.5.5.0 -Wl,-rpath,/tmp/portage/kde-frameworks/plasma-5.15.0/work/plasma-5.15.0_build/src/plasmaquick:/tmp/portage/kde-frameworks/plasma-5.15.0/work/plasma-5.15.0_build/src/plasma: 
CMakeFiles/corebindingsplugin.dir/windowthumbnail.cpp.o: nella funzione "Plasma::WindowThumbnail::discardPixmap() [clone .part.17]":
windowthumbnail.cpp:(.text+0x11a): riferimento non definito a "glDeleteTextures"
CMakeFiles/corebindingsplugin.dir/windowthumbnail.cpp.o: nella funzione "Plasma::WindowThumbnail::xcbWindowToTextureEGL(Plasma::WindowTextureNode*)":
windowthumbnail.cpp:(.text+0x1102): riferimento non definito a "glGenTextures"
collect2: error: ld returned 1 exit status
src/declarativeimports/core/CMakeFiles/corebindingsplugin.dir/build.make:493: set di istruzioni per l'obiettivo "src/declarativeimports/core/libcorebindingsplugin.so" non riuscito
make[2]: *** [src/declarativeimports/core/libcorebindingsplugin.so] Errore 1
make[2]: uscita dalla directory "/var/tmp/portage/kde-frameworks/plasma-5.15.0/work/plasma-5.15.0_build"
CMakeFiles/Makefile2:574: set di istruzioni per l'obiettivo "src/declarativeimports/core/CMakeFiles/corebindingsplugin.dir/all" non riuscito
make[1]: *** [src/declarativeimports/core/CMakeFiles/corebindingsplugin.dir/all] Errore 2
make[1]: uscita dalla directory "/var/tmp/portage/kde-frameworks/plasma-5.15.0/work/plasma-5.15.0_build"
Makefile:127: set di istruzioni per l'obiettivo "all" non riuscito
make: *** [all] Errore 2
Comment 6 Michael Palimaka (kensington) gentoo-dev 2015-10-22 17:15:33 UTC
Could you please add the output of emerge -pv qtopengl qtgui mesa ?
Comment 7 Michael Palimaka (kensington) gentoo-dev 2015-10-24 16:54:16 UTC
kde-frameworks/plasma-5.15.0-r1 is in the tree now, which will hopefully help avoid the conflict.
Comment 8 Thomas Capricelli 2015-11-10 16:54:02 UTC
How can we test it ?

Whatever I do, 'emerge' waits for a very long time before outputting dozens of pages of stuff i really cannot understand (and i'm used to "common" gentoo breakages).

I have stuff in /etc/portage that once was helpful to fix Qt problems, such as:
package.use/kde
kde-plasma/kwin gles2
dev-qt/* gles2

package.use/xorg
media-libs/mesa gles2

But i'm afraid of removing them (they once were useful!).  What's the normal, recommended setup to be able to get Qt (4 and 5) ?
Comment 9 Thomas Capricelli 2015-11-10 16:55:23 UTC
I have this too, should i keep it ?

package.use/kde : kde-frameworks/plasma -opengl
Comment 10 Michael Palimaka (kensington) gentoo-dev 2015-11-10 17:04:08 UTC
(In reply to Thomas Capricelli from comment #9)
> I have this too, should i keep it ?
> 
> package.use/kde : kde-frameworks/plasma -opengl

This is no longer necessary, as that package had its USE flags changed to bring it into line with Qt. This was (as far as I understand) the main cause of conflicts.

If conflicts persist, please add some portage output so we can try to address them.
Comment 11 Thomas Capricelli 2015-11-10 19:15:00 UTC
What about global flags ? Should/Must I set/unset stuff like "egl", "opengl", gles", "gles2" ??
Currently i have "opengl" and "egl" in my make.conf.

I guess some are required by wayland/weston.
For example weston requires mesa[gles2].


Examples of current problems:

% emerge -u1ND `qlist -ICS "dev-qt/*" | grep :5` ; date

emerge: there are no ebuilds built with USE flags to satisfy ">=dev-qt/qtgui-5.5.1:5[egl,gles2]".
!!! One of the following packages is required to complete your request:
- dev-qt/qtgui-5.5.1::gentoo (Change USE: +gles2)
(dependency required by "dev-qt/qtmultimedia-5.5.1::gentoo[qml,egl]" [ebuild])
(dependency required by "dev-qt/qtwebkit-5.5.1::gentoo[multimedia]" [installed])
(dependency required by "dev-qt/qtwebkit:5" [argument])
Comment 12 Thomas Capricelli 2015-11-10 19:17:55 UTC
If i remove the global "egl" flag, i got stuff like this :


orzel@berlioz orzel/share/help% emerge -u1ND `qlist -ICS "dev-qt/*" | grep :5` ; date

!!! The ebuild selected to satisfy "media-libs/gst-plugins-bad:1.0" has unmet requirements.
- media-libs/gst-plugins-bad-1.6.1-r1::gentoo USE="X introspection nls opengl orc vnc wayland -egl -gles2 -gtk -test" ABI_X86="64 -32 -x32"

  The following REQUIRED_USE flag constraints are unsatisfied:
    wayland? ( egl )

  The above constraints are a subset of the following complete expression:
    egl? ( !gles2 ) gles2? ( !egl !opengl ) opengl? ( X ) wayland? ( egl )

(dependency required by "dev-qt/qtmultimedia-5.5.1::gentoo[gstreamer]" [ebuild])
(dependency required by "dev-qt/qtwebkit-5.5.1::gentoo[multimedia]" [installed])
(dependency required by "dev-qt/qtwebkit:5" [argument])
mar 10 nov 2015, 20.17.04, CET
Comment 13 Thomas Capricelli 2015-11-11 20:49:39 UTC
I've spent time today trying to fix my system, but i'm still lost. I've "narrowed" the problem more or less to this, which is the shortest i manage to get :


orzel@berlioz /etc/portage% emerge -1 dev-qt/qtmultimedia:5
[ebuild  N    ] dev-qt/qtmultimedia-5.5.1  USE="alsa egl gstreamer qml widgets -debug -gstreamer010 -openal -pulseaudio {-test}" 
[ebuild  N    ]  dev-qt/qtdeclarative-5.5.1  USE="jit widgets xml -debug -gles2 -localstorage {-test}" 
[ebuild  N    ]  dev-qt/qtopengl-5.5.1  USE="-debug -gles2 {-test}" 
[ebuild   R   ]  dev-qt/qtgui-5.5.1  USE="accessibility dbus egl evdev gif gles2* jpeg png udev xcb -debug -eglfs -gtkstyle -ibus -libinput {-test} -tslib -tuio" 

!!! Multiple package instances within a single package slot have been pulled
!!! into the dependency graph, resulting in a slot conflict:

dev-qt/qtgui:5

  (dev-qt/qtgui-5.5.1:5/5::gentoo, ebuild scheduled for merge) pulled in by
    >=dev-qt/qtgui-5.5.1:5[egl,gles2] required by (dev-qt/qtmultimedia-5.5.1:5/5::gentoo, ebuild scheduled for merge)
                               ^^^^^                                                                                                                     

  (dev-qt/qtgui-5.5.1:5/5::gentoo, installed) pulled in by
    ~dev-qt/qtgui-5.5.1[gles2=,gtkstyle=,png=,xcb?] required by (dev-qt/qtwidgets-5.5.1:5/5::gentoo, installed)
                        ^^^^^^                                                                                                                     
    ~dev-qt/qtgui-5.5.1[gles2=] required by (dev-qt/qtopengl-5.5.1:5/5::gentoo, ebuild scheduled for merge)
                        ^^^^^^                                                                                                                 
    >=dev-qt/qtgui-5.5.1:5[gles2=] required by (dev-qt/qtdeclarative-5.5.1:5/5::gentoo, ebuild scheduled for merge)
                           ^^^^^^                                                                                                                      
    ~dev-qt/qtgui-5.5.1[gles2=] required by (dev-qt/qtprintsupport-5.5.1:5/5::gentoo, installed)
                        ^^^^^^                                                                                                      



The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by dev-qt/qtmultimedia-5.5.1::gentoo[qml,egl]
# required by dev-qt/qtmultimedia:5 (argument)
>=dev-qt/qtgui-5.5.1 gles2
Comment 14 Michael Palimaka (kensington) gentoo-dev 2015-11-12 11:01:25 UTC
Thanks for the feedback. I'll look into how we can improve handling of those cases.
Comment 15 Martijn Schmidt 2016-01-10 16:27:31 UTC
I just wanted to leave my own experiences with this knot here, hopefully it'll be helpful to any other users that encounter it.

1) For some stupid reason I had enabled USE=egl in make.conf in the past. This caused many packages from the dev-qt category to be pulled in with a USE=gles2 requirement and also forced me to enable USE=gles2 for kde-plasma/kwin.

2) I'm using the proprietary nvidia-drivers and these don't have proper support for EGL, hence after successfully compiling with the USE flag changes suggested by Andreas my kwin_x11 would no longer start: https://devtalk.nvidia.com/default/topic/873253/355-11-driver-kwin_x11-fails-to-enable-compositing-with-egl/?offset=11

3) After some troubleshooting I found the erroneously set USE=egl mentioned in point 1 and removed it from my make.conf, now I could also set a system-wide USE=-gles2 and recompile world with full OpenGL support (and without encountering the knot).

While this is probably an EBKAC it might be a nice addition to echo a warning to the terminal if you are emerging kde-plasma/kwin with gles2 USE flag enabled while nvidia-drivers is also installed on your system.
Comment 16 Andreas Sturmlechner gentoo-dev 2016-01-10 17:25:57 UTC
(In reply to Martijn Schmidt from comment #15)
> 2) I'm using the proprietary nvidia-drivers and these don't have proper
> support for EGL, hence after successfully compiling with the USE flag
> changes suggested by Andreas my kwin_x11 would no longer start:
> https://devtalk.nvidia.com/default/topic/873253/355-11-driver-kwin_x11-fails-
> to-enable-compositing-with-egl/?offset=11

These use flag settings are outdated for some time, but my recommendation wasn't meant for nvidia-drivers without proper EGL support in the first place. ;)
Comment 17 Michael Palimaka (kensington) gentoo-dev 2016-01-14 17:47:52 UTC
With bug #565588 fixed I think that's everything on the KDE/Qt side fixed.