telegram-desktop fails to start with Qt 5.15.10 Reproducible: Always Portage 3.0.48.1 (python 3.11.4-final-0, default/linux/amd64/17.1, gcc-13, glibc-2.37-r3, 6.3.7-gentoo x86_64) ================================================================= System uname: Linux-6.3.7-gentoo-x86_64-AMD_Ryzen_7_PRO_5850U_with_Radeon_Graphics-with-glibc2.37 KiB Mem: 31650532 total, 28709384 free KiB Swap: 50331644 total, 50331644 free Timestamp of repository gentoo: Wed, 14 Jun 2023 17:30:01 +0000 Head commit of repository gentoo: 98c15c76e735fd0f9e6ec4020b3fe951efd228d1 Timestamp of repository bombo82: Sat, 10 Jun 2023 10:33:54 +0000 Head commit of repository bombo82: de02f8701809980c3a679a56493337ae8817200b sh bash 5.2_p15-r3 ld GNU ld (Gentoo 2.40 p5) 2.40.0 ccache version 4.8.2 [disabled] app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.2_p15-r3::gentoo dev-java/java-config: 2.3.1-r1::gentoo dev-lang/perl: 5.36.1-r2::gentoo dev-lang/python: 3.11.4::gentoo dev-lang/rust: 1.69.0-r1::gentoo dev-util/ccache: 4.8.2::gentoo dev-util/cmake: 3.26.4-r1::gentoo dev-util/meson: 1.1.1::gentoo sys-apps/baselayout: 2.13-r1::gentoo sys-apps/openrc: 0.47.1::gentoo sys-apps/sandbox: 2.31::gentoo sys-devel/autoconf: 2.13-r8::gentoo, 2.71-r6::gentoo sys-devel/automake: 1.16.5-r1::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 15.0.7-r3::gentoo, 16.0.5::gentoo sys-devel/gcc: 13.1.1_p20230527::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 15.0.7::gentoo, 16.0.5::gentoo sys-devel/llvm: 15.0.7-r3::gentoo, 16.0.5::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.3::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r3::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage/ priority: -1000 volatile: False sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-extra-opts: bombo82 location: /var/db/repos/bombo82 sync-type: git sync-uri: https://github.com/gentoo-mirror/bombo82.git masters: gentoo volatile: False localhost location: /var/db/repos/localhost sync-type: git sync-uri: file:///var/db/repos/localhost/ masters: gentoo volatile: False ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="@FREE @BINARY-REDISTRIBUTABLE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=znver3 -O2 -pipe" 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" CXXFLAGS="-march=znver3 -O2 -pipe" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--ask" 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="-march=znver3 -O2 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance binpkg-request-signature buildpkg-live candy config-protect-if-modified distlocks ebuild-locks fail-clean fakeroot fixlafiles ipc-sandbox merge-sync mount-sandbox 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=znver3 -O2 -pipe" GENTOO_MIRRORS="https://mirror.yandex.ru/gentoo-distfiles/ https://gentoo-mirror.alexxy.name/ http://gentoo.bloodhost.ru/ https://mirror.rackspace.com/gentoo/ https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo/ https://ftp.gwdg.de/pub/linux/gentoo/ https://mirror.netcologne.de/gentoo/ https://packages.hs-regensburg.de/gentoo-distfiles/ https://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ https://ftp.halifax.rwth-aachen.de/gentoo/ https://ftp.tu-ilmenau.de/mirror/gentoo/ https://ftp.fau.de/gentoo https://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j14" PKGDIR="/var/cache/binpkgs" PORTAGE_COMPRESS="zstd" 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 acl alsa amd64 amdgpu bash-completion bzip2 cli crypt dbus dri elogind ffmpeg fontconfig fortran gdbm iconv ipv6 libnotify libtirpc lm-sensors lto mount multilib ncurses nptl openmp pam pcre pipewire postproc pulseaudio readline seccomp split-usr ssl test-rust threads truetype udev unicode utils vaapi verify-sig vulkan xattr zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" 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 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en-US ru" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="AMDGPU BPF WebAssembly" 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_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby30 ruby31" 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, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Was there more to that error message? Like which library is failing?
run QT_DEBUG_PLUGINS=1 telegram-desktop could get more information. Got keys from plugin meta data ("webp") QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/imageformats" ... loaded library "/usr/lib64/qt5/plugins/imageformats/libqgif.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqicns.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqico.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqjpeg.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqmng.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqsvg.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqtga.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqtiff.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqwbmp.so" loaded library "/usr/lib64/qt5/plugins/imageformats/libqwebp.so" Cannot mix incompatible Qt library (5.15.9) with this library (5.15.10) zsh: IOT instruction (core dumped) QT_DEBUG_PLUGINS=1 telegram-desktop The log shows that it is related to dev-qt/qtimageformats. I think telegram-desktop should explicitly state that it needs to be rebuilt after dev-qt/qtimageformats (or all qt packages) upgrade.
$ equery l "dev-qt/*"
Rebuilding net-im/telegram-desktop fixed this for me.
(In reply to jinqiang zhang from comment #2) > run QT_DEBUG_PLUGINS=1 telegram-desktop could get more information. > The log shows that it is related to dev-qt/qtimageformats. I think > telegram-desktop should explicitly state that it needs to be rebuilt after > dev-qt/qtimageformats (or all qt packages) upgrade. Thank you for pinning this down
I thought it already used the SLOT operator on Qt. Thanks for letting me know.
The odd thing is, telegram-desktop links against nothing in dev-qt/qtimageformats. During other Qt stack upgrades, generally all of the Qt applications I use start functioning after Qt and all its plugins update, rather than having to build every qt-dependent application. Are we really sure the issue wasn't related to a withheld or incorrect rebuilding of qtimageformats? Has this issue really not happened to any other application? telegram doesn't bundle any Qt plugins except when USE=qt6-imageformats.
dev-qt/* deps in RDEPEND should have :5= (or :6=) subslot dependency in order to force portage rebuild telegram-desktop as SONAME depended of Qt stack.
That would make sense if telegram-desktop linked against libQt5Core.so.5.15.x, but it deliberately links against libQt5Core.so.5, since it's supposed to be forward-compatible, just like any other Qt5 app is. Please refer to comment #7 for further rationale on why I haven't just added the SLOT operator. As far as I can tell, telegram-desktop isn't bundling any Qt plugins for which it'd need a SLOT rebuild, and the error messages earlier in the thread indicate the problem being qtimageformats. I haven't been able to reproduce this myself, yet, either.
In code telegram uses static import of plugins (Q_IMPORT_PLUGIN) which may lead compiled-in image plugins into binary and Qt library version mismatch.
https://github.com/desktop-app/cmake_helpers/blob/32e1044c5198819dd470e3262275a9747dfd65de/external/qt/qt_static_plugins/qt_static_plugins.cpp All of those are wrapped by DESKTOP_APP_USE_PACKAGED, which is *enabled* in gentoo, meaning none of the plugins are linked statically. This is why I'm confused.
Just to confirm: I have exactly the same issue just right now. (Will try to recompile)
(In reply to Martin Erdtmann from comment #12) Can you try rebuilding dev-qt/qtimageformats and kde-frameworks/kimageformats (if installed) first, before rebuilding telegram-desktop? Also, what USE flags do you use for telegram-desktop?
Oh I am sorry, I already recompiled telegram-desktop now. I did not see your comment in time. Now it works .. ;)
Note: I have a Notebook with almost the same configuraton. Let me check if the issue comes up on that device. In that case I can perform what you suggested and report the result.
I can recreate the issue on my notebook and rebuilding of kimageformats and qtimageformats did not fix the issue. The USE flags of telegram-desktop are: [I] net-im/telegram-desktop Installierte Versionen: 4.8.1-r2(10:33:17 25.06.2023)(X dbus fonts jemalloc screencast wayland -enchant -qt6 -qt6-imageformats)
Thanks for the info. I guess a plugin *is* being compiled statically into telegram-desktop. Now I'd like to figure out which and whether it can be fixed to use a shared copy.
Can I do anything else? I do not have telegram-desktop recompiled on my notebook yet.
Can you give me the output of your build.log after running the configure stage with "ebuild /path/to/telegram-desktop.ebuild clean configure"? Also upload a copy of CMakeCache.txt from the work/tdesktop-x.x.x_build dir.
Please find both files here: https://hidrive.ionos.com/share/cgpbxadpq3#$/
Annoyingly, it's not telling me whether it found kcoreaddons, which is kind of what I wanted to check. If you still have the broken telegram-desktop binary around, can you install dev-util/libtree, and upload the output of `libtree /usr/bin/telegram-desktop`? If you already rebuilt it, that's fine, I'll just add the SLOT operator for the time being, and mark some find_package() calls as REQUIRED to more reliably catch this sort of problem...
I run with this bug also, so I confirm that rebuild net-im/telegram-desktop has solved this issue.
Turns out the issue is caused by this commit: https://github.com/desktop-app/lib_ui/commit/f5fb567052d9ce47c3c694ef81936e28a1c7315e It's inheriting the QWidgetPrivate class, which in turn checks for strict ABI version compatibility before running. It does this to force the usage of OpenGL/Metal when available, overriding Qt's judgement and user settings. Since this is currently only done for Qt6 on wayland, and very unlikely to be noticed by anyone, I've decided to remove the offending bit of code for the time being. Older/stable ebuilds gained the SLOT rebuild operator, newer ebuilds contain the patch. Please report any issues should they arise.
Sorry, I saved the logfiles you requested but did not save the old broken binary ..
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a5a0205dc4f55b099c6ccffd6599458a154dd78 commit 8a5a0205dc4f55b099c6ccffd6599458a154dd78 Author: Esteve Varela Colominas <esteve.varela@gmail.com> AuthorDate: 2023-07-14 00:04:23 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-07-15 16:24:56 +0000 net-im/telegram-desktop: Remove dependency on private Qt components Closes: https://bugs.gentoo.org/908500 Thanks-to: ZetaCorvi@protonmail.com Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31538 Signed-off-by: Sam James <sam@gentoo.org> .../files/tdesktop-4.8.4-remove-private-qt.patch | 50 +++++ .../telegram-desktop-4.8.4-r2.ebuild | 227 +++++++++++++++++++++ 2 files changed, 277 insertions(+)