Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915109 - net-im/telegram-desktop: Fails to configure on all version before v4.9.4 with USE="qt6 wayland": "Failed to find required Qt component "WaylandCompositor"
Summary: net-im/telegram-desktop: Fails to configure on all version before v4.9.4 with...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PullRequest
Depends on: 915992
Blocks:
  Show dependency tree
 
Reported: 2023-10-03 11:37 UTC by zurabid2016
Modified: 2023-12-11 13:25 UTC (History)
3 users (show)

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


Attachments
emerge --info '=net-im/telegram-desktop-4.8.1-r3::gentoo' (telegram-emerge-info.log,7.95 KB, text/plain)
2023-10-11 16:04 UTC, zurabid2016
Details
emerge -pqv '=net-im/telegram-desktop-4.8.1-r3::gentoo' (telegram-emerge-pqv.log,130 bytes, text/plain)
2023-10-11 16:04 UTC, zurabid2016
Details
Build log of '=net-im/telegram-desktop-4.8.1-r3::gentoo' with failed configure (build-noansi.log,10.31 KB, text/plain)
2023-10-11 16:05 UTC, zurabid2016
Details

Note You need to log in before you can comment on or make changes to this bug.
Description zurabid2016 2023-10-03 11:37:50 UTC
Telegram/lib_webview depends on Qt component called WaylandCompositor. This component is a part of dev-qt/qtwayland package and since https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f2c0be9302270ad97d4b9a434adea3402fd6282b is controlled by the default-off USE flag, while net-im/telegram-desktop depends on plain dev-qt/qtwayland.

This causes telegram-desktop to fail in the configure stage, because it is unable to find "required Qt component "WaylandCompositor"."
The find_package clause in one of CMakeLists, which itself was added by the following commit: https://github.com/desktop-app/lib_webview/commit/6ee92c066c6b75349980670edf795990f26b2f62 and relaxed by https://github.com/desktop-app/lib_webview/commit/5b9092bcb27a207fed3cb2155bb98db46d7cedfa, requires WaylandCompositor if and only if Wayland integration 
is enabled (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION=no). This parameter is only available on Qt > 6 (see https://github.com/desktop-app/cmake_helpers/blob/b1b0e95b091f298c87cb9ec4458f426574221ca4/external/qt/package.cmake#L51), therefore only setups with both "qt6" and "wayland" USE flags turned on are affected.

The easiest solution might be to depend on qtwayland[compositor(+)] like that:
qt6? (
  wayland? (
     dbus? ( dev-qt/qtwayland:6[compositor(+)] )
     !dbus? ( dev-qt/qtwayland:6 )
  )
)

By the way, the commit which makes WaylandCompositor optional is included upstream since v4.9.4: https://github.com/telegramdesktop/tdesktop/commit/02e37ab2f202d51b8dbcf5cc554d0da2a82ae060
Comment 1 Ionen Wolkens gentoo-dev 2023-10-03 12:37:21 UTC
>By the way, the commit which makes WaylandCompositor optional
>is included upstream since v4.9.4
I do assume webview is something scarcely used, if build system allows it then it should probably be optional and disabled by default in upcoming bump to match that it is disabled on qtwayland (thing is very large in qtwayland all while being scarcely used, essentially just a waste if feature is unused).

(ideally please include emerge --info and a failed build.log for completeness even when it does not feel needed)
Comment 2 Yury Katuar 2023-10-05 16:32:43 UTC
It's not only webview that requires qtwayland:6[compositor], it's also one of the requirements to get rid of client side decorations. The other is the correct value of DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION, its evaluation by cmake is currently broken as mentioned in https://bugs.gentoo.org/910544
Comment 3 zurabid2016 2023-10-11 16:04:26 UTC
Created attachment 872585 [details]
emerge --info '=net-im/telegram-desktop-4.8.1-r3::gentoo'
Comment 4 zurabid2016 2023-10-11 16:04:57 UTC
Created attachment 872586 [details]
emerge -pqv '=net-im/telegram-desktop-4.8.1-r3::gentoo'
Comment 5 zurabid2016 2023-10-11 16:05:38 UTC
Created attachment 872587 [details]
Build log of '=net-im/telegram-desktop-4.8.1-r3::gentoo' with failed configure
Comment 6 zurabid2016 2023-10-12 17:01:29 UTC
(In reply to Ionen Wolkens from comment #1)
> (ideally please include emerge --info and a failed build.log for
> completeness even when it does not feel needed)
After a bit of rest :) I have finally managed to attach the required info.

> I do assume webview is something scarcely used, if build system allows it then
> it should probably be optional and disabled by default in upcoming bump to
> match that it is disabled on qtwayland (thing is very large in qtwayland all
> while being scarcely used, essentially just a waste if feature is unused).
Sadly (AFAIK) there is no way to disable this particular component, so, most likely, we will have to make Telegram depend on dev-qt/qtwayland:6[compositor]
Comment 7 Ionen Wolkens gentoo-dev 2023-10-12 19:03:10 UTC
(In reply to zurabid2016 from comment #6)
> Sadly (AFAIK) there is no way to disable this particular component, so, most
> likely, we will have to make Telegram depend on
> dev-qt/qtwayland:6[compositor]
Well, maybe it works with DISABLE_FIND_PACKAGE? Back when I wrote this, the bump hadn't been done yet, but the bump did address this.

    qt6? (
        wayland? ( >=dev-qt/qtwayland-6.5:6[compositor] )
        webkit? (
            >=dev-qt/qtdeclarative-6.5:6
            >=dev-qt/qtwayland-6.5:6[compositor]

Albeit I'm not sure the first one makes sense? I say that because it's preventing it to find compositor with USE=-webkit, but then still depends on it.

        -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandClient=$(usex !wayland)
        ## Only used in Telegram/lib_webview/CMakeLists.txt
        -DCMAKE_DISABLE_FIND_PACKAGE_Qt${qt}WaylandCompositor=$(usex !webkit)

On a side-note, Qt5 is going to make compositor optional soon'ish as well.
https://github.com/gentoo/qt/pull/271
Comment 8 Esteve Varela Colominas 2023-10-19 09:05:28 UTC
I was sure I added "wayland? ( >=dev-qt/qtwayland-6.5:6[compositor] )" for a reason, though I now can't remember what that was.
I can't think of a reason it'd help anything, since it's disabled with FIND_PACKAGE, so I'm gonna remove it again.
Comment 9 Larry the Git Cow gentoo-dev 2023-10-19 21:15:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6fa5bdce32d90612b33e67edf40489d4f0d4053b

commit 6fa5bdce32d90612b33e67edf40489d4f0d4053b
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2023-10-19 09:05:38 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2023-10-19 21:15:21 +0000

    net-im/telegram-desktop: Remove redundant dependency
    
    Bug: https://bugs.gentoo.org/915109
    Closes: https://github.com/gentoo/gentoo/pull/33405
    Thanks-to: Ionen Wolkens <ionen@gentoo.org>
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 ...{telegram-desktop-4.10.3.ebuild => telegram-desktop-4.10.3-r1.ebuild} | 1 -
 1 file changed, 1 deletion(-)
Comment 10 Larry the Git Cow gentoo-dev 2023-12-11 13:25:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7497d83f469b739fcc81775878c5e59c2000e5c8

commit 7497d83f469b739fcc81775878c5e59c2000e5c8
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2023-12-10 22:30:20 +0000
Commit:     Yixun Lan <dlan@gentoo.org>
CommitDate: 2023-12-11 13:23:32 +0000

    net-im/telegram-desktop: Drop stable
    
    The list of bugs has become untenable, the package is essentially
    unusable, and there's no clear idea of when glibmm will be bumped.
    
    Sorry for the inconveniences...
    
    Bug: https://bugs.gentoo.org/915992
    Closes: https://bugs.gentoo.org/877067
    Closes: https://bugs.gentoo.org/910544
    Closes: https://bugs.gentoo.org/911395
    Closes: https://bugs.gentoo.org/912896
    Closes: https://bugs.gentoo.org/914419
    Closes: https://bugs.gentoo.org/914902
    Closes: https://bugs.gentoo.org/915109
    Closes: https://bugs.gentoo.org/915237
    Closes: https://bugs.gentoo.org/915982
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Yixun Lan <dlan@gentoo.org>

 net-im/telegram-desktop/Manifest                   |   1 -
 .../files/tdesktop-4.4.1-fix-dupe-main-decl.patch  |  26 ---
 .../telegram-desktop-4.8.1-r3.ebuild               | 210 ---------------------
 3 files changed, 237 deletions(-)