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

Bug 838973

Summary: net-im/telegram-desktop support qt6
Product: Gentoo Linux Reporter: Esteve Varela Colominas <esteve.varela>
Component: Current packagesAssignee: Esteve Varela Colominas <esteve.varela>
Status: UNCONFIRMED ---    
Severity: normal CC: ao, esigra, gentoo, gl, ionen, joe, neb.semqen.ramesses, orodruinlair, powerman-asdf, proxy-maint, tanekliang
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on: 838970, 871582, 872026, 915582    
Bug Blocks:    

Description Esteve Varela Colominas 2022-04-17 16:19:57 UTC
Making this a proper version bump bug report because this is a major one that needs some tracking...

This program now hard-depends on Qt6. I've attempted backporting some of the qt6-related changes, but there's just too many to go around with no obvious way to fix, unless someone else would like to try.
So until either qt6 is in the tree or someone gets it to build with qt5, this package seems blocked.
Comment 1 Esteve Varela Colominas 2022-07-29 11:30:09 UTC
I've been trolled by a cmake message about only supporting qt6. It turns out that was only for some wayland-specific support code, that isn't even required to run under wayland (what it's actually required for, I have little clue). In later versions this message is avoided by implicitly disabling the wayland support code when telegram-desktop is built under Qt5. Debian apparently still ships telegram-desktop built with Qt5.

I will be bumping the ebuild and adding a warning about it, even though I'm not entirely sure what this support code is for. All I know is that upstream is starting to stop caring about supporting Qt5, as all their official linux builds run with Qt6 now, only the windows 7 build doesn't.

Renaming the issue to "support qt6", since the end is nigh and such.
Comment 2 Ivan S. Titov 2022-07-29 13:33:04 UTC
Thank you for the update!

>upstream is starting to stop caring
seems to be the main problem there. :(
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-08-02 22:16:27 UTC
commit bf3c82dd6095765570a18a2c39282c485d5dcf4a
Author: Esteve Varela Colominas <>
Date:   Fri Jul 29 13:17:33 2022 +0200

    net-im/telegram-desktop: Bump to 4.0.2

    Turns out they never really dropped Qt5 support, only for some wayland
    integrations. I've tried to research what this means but I actually have
    no idea beyond some mentions of "xdg-shell".

    This is why I warn about it in the postinst, even if it may not be

    Debian ships the package the same way.

    Signed-off-by: Esteve Varela Colominas <>
    Signed-off-by: Georgy Yakovlev <>

and Qt 6 is now in tree masked.
Comment 4 Esteve Varela Colominas 2022-08-04 10:32:19 UTC
(In reply to Sam James from comment #3)
> and Qt 6 is now in tree masked.

I guess that means the reference to the ::qt overlay that appears twice in the ebuild must be removed then.

Quick disclaimer: I haven't tested the qt6 build since telegram-desktop-3.7.x (was never published) and I have no idea if it works.
Comment 5 Vasily Pupkin 2022-08-07 22:02:22 UTC
I'm running telegram-desktop with qt6 now, and looks like it works. However,dev-qt/qtimageformats for qt6 is missing. Without it there will be no stickers. I made one from qtwayland ebuild, and it works fine.
Comment 6 Михаил 2023-05-13 14:30:33 UTC
net-im/telegram-desktop-4.8.1-r1 segfault at exit for USE=qt6.

Removing tdesktop-4.2.4-jemalloc-only-telegram.patch fix issue.
Comment 7 Esteve Varela Colominas 2023-05-13 16:01:32 UTC

Please open a separate issue and share your build.log, I have no idea what happened, and we need the patch due to the portage sandbox not interacting well with jemalloc. It shouldn't be causing any issues related to qt6 at all.
Comment 8 Reva Denis 2023-06-14 09:51:33 UTC
qt6 is unmasked now
Comment 9 Esteve Varela Colominas 2023-06-14 10:54:30 UTC
Thanks, good to know. I'll keep this issue around until it's stable, though. Qt5 has been unsupported upstream for a long time, and only kept around for windows 7, so a few things are broken on qt5 linux, and it's important that we switch at the shortest convenience.
Comment 10 Tomasz Golinski 2023-11-08 20:57:30 UTC
I tried building telegram-desktop with USE=qt6 and it turns out it requires Qml module, which is not enabled (at least on my system) by default. Without it, the configure step fails with:

-- Could NOT find Qt6Qml (missing: Qt6Qml_DIR)
CMake Error at Telegram/lib_webview/CMakeLists.txt:69 (find_package):
  Found package configuration file:


  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT
  FOUND.  Reason given by package:

  Failed to find required Qt component "Qml".

  Expected Config file at "/usr/lib64/cmake/Qt6Qml/Qt6QmlConfig.cmake" does
  NOT exist

  Configuring with --debug-find-pkg=Qt6Qml might reveal details why the
  package was not found.

  Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some
  of the path variables that find_package uses to try and find the package.

After rebuilding dev-qt/qtwayland, dev-qt/qttools, dev-qt/qt5compat with USE=qml it builds fine. I didn't check which package really needs this flag though.
Comment 11 Esteve Varela Colominas 2023-11-08 23:07:39 UTC
Thanks for pointing it out! Qt6QmlConfig.cmake lives in dev-qt/qtdeclarative, good chance you didn't need to enable USE=qml. I'll make sure to fix this.
Comment 12 Geoff Leach 2024-02-12 00:17:55 UTC
from comment #11

telegram-desktop builds for me without requiring USE=qml. 

(although it fails to run, with missing symbol in, possibly from mixing clang++-17 and g++-13 to build qtwayland and telegram-desktop respectively, will report in another bug)
Comment 13 Joe Kappus 2024-03-14 05:48:16 UTC
it needs qml on qtwayland-6 (when building with qt6, wayland, and webkit useflags), else the build will fail. Doesn't need it for qt5 as there's no qml useflag on qtwayland and it includes what's needed. (run equery belongs QWaylandQuickCompositor to see if yours has it) 

While it allows building with both qt6 and webview, doesn't actually make webview work on qt6, just allows it to build successfully. Trying to open stuff like @wallet goes from showing failed to start to 'Error: Webview has crashed' 

I'm going to run a bunch of builds in various configs tonight and see if I can gather more details. gcc-13 only, I am a wayland user on sway.