Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922120 - Update from =dev-qt/qtgui-5.15.2-r13 to =dev-qt/qtgui-5.15.11-r2 fails to link without qtwayland, but qtwayland is only listed as PDEPENDS
Summary: Update from =dev-qt/qtgui-5.15.2-r13 to =dev-qt/qtgui-5.15.11-r2 fails to lin...
Status: UNCONFIRMED
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:
Depends on:
Blocks:
 
Reported: 2024-01-14 17:16 UTC by Andreas Grois
Modified: 2024-03-14 21:28 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 Andreas Grois 2024-01-14 17:16:21 UTC
Linking of =dev-qt/qtgui-5.15.11-r2 fails when updating from very old versions (in my case: 5.15.2-r13) and having the "wayland" use flag enabled, because the functions related to the XdgDesktopPortalColorPicker class are not compiled into any of its compile-time dependencies.

Error message:
/usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /home/build_tmp/portage/dev-qt
/qtgui-5.15.11-r2/work/qtbase-everywhere-src-5.15.11_build/lib/libQt5ServiceSupport.a(qgenericunixservices
.o): in function `(anonymous namespace)::XdgDesktopPortalColorPicker::~XdgDesktopPortalColorPicker()':
qgenericunixservices.cpp:(.text+0x17c): undefined reference to `vtable for QPlatformServiceColorPicker'

The functions in question are offered by /usr/lib64/libQt5WaylandClient.so, which is part of dev-qt/qtwayland.

However, checking the ebuilds, qtwayland-5.15.11-r1.ebuild lists qtgui under RDEPEND, while qtgui-5.15.11-r2.ebuild lists qtwayland under PDEPEND. Therefore portage first tries to emerge qtgui, and qtwayland afterwards - what leads to the above linker error.

I'm unsure if this can be resolved without introducing a circular dependency - I haven't checked if qtwayland actually needs anything from qtgui to compile/link. I am also unsure if this affects new installs, or only updates.

Emerging qtgui and qtwayland with USE="-wayland" allows both packags to build/install, and then, once both are installed, rebuilding both with the "wayland" use flag re-enabled, compiles/links successfully.

I am terribly sorry that I can't attach a build log, but I am unable to reproduce the bug ever since I got the first working build of qtgui installed (and did not back-up the build log before I tried to disable the "wayland" use flag). Even uninstalling with preserve-libs disabled does not cause the bug to re-appear. That's why I suspect that it is somehow related to updating, and might not affect fresh installs of the qt packages.

-------------------------------------------------
emerge --info dev-qt/qtgui:

Portage 3.0.61 (python 3.11.7-final-0, default/linux/amd64/17.1/no-multilib, gcc-13, glibc-2.38-r9, 5.10.76-gentoo-r1 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.10.76-gentoo-r1-x86_64-AMD_C-60_APU_with_Radeon-tm-_HD_Graphics-with-glibc2.38
KiB Mem:     3622336 total,   1278956 free
KiB Swap:    2097148 total,   1813152 free
Timestamp of repository gentoo: Sat, 13 Jan 2024 12:15:01 +0000
Head commit of repository gentoo: b66e10227cd2ab11710deddcba6d632971c7ac45
sh bash 5.1_p16-r6
ld GNU ld (Gentoo 2.41 p4) 2.41.0
distcc 3.4 x86_64-pc-linux-gnu [enabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.9.8::gentoo, 3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:             1.74.1::gentoo
dev-util/cmake:            3.27.9::gentoo
dev-util/meson:            1.3.0-r2::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r6::gentoo
sys-devel/automake:        1.15.1-r2::gentoo, 1.16.5-r1::gentoo
sys-devel/binutils:        2.37_p1::gentoo, 2.41-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           13.0.0::gentoo, 16.0.6::gentoo
sys-devel/gcc:             11.2.0::gentoo, 13.2.1_p20230826::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            13.0.0::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r9::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.europe.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1

Binary Repositories:

binhost
    priority: 9999
    sync-uri: rsync://mirror.kumi.systems/gentoo/releases/amd64/binpackages/17.1/x86-64

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=btver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-mwaitx -mno-clzero -mno-pku --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=btver1"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=btver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-mwaitx -mno-clzero -mno-pku --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=btver1"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="-g"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=btver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-mwaitx -mno-clzero -mno-pku --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=btver1"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-request-signature buildpkg-live config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=btver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mabm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mno-xsave -mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-mwaitx -mno-clzero -mno-pku --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=btver1"
GENTOO_MIRRORS="rsync://mirror.kumi.systems/gentoo/ ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo http://distfiles.gentoo.org"
LANG="de_AT.utf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="de_AT de_DE de en en_GB"
MAKEOPTS="-j33 -l2"
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"
SHELL="/bin/bash"
USE="X a52 aac acl acpi aim alsa amd64 apng bash-completion blas bluetooth bzip2 cairo calendar cjk cli crypt cups cxx dbus djvu dri dts dv dvi elogind emacs emotion ethumb evo exif expat fbcon ffmpeg fftw flac fontconfig fortran g3dvl gcj gd gdbm gfortran gif gimp git gles2 glut gnome-keyring gnuplot gnutls gpg gphoto2 gpm graphviz gsl gtk gtk3 gzip hwdb iconv icq icu id3tag idn imagemagick imap ipv6 jabber java jingle jpeg jpeg2000 jpeg2k lame lapack latex libnotify libsamplerate libtirpc lm_sensors lock lzma mad matroska mbox mime mmap mmx mmxext mozilla mp3 mp4 mpeg mplayer mtp musepack ncurses nls nntp nptl nsplugin numpy ogg openal opencl opengl openmp pam pcre pdf png policykit pop posix postscript python qt5 quicklaunch rdesktop readline samba sasl sdl seccomp session sharedmem smime smp smtp sockets sound speex spell split-usr sqlite sse sse2 sse3 ssl ssse3 startup-notification subversion suid svg t1lib test-rust theora threads thunar tiff timidity truetype udev udisks unicode usb v4l vaapi vdpau vorbis wayland wifi wmf x264 xattr xcomposite xdg xft xine xml xmpp xscreensaver xv xvid xvmc zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio 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 popcnt sse sse2 sse3 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="evdev synaptics mutouch" KERNEL="linux" L10N="de-AT de en en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="radeon r600 fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto 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, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-14 17:20:24 UTC
For future reference, you can make Portage retain build logs outside of PORTAGE_TMPDIR: https://wiki.gentoo.org/wiki/Portage_log#Always_save_build_logs.
Comment 2 Ionen Wolkens gentoo-dev 2024-01-14 17:46:55 UTC
qtgui having been unable to build without qtwayland for so long wouldn't really make sense, must be something else going on.

And I see no reference to "ColorPicker" in qtwayland's sources, but qtbase does have QPlatformServiceColorPicker defined in its own source (well, not the original one, it's added by *-add-color-picking-support-on-wayland-using-the-XDG-d.patch).

Not that I looked too closely at what may be going on here, I cannot reproduce any link failure so far anyhow.
Comment 3 Ionen Wolkens gentoo-dev 2024-01-14 17:57:48 UTC
(In reply to Ionen Wolkens from comment #2)
> Not that I looked too closely at what may be going on here, I cannot
> reproduce any link failure so far anyhow.
That is, without actually trying to install the ancient qtgui-5.12.2 and update from it. I'd guess it may not have had the patch back then and may be influencing something (or perhaps the patches were different and doing something to qtwayland, haven't looked).
Comment 4 Ionen Wolkens gentoo-dev 2024-01-14 18:02:58 UTC
fwiw, qtgui-5.15.2-r13 is over 2 years old now and if "upgrading from old" is the cause it's unlikely to be hitting many people.
Comment 5 Andreas Grois 2024-01-16 18:07:27 UTC
I agree - I wasn't even sure if I should file a report or not. However, I wanted to have the workaround (emerge once without "wayland" use flag) documented somewhere.

About the symbols being from qtcore: I noticed that too, and would have expected them to actually be part of one of qtcore's libraries. However, checking which libraries export those symbols using nm confirms that they are only built into qtwayland and qtgui:

$ for FILE in /usr/lib64/libQt5*.so ; do echo $FILE; nm -gD $FILE | grep olorPi; done
/usr/lib64/libQt5Concurrent.so
/usr/lib64/libQt5Core.so
/usr/lib64/libQt5DBus.so
/usr/lib64/libQt5DesignerComponents.so
/usr/lib64/libQt5Designer.so
/usr/lib64/libQt5Gui.so
000000000015dee0 T _ZN17QPlatformServices11colorPickerEP7QWindow@@Qt_5_PRIVATE_API
00000000004d79f0 T _ZN27QPlatformServiceColorPicker11colorPickedERK6QColor@@Qt_5_PRIVATE_API
00000000004d7af0 T _ZN27QPlatformServiceColorPicker11qt_metacallEN11QMetaObject4CallEiPPv@@Qt_5_PRIVATE_API
00000000004d7a90 T _ZN27QPlatformServiceColorPicker11qt_metacastEPKc@@Qt_5_PRIVATE_API
00000000005e2120 D _ZN27QPlatformServiceColorPicker16staticMetaObjectE@@Qt_5_PRIVATE_API
00000000004d79d0 T _ZNK27QPlatformServiceColorPicker10metaObjectEv@@Qt_5_PRIVATE_API
00000000005e2088 V _ZTI27QPlatformServiceColorPicker@@Qt_5_PRIVATE_API
0000000000532f70 V _ZTS27QPlatformServiceColorPicker@@Qt_5_PRIVATE_API
00000000005e20a0 V _ZTV27QPlatformServiceColorPicker@@Qt_5_PRIVATE_API
/usr/lib64/libQt5Help.so
/usr/lib64/libQt5MultimediaGstTools.so
/usr/lib64/libQt5Multimedia.so
/usr/lib64/libQt5MultimediaWidgets.so
/usr/lib64/libQt5Network.so
/usr/lib64/libQt5OpenGL.so
/usr/lib64/libQt5PrintSupport.so
/usr/lib64/libQt5QmlModels.so
/usr/lib64/libQt5Qml.so
/usr/lib64/libQt5QmlWorkerScript.so
/usr/lib64/libQt5QuickControls2.so
/usr/lib64/libQt5QuickParticles.so
/usr/lib64/libQt5QuickShapes.so
/usr/lib64/libQt5Quick.so
/usr/lib64/libQt5QuickTemplates2.so
/usr/lib64/libQt5QuickTest.so
/usr/lib64/libQt5QuickWidgets.so
/usr/lib64/libQt5Sql.so
/usr/lib64/libQt5Svg.so
/usr/lib64/libQt5Test.so
/usr/lib64/libQt5WaylandClient.so
                 U _ZN27QPlatformServiceColorPicker11colorPickedERK6QColor@Qt_5_PRIVATE_API
                 U _ZN27QPlatformServiceColorPicker11qt_metacallEN11QMetaObject4CallEiPPv@Qt_5_PRIVATE_API
                 U _ZN27QPlatformServiceColorPicker11qt_metacastEPKc@Qt_5_PRIVATE_API
                 U _ZN27QPlatformServiceColorPicker16staticMetaObjectE@Qt_5_PRIVATE_API
                 U _ZTI27QPlatformServiceColorPicker@Qt_5_PRIVATE_API
                 U _ZTV27QPlatformServiceColorPicker@Qt_5_PRIVATE_API
/usr/lib64/libQt5Widgets.so
                 U _ZN27QPlatformServiceColorPicker11colorPickedERK6QColor@Qt_5_PRIVATE_API
                 U _ZN27QPlatformServiceColorPicker16staticMetaObjectE@Qt_5_PRIVATE_API
/usr/lib64/libQt5X11Extras.so
/usr/lib64/libQt5XcbQpa.so
                 U _ZN27QPlatformServiceColorPicker11colorPickedERK6QColor@Qt_5_PRIVATE_API
                 U _ZN27QPlatformServiceColorPicker11qt_metacallEN11QMetaObject4CallEiPPv@Qt_5_PRIVATE_API
                 U _ZN27QPlatformServiceColorPicker11qt_metacastEPKc@Qt_5_PRIVATE_API
                 U _ZN27QPlatformServiceColorPicker16staticMetaObjectE@Qt_5_PRIVATE_API
                 U _ZTI27QPlatformServiceColorPicker@Qt_5_PRIVATE_API
                 U _ZTV27QPlatformServiceColorPicker@Qt_5_PRIVATE_API
/usr/lib64/libQt5Xml.so

(this is from my main PC, not the netbook I had the linker issue on)


I'm probably blind, but I also can't seem to find the actual definition of these symbols in Qt5...

If I could still repro the issue, that might shine some light on it, but given that I can't (what is also utterly puzzling), it's probably best to ignore this bug until someone else manages to repro it.
Comment 6 mlyszczek 2024-03-14 21:28:03 UTC
I had the very same problem. I was updating from 5.15.2 as well. But I don't use wayland - only X. Doing emerge -e world helped nothing. For future reference if someone stumbles upon it too. My solution was to just remove all qt `emerge -C 'dev-qt/*'` and run emerge @world again.

I also tried to look into qt files, but I did not see any obvious problem. And now I also cannot reproduce this.