Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 832963 - dev-qt/qtwayland-5.15.10-r4 fails to configure: Project ERROR: Test config.qtwayland_client.tests.dmabuf-server-buffer tries to use undeclared library drm
Summary: dev-qt/qtwayland-5.15.10-r4 fails to configure: Project ERROR: Test config.qt...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PATCH
: 920479 (view as bug list)
Depends on:
Blocks: 840855
  Show dependency tree
 
Reported: 2022-02-09 06:54 UTC by Agostino Sarubbo
Modified: 2023-12-21 16:05 UTC (History)
5 users (show)

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


Attachments
build.log (build.log,46.44 KB, text/plain)
2022-02-09 06:54 UTC, Agostino Sarubbo
Details
build.log (qtwayland-5.15.3-r1-build.log,6.28 KB, text/plain)
2022-04-26 09:50 UTC, Joonas Niilola
Details
build.log (build.log,49.12 KB, text/plain)
2022-05-04 10:55 UTC, Agostino Sarubbo
Details
Patch: Do not rely on qtgui private header for libdrm and egl (0001-Do-not-rely-on-qtgui-private-header-for-libdrm-and-e.patch,3.40 KB, patch)
2023-03-30 15:29 UTC, Alfred Wingate
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-02-09 06:54:04 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-qt/qtwayland-5.15.2-r19 fails to compile.
Discovered on: amd64 (internal ref: ci)

NOTE:
If you think this is a GCC-11 related issue, please block bug 732706.
Comment 1 Agostino Sarubbo gentoo-dev 2022-02-09 06:54:06 UTC
Created attachment 764657 [details]
build.log

build log and emerge --info
Comment 2 Andreas Sturmlechner gentoo-dev 2022-02-09 09:20:10 UTC
Assuming this is caused by dev-qt/qtgui[-X] and new qtwayland-5.15.2-fix-qmake-deps.patch...
Comment 3 Joonas Niilola gentoo-dev 2022-04-26 09:50:23 UTC
Created attachment 774606 [details]
build.log

Can reproduce this with dev-qt/qtwayland-5.15.3-r1.


# emerge --info
Portage 3.0.30 (python 3.9.11-final-0, default/linux/amd64/17.1, gcc-11.2.1, glibc-2.34-r10, 5.15.32-gentoo-dist x86_64)
=================================================================
System uname: Linux-5.15.32-gentoo-dist-x86_64-AMD_Ryzen_7_3700X_8-Core_Processor-with-glibc2.34
KiB Mem:    32855720 total,  31760052 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Tue, 26 Apr 2022 06:48:12 +0000
Head commit of repository gentoo: d0c84914b65b744e73646a973a246d3c45401900

sh bash 5.1_p16
ld GNU ld (Gentoo 2.37_p1 p2) 2.37
app-misc/pax-utils:        1.3.3::gentoo
app-shells/bash:           5.1_p16::gentoo
dev-lang/python:           3.9.11::gentoo
sys-apps/baselayout:       2.7-r3::gentoo
sys-apps/openrc:           0.44.10::gentoo
sys-apps/sandbox:          2.29::gentoo
sys-devel/binutils:        2.37_p1-r2::gentoo
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/gcc:             11.2.1_p20220115::gentoo
sys-devel/gcc-config:      2.5-r1::gentoo
sys-devel/make:            4.3::gentoo
sys-kernel/linux-headers:  5.15-r3::gentoo (virtual/os-headers)
sys-libs/glibc:            2.34-r10::gentoo
Repositories:

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

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--autounmask=y --autounmask-continue --autounmask-use=y --autounmask-write --binpkg-changed-deps=y --buildpkg-exclude virtual --buildpkg-exclude acct-* --buildpkg-exclude sys-kernel --nospinner --jobs=8 --usepkg"
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 -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="https://distfiles.gentoo.org"
LANG="C.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS=" en en_US en-US fi sv "
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="acl amd64 bzip2 cli crypt dbus dri elogind fortran gdbm iconv ipv6 libglvnd libtirpc multilib ncurses nptl openmp openrc pam pcre readline seccomp split-usr ssl udev unicode xattr zlib" ABI_X86="64 32" ADA_TARGET="gnat_2020" 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="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" 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" INPUT_DEVICES="evdev" KERNEL="linux" L10N="en en_US en-US fi sv" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi" 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:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SHELL, SIZE, STRINGS, STRIP, YACC, YFLAGS


Let me know what I can try to get past this.
Comment 4 Joonas Niilola gentoo-dev 2022-04-26 09:53:17 UTC
-X, +X, doesn't matter. libdrm installed or not, doesn't matter. Fails same way. Oh and just to be sure it's not binpkg-related, I've done emerge -e qtwayland --usepkg=n, which didn't help.
Comment 5 Joonas Niilola gentoo-dev 2022-04-27 06:26:28 UTC
If I emerge it using plasma profile, it works. 

Could there be some automagic on libdrm?
Comment 6 Joonas Niilola gentoo-dev 2022-04-27 07:52:51 UTC
After comparing installed packages when using profiles
  default/linux/amd64/17.1
  default/linux/amd64/17.1/desktop/plasma

and trying out few combinations, it seems to boil down to this:

qtwayland needs dev-qt/qtgui[jpeg] in addition to its current list. This fixes emerging qtwayland with -X +X.

I can commit without revbumping if you ack.
Comment 7 Joonas Niilola gentoo-dev 2022-05-04 10:28:12 UTC
https://dev.gentoo.org/~juippis/pics/Screenshot_2022-05-04_13-22-39.png wasted tinderbox efforts (me and ago included) :(
Comment 8 Larry the Git Cow gentoo-dev 2022-05-04 10:31:30 UTC
The bug has been closed via the following commit(s):

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

commit 2eaafdcfcf936dc95ab5de2931755e6e0286b433
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-05-04 10:29:24 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-05-04 10:31:28 +0000

    dev-qt/qtwayland: depend on dev-qt/qtgui[jpeg] in addition
    
     - the problem / dependency is not apparent unless running a
       non-plasma profile, most obvious in tinderboxes.
    
    Closes: https://bugs.gentoo.org/832963
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-qt/qtwayland/qtwayland-5.15.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 9 Agostino Sarubbo gentoo-dev 2022-05-04 10:55:55 UTC
Created attachment 776609 [details]
build.log

build.log
Comment 10 Larry the Git Cow gentoo-dev 2022-05-04 11:51:17 UTC
The bug has been referenced in the following commit(s):

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

commit 3ba6e1b84d16887a84728bc06dfbb7789e615ad9
Author:     Joonas Niilola <juippis@gentoo.org>
AuthorDate: 2022-05-04 11:50:27 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2022-05-04 11:51:14 +0000

    Revert "dev-qt/qtwayland: depend on dev-qt/qtgui[jpeg] in addition"
    
    This reverts commit 2eaafdcfcf936dc95ab5de2931755e6e0286b433.
    
     - looks like the problem is in much deeper after all.
    
    Bug: https://bugs.gentoo.org/832963
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-qt/qtwayland/qtwayland-5.15.3-r1.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 11 Andreas Sturmlechner gentoo-dev 2022-05-09 05:08:40 UTC
Reverting this was the right thing to do.

- dev-qt/ is not up for random commits
- RDEPEND changes require revbumps
Comment 12 Joonas Niilola gentoo-dev 2022-05-28 13:29:56 UTC
(In reply to Andreas Sturmlechner from comment #11)
> Reverting this was the right thing to do.
> 
> - dev-qt/ is not up for random commits

I saw you were active during the time between comments 6-7, so I thought you had seen them. But yeah I'll wait for a clear ack next time.

> - RDEPEND changes require revbumps

It seems this pretty much only appears on tinderboxes, and the build error is rather clear. So I made a judgement call to not revbump (and seeing it got reverted, I'm somewhat glad about that!)

I'm still going to get to this since it looks like I've discovered something. I've googled a bit and found some patches that I'm gonna try, too. But I'll make a PR and wait for an ack next time and try to _really_ understand why this is happening.
Comment 13 Andreas Sturmlechner gentoo-dev 2022-06-03 18:11:55 UTC
(In reply to Joonas Niilola from comment #12)
> I saw you were active during the time between comments 6-7, ...
Don't go that route.

1) If you want to make substantial changes to Qt ebuilds, file a PR and assign pesa
2) I won't react to outlandish theories while on holidays, which I actually was during that time, so don't take an arbitrary measurement of 'activity' as an excuse to skip due diligence.
Comment 14 Joonas Niilola gentoo-dev 2022-08-31 14:08:19 UTC
Here's how I can reproduce and fix the issue every time it seems:

# emerge -1av qtwayland --usepkg-exclude dev-qt/qtgui --usepkg-exclude dev-qt/qtwayland
 -> >>> Failed to emerge dev-qt/qtwayland-5.15.5-r1

Project ERROR: Test config.qtwayland_client.tests.dmabuf-server-buffer tries to use undeclared library 'drm'
 * ERROR: dev-qt/qtwayland-5.15.5-r1::gentoo failed (configure phase):


# emerge -1av mesa
# emerge -1av qtwayland --usepkg-exclude dev-qt/qtgui --usepkg-exclude dev-qt/qtwayland
 -> >>> Failed to emerge dev-qt/qtwayland-5.15.5-r1

Project ERROR: Test config.qtwayland_client.tests.dmabuf-server-buffer tries to use undeclared library 'drm'
 * ERROR: dev-qt/qtwayland-5.15.5-r1::gentoo failed (configure phase):


# emerge -1av qtgui qtwayland --usepkg-exclude dev-qt/qtgui --usepkg-exclude dev-qt/qtwayland
 -> >>> Installing (1 of 2) dev-qt/qtgui-5.15.5-r2::gentoo
 -> >>> Installing (2 of 2) dev-qt/qtwayland-5.15.5-r1::gentoo


So my conclusion: when compiling qtgui with mesa around it does some magic that later makes qtwayland successful. There's no difference in vdb's NEEDED file unfortunately. Sorry nothing concrete but a step ahead?
Comment 15 Alfred Wingate 2023-03-30 13:22:19 UTC
Saw this issue in the wild from some setting up a new install. Rebuilding dev-qt/qtgui worked as the workaround, but its not media-liba/mesa + dev-qt/qtgui automagic that is exactly the issue. 

dev-qt/qtgui does several test in which it includes x11-libs/libdrm in the results of these tests which are saved in a private header. So if drm isnt present when qtgui is merged then values like QMAKE_LIBS_DRM are unset.

The issue arises from qtwayland relying on qtguis private headers for these values.

So I tested this in chroot and got like four results.


x11-libs/libdrm unmerged and dev-qt/qtgui built when x11-libs/libdrm was unmerged leads to the issue.


* x11-libs/libdrm unmerged and dev-qt/qtgui built when x11-libs/libdrm was merged succeeds.

* x11-libs/libdrm merged and dev-qt/qtgui built when x11-libs/libdrm was unmerged leads to the issue.

* x11-libs/libdrm merged and dev-qt/qtgui built when x11-libs/libdrm was merged succceeds.

So take aways are that x11-libs/libdrm being merged does not affect dev-qt/qtwayland BUT x11-libs/libdrm being merged or unmerged when dev-qt/qtgui was built does affect dev-qt/qtwayland.

So I dont think touching or revdumping dev-qt/qtgui makes sense. dev-qt/qtwayland src/compositor/configure.json needs to be patched for the optimal user experience so that unlucky merge order doesnt lead to issues.

Ill have a look at that, but posting this first.
Comment 16 Alfred Wingate 2023-03-30 15:29:50 UTC
Created attachment 859272 [details, diff]
Patch: Do not rely on qtgui private header for libdrm and egl

Looking further I notice that this may be also affected by a kde patch applied which partly undoes https://github.com/qt/qtwayland/commit/1344ca6b5a8fbc1b28727feea6d856af8bf3bc93

https://invent.kde.org/qt/qt/qtwayland/-/commit/20af00d0fb9da337d16b6d464ade52de39d39bf0

The bugs mentioned in the commits.
https://bugreports.qt.io/browse/QTBUG-83303
https://bugreports.qt.io/browse/QTBUG-100475

This patch should address both of the above by adding checks drm and egl (unlike drm, egl atleast didnt cause a configure error). 

I did not take static libs into account so they may be adversely affected, but I dont think they matter for Gentoo.
Comment 17 Joonas Niilola gentoo-dev 2023-04-01 18:53:14 UTC
Wow, that's thorough. Thanks for your efforts! 

I suspect this is a tinderbox-only bug to begin with, but patching it (upstream) obviously doesn't hurt.
Comment 18 Agostino Sarubbo gentoo-dev 2023-09-06 10:38:09 UTC
ci has reproduced this issue with version 5.15.10-r4 - Updating summary.
Comment 19 Mantas 2023-09-13 19:10:46 UTC
Just FYI, this bug is also reproduced when using a custom profile combining standard plasma and no-multilib profiles
Comment 20 Alfred Wingate 2023-12-21 16:05:28 UTC
*** Bug 920479 has been marked as a duplicate of this bug. ***