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.
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.
Thank you for the update! >upstream is starting to stop caring seems to be the main problem there. :(
commit bf3c82dd6095765570a18a2c39282c485d5dcf4a Author: Esteve Varela Colominas <esteve.varela@gmail.com> 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 meaningful... Debian ships the package the same way. Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> and Qt 6 is now in tree masked.
(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.
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.
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.
@Михаил: 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.
qt6 is unmasked now
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.
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: /usr/lib64/cmake/Qt6/Qt6Config.cmake 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.
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.
from comment #11 telegram-desktop builds for me without requiring USE=qml. (although it fails to run, with missing symbol in libQt6WaylandClient.so.6, possibly from mixing clang++-17 and g++-13 to build qtwayland and telegram-desktop respectively, will report in another bug)
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.
The qt6 and kf6 bringup in gentoo is complete, and it seems to work fine for most people. Everything discussed in this bug has been processed, and other bugs exist for remaining issues. Thanks for testing!