Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 810343 - dev-qt/qtwayland-5.15.2-r1 w/ >=media-libs/libglvnd-1.3.4: ERROR: Feature 'xcomposite-egl' was enabled, but the pre-condition 'features.wayland-client && ...' failed.)
Summary: dev-qt/qtwayland-5.15.2-r1 w/ >=media-libs/libglvnd-1.3.4: ERROR: Feature 'xc...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PullRequest, UPSTREAM
Depends on: 806797
Blocks:
  Show dependency tree
 
Reported: 2021-08-25 16:06 UTC by Austin Kilgore
Modified: 2022-07-03 07:16 UTC (History)
33 users (show)

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


Attachments
build.log (build.log,4.86 KB, text/plain)
2021-08-25 16:06 UTC, Austin Kilgore
Details
config.log (config.log,24.07 KB, text/plain)
2021-08-25 17:26 UTC, Flávio Albuquerque Camilo
Details
config.log (config.log,21.14 KB, text/x-log)
2021-08-25 18:27 UTC, Austin Kilgore
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Austin Kilgore 2021-08-25 16:06:01 UTC
I've got a new laptop I'm fresh installing Gentoo on and when I went to emerge plasma-meta and kde-apps-meta it fails on this package.

Reproducible: Always

Steps to Reproduce:
emerge the package
Actual Results:  
it fails to compile

Expected Results:  
should build fine on default plasma desktop profile

Portage 3.0.22 (python 3.9.6-final-0, default/linux/amd64/17.1/no-multilib, gcc-10.3.0, glibc-2.33-r7, 5.13.12-gentoo-dist x86_64)
=================================================================
System uname: Linux-5.13.12-gentoo-dist-x86_64-AMD_Ryzen_9_5900HS_with_Radeon_Graphics-with-glibc2.33
KiB Mem:    15778276 total,  12183892 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Wed, 25 Aug 2021 12:51:32 +0000
Head commit of repository gentoo: d93129121913991c76ded4fe5ba213439d610fa5

sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p5) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-lang/perl:            5.34.0-r2::gentoo
dev-lang/python:          2.7.18_p11::gentoo, 3.9.6_p1::gentoo, 3.10.0_rc1_p1::gentoo
dev-lang/rust:            1.54.0::gentoo
dev-util/cmake:           3.21.1::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.43.5::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.3-r1::gentoo
sys-devel/binutils:       2.36.1-r2::gentoo
sys-devel/gcc:            10.3.0-r2::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.33-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo
    priority: -1000
    sync-git-verify-commit-signature: true

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /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"
CXXFLAGS="-march=native -O3 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS=" --with-bdeps y --complete-graph y"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=native -O3 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O3 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j16"
PKGDIR="/var/cache/binpkgs"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 asm bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus declarative dri dts dvd dvdr elogind emboss encode exif flac fortran gdbm gif gold gpm gtk gui iconv icu ipv6 jpeg kde kipi kwallet lcms libglvnd libnotify libtirpc lto mad mng mp3 mp4 mpeg ncurses nls nptl ogg opengl openmp pam pango pcre pdf pgo phonon plasma png policykit ppds qml qt5 readline sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg tcpd threads tiff truetype udev udisks unicode upower usb vorbis widgets wxwidgets x264 xattr xcb xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2018" 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="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU NVPTX X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" QEMU_SOFTMMU_TARGETS="arm x86_64 i386 aarch64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon nvidia qxl virtualbox vmware" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 1 Austin Kilgore 2021-08-25 16:06:18 UTC
Created attachment 735963 [details]
build.log
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-08-25 16:12:47 UTC
ERROR: Feature 'xcomposite-egl' was enabled, but the pre-condition 'features.wayland-client && features.opengl && features.egl && features.xlib && libs.xcomposite && features.egl_x11' failed.

Check config.log for details.
Comment 3 Austin Kilgore 2021-08-25 16:42:13 UTC
(In reply to Sam James from comment #2)
> ERROR: Feature 'xcomposite-egl' was enabled, but the pre-condition
> 'features.wayland-client && features.opengl && features.egl && features.xlib
> && libs.xcomposite && features.egl_x11' failed.
> 
> Check config.log for details.

I searched the build directory and there is no config.log file anywhere in /var/tmp/portage/qtwayland
Comment 4 Flávio Albuquerque Camilo 2021-08-25 17:26:22 UTC
Created attachment 735999 [details]
config.log

Can confirm this on -r10.

Attached the config.log (found in /var/tmp/portage/dev-qt/qtwayland-5.15.2-r10/work/qtwayland-d4c41797b61a5a8da47c5821711aca72e756dcbf_build/).
Comment 5 Austin Kilgore 2021-08-25 18:27:56 UTC
Created attachment 736001 [details]
config.log
Comment 6 Tiernan Hubble 2021-08-25 19:15:34 UTC
This seems to be a problem with the libglvnd EGL headers and Qt.

The problem has a long chain of causes:
- In order for qtwayland to build properly with EGL-X11, qtgui also needs to be built with the egl_x11 feature. The dev-qt/qtgui ebuild does properly set the config to do this:
	# egl_x11 is activated when both egl and X are enabled
	use egl && QT5_GENTOO_CONFIG+=(X:egl_x11:) || QT5_GENTOO_CONFIG+=(egl:egl_x11:)

- However, qtgui has a configure step that attempts to detect whether the system's EGL is "compatible" with X, which it isn't unless some very specific preprocessor macros are defined before including libglvnd headers. The problem is very convoluted, but take a look at "/usr/include/EGL/eglplatform.h": It doesn't properly define types for EGL-X11 unless "USE_X11" is defined and all the conditionals above are NOT defined. So I'm not sure how easy it is to change things here to get qtgui to build with egl-x11, without breaking other parts of the build or other packages. This is simply a conditional feature test failure in qtgui, so it builds and installs fine, just without the egl_x11 feature enabled.

- If dev-qt/qtwayland is built with the "X" use flag, the ebuild tries to enable "-feature-xcomposite-egl". This requires dev-qt/qtgui to be built with the egl_x11 feature enabled, which it isn't because of the libglvnd problem I described above. In this case, instead of simply omitting this feature, it treats it as a fatal error.


I made a local ebuild for dev-qt/qtwayland where I simply deleted the line to enable "feature-xcomposite-egl". It correctly detected that it couldn't build this feature, and then built and installed the rest of qtwayland just fine. I'm not sure what the consequences of this would be on a Wayland system - I don't actually run Wayland, just keep it in my USE flags in case I want to try it on a whim one day.

I'm not sure why this broke suddenly, but I'm thinking it could maybe be a libglvnd change at some point? I don't see any changes in KDE's Qt branch that would affect it.
Comment 7 Tiernan Hubble 2021-08-25 19:35:13 UTC
Did some more searching, I think it might be caused by the change in https://bugs.gentoo.org/717352 (libglvnd 1.3.4). Possibly also related: https://bugs.gentoo.org/767265
Comment 8 Matt Turner gentoo-dev 2021-08-25 19:51:18 UTC
This is probably because of https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/248 in libglvnd, which is included in v1.3.4.

I assume everyone seeing this problem has libglvnd-1.3.4 and no one with v1.3.3 sees the problem?

Previously there was a macro 'EGL_NO_X11' that a project could define to get EGL types defined not in terms of X11 types. This is now the default, and projects should set USE_X11 if they want the EGL types defined in terms of X11 types. The ABI is the same regardless, but I guess it's possible to cause compile errors in ways I didn't foresee.
Comment 9 Toralf Förster gentoo-dev 2021-08-25 19:59:15 UTC
*** Bug 810347 has been marked as a duplicate of this bug. ***
Comment 10 Tiernan Hubble 2021-08-25 20:14:06 UTC
In that case, would adding "-DUSE_X11=true" to C[|XX|PP]FLAGS when building dev-qt/qtgui work (if the X useflag is enabled)? Since the ABI is the same, and that flag seems to just revert "eglplatform.h" to the pre-1.3.4 behaviour, I'm assuming that wouldn't interfere with anything Wayland-specific. And would that flag be required in other packages?
Comment 11 Flávio Albuquerque Camilo 2021-08-25 20:28:24 UTC
(In reply to Matt Turner from comment #8)
> This is probably because of
> https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/248 in
> libglvnd, which is included in v1.3.4.
> 
> I assume everyone seeing this problem has libglvnd-1.3.4 and no one with
> v1.3.3 sees the problem?

 Masked libglvnd-1.3.4 and then downgraded to 1.3.3 (the only package asked to be rebuilt in a deep emerge @world in my system), but the emerge of qtwayland-5.15.2-r10 failed again.

> Previously there was a macro 'EGL_NO_X11' that a project could define to get
> EGL types defined not in terms of X11 types. This is now the default, and
> projects should set USE_X11 if they want the EGL types defined in terms of
> X11 types. The ABI is the same regardless, but I guess it's possible to
> cause compile errors in ways I didn't foresee.
Comment 12 Tiernan Hubble 2021-08-25 20:34:47 UTC
^^ you'll need to rebuild dev-qt/qtgui after downgrading libglvnd, and then rebuild dev-qt/qtwayland.

I didn't downgrade, but instead rebuilt dev-qt/qtgui with "-DUSE_X11=true" in my *CFLAGS. Then I rebuilt dev-qt/qtwayland (current Portage, with no modifications) and it built fine. I haven't tested extensively, and I don't use Wayland, but I haven't seen any problems.
Comment 13 josef.95 2021-08-25 20:57:16 UTC
Yes, I think it is =media-libs/libglvnd-1.3.4 related.
Downgrade media-libs/libglvnd via
emerge -av1 =media-libs/libglvnd-1.3.3 mesa qtcore qtgui qtwayland
builds here successful.
Comment 14 Flávio Albuquerque Camilo 2021-08-25 20:59:02 UTC
(In reply to Tiernan Hubble from comment #12)
> ^^ you'll need to rebuild dev-qt/qtgui after downgrading libglvnd, and then
> rebuild dev-qt/qtwayland.
> 
> I didn't downgrade, but instead rebuilt dev-qt/qtgui with "-DUSE_X11=true"
> in my *CFLAGS. Then I rebuilt dev-qt/qtwayland (current Portage, with no
> modifications) and it built fine. I haven't tested extensively, and I don't
> use Wayland, but I haven't seen any problems.

 I knew I was missing something here... :P

 After rebuilding dev-qt/qtgui, the emerge of dev-qt/qtwayland worked fine.

 Thanks!
Comment 15 Sven Eden 2021-08-26 09:37:29 UTC
Adding "-DUSE_X11=true" to my CFLAGS worked like a charm, thank you very much!

Could the qtgui ebuild do this if USE="wayland" is used instead?
Comment 16 Geoff Madden 2021-08-26 15:41:01 UTC
(In reply to Tiernan Hubble from comment #12)
> ^^ you'll need to rebuild dev-qt/qtgui after downgrading libglvnd, and then
> rebuild dev-qt/qtwayland.
> 
> I didn't downgrade, but instead rebuilt dev-qt/qtgui with "-DUSE_X11=true"
> in my *CFLAGS. Then I rebuilt dev-qt/qtwayland (current Portage, with no
> modifications) and it built fine. I haven't tested extensively, and I don't
> use Wayland, but I haven't seen any problems.

works for me downunder. Thanks for the tips
Comment 17 Bluey The Dog 2021-08-26 16:09:50 UTC
Same as Geoff, comment 16, I'm down under and his steps worked for me.
Comment 18 Larry the Git Cow gentoo-dev 2021-08-26 18:38:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=63ac5c001658e5fca3ea103125786e023d024c73

commit 63ac5c001658e5fca3ea103125786e023d024c73
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-26 10:58:10 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-26 18:38:21 +0000

    dev-qt/qtgui: Force -DUSE_X11 with IUSE="X"
    
    Reported-by: Austin Kilgore <kilgorephotoshop@gmail.com>
    Thanks-to: Tiernan Hubble <thubble+gentoo@thubble.ca>
    Closes: https://bugs.gentoo.org/810343
    Package-Manager: Portage-3.0.22, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-qt/qtgui/{qtgui-5.15.2-r10.ebuild => qtgui-5.15.2-r11.ebuild} | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Additionally, it has been referenced in the following commit(s):

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

commit d7354f4bd4c9bc9ca144b788dd233e4ac45272a1
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-26 11:00:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-08-26 18:38:22 +0000

    dev-qt/qtwayland: Add USEdep on dev-qt/qtgui[X] for IUSE="X"
    
    Bug: https://bugs.gentoo.org/810343
    Package-Manager: Portage-3.0.22, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/22107
    Signed-off-by: Sam James <sam@gentoo.org>

 .../{qtwayland-5.15.2-r10.ebuild => qtwayland-5.15.2-r11.ebuild}        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 19 Larry the Git Cow gentoo-dev 2021-08-27 11:41:42 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/qt.git/commit/?id=83a89072526e19defc606e2a2cbe07aedcd98b1d

commit 83a89072526e19defc606e2a2cbe07aedcd98b1d
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-26 10:51:25 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-08-27 11:40:45 +0000

    dev-qt/qtwayland: Add USEdep on dev-qt/qtgui[X] for IUSE="X"
    
    Bug: https://bugs.gentoo.org/810343
    Package-Manager: Portage-3.0.22, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtwayland/qtwayland-5.15.9999.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

https://gitweb.gentoo.org/proj/qt.git/commit/?id=f1f6af038dd9e283b9915c18b3b0f1f379ace46f

commit f1f6af038dd9e283b9915c18b3b0f1f379ace46f
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-08-26 10:50:11 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-08-27 11:40:41 +0000

    dev-qt/qtgui: Force -DUSE_X11 with IUSE="X"
    
    Reported-by: Austin Kilgore <kilgorephotoshop@gmail.com>
    Thanks-to: Tiernan Hubble <thubble+gentoo@thubble.ca>
    Bug: https://bugs.gentoo.org/810343
    Package-Manager: Portage-3.0.22, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtgui/qtgui-5.15.9999.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 20 Larry the Git Cow gentoo-dev 2021-09-22 20:01:44 UTC
The bug has been referenced in the following commit(s):

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

commit ad10fce80859497407fa4ab5b42e0f03c3fa1caa
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2021-09-22 13:09:18 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2021-09-22 19:47:17 +0000

    dev-qt/qtgui: 5.15.2-r12 version bump at KDE 64a00680
    
    Switch from ~PV to =QT5_PV* version dependencies.
    
    Fixes several things limited to dev-qt/qtgui, see below.
    
    Upstream commit f42186815187be1a0c5c0f9d6acc657872d3d533:
    "Cater for upstream changes in eglplatform.h" (libglvnd-1.3.4)
    See also: https://bugreports.qt.io/browse/QTBUG-96392
    
    Upstream commit aa36d950b5d817d1adf660eb54dacf0a1c16adde:
    "QTextOdfWriter: fix exporting pixmaps to ODT"
    See also: https://invent.kde.org/qt/qt/qtbase/-/merge_requests/50
    
    Upstream commit 64a0068011e12f178fb7ff65fafe7cfaa4620719:
    "QPlatformWindow: fix isAncestorOf not breaking recursion"
    See also: https://invent.kde.org/qt/qt/qtbase/-/merge_requests/51
    
    Bug: https://bugs.gentoo.org/810343
    Package-Manager: Portage-3.0.23, Repoman-3.0.3
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 dev-qt/qtgui/Manifest                                |  2 +-
 ...gui-5.15.2-r11.ebuild => qtgui-5.15.2-r12.ebuild} | 20 ++++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)