https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ Issue: net-im/telegram-desktop-2.7.4 fails to compile with gcc-11. Discovered on: amd64 (internal ref: ci) NOTE: This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
Created attachment 705807 [details] build.log.xz build log and emerge --info (compressed because it exceeds attachment limit, use 'xzless' to read it)
Possible context of error(s): /usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/type_traits:2954:7: error: static assertion failed: each argument type must be a complete class or an unbounded array
Same problem but different error FAILED: Telegram/CMakeFiles/td_ui.dir/SourceFiles/payments/ui/payments_panel.cpp.o
Created attachment 705843 [details] emerge --build
Note this isn't a regression; 2.7.1 had the same problem.
yep, it's GCC-11.1
This happens because gcc-11 defaults to C++17. Appending -std=c++14 (or -std=gnu++14) to CXXFLAGS should solve this one.
(In reply to Stephan Hartmann from comment #7) > This happens because gcc-11 defaults to C++17. Appending -std=c++14 (or > -std=gnu++14) to CXXFLAGS should solve this one. But it's not.
It would not be able to link with tg_owt/abseil if messing up with standard. Everything in this stack already requires cxx17 afaik, but I don’t have time to dig it. At least in latest abseil I’ve even removed building with older std. And building tg with cxx17 does not solve it unfortunately, that’s the first thing I’ve tested.
(In reply to Georgy Yakovlev from comment #9) > It would not be able to link with tg_owt/abseil if messing up with standard. > Everything in this stack already requires cxx17 afaik, but I don’t have time > to dig it. > At least in latest abseil I’ve even removed building with older std. > And building tg with cxx17 does not solve it unfortunately, that’s the first > thing I’ve tested. On top of that, older telegram doesn't work with newest tg_owt version, in fact, by default, it complains about missing of older version
Sorry for taking so long. I don't plan on switching to GCC 11 on my main machine for a while yet so I put it off (also hoping someone else might come up with a solution, these things are a pain to debug). Today I've fixed it, submitted it upstream and updated the ebuild. Please give proxy-maint some time to review and merge it. In the mean time, you can grab the fixed ebuild from the linked pull request and test it for yourself. As always, thanks for reporting the bug!
(In reply to Petr Šabata from comment #5) > Note this isn't a regression; 2.7.1 had the same problem. I can't reproduce this. Since the fix I created applies to code that was only introduced since 2.7.2, if 2.7.1 has any issues building with GCC 11, it's for a different reason. Can you reprocude it, and create a new issue with a build.log, emerge --info and all that good stuff?
Confirm that patch works good.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bf6fe4f653ded715ab500b5911d394547be42fb3 commit bf6fe4f653ded715ab500b5911d394547be42fb3 Author: Esteve Varela Colominas <esteve.varela@gmail.com> AuthorDate: 2021-05-08 14:17:28 +0000 Commit: Georgy Yakovlev <gyakovlev@gentoo.org> CommitDate: 2021-05-09 08:04:43 +0000 net-im/telegram-desktop: Fix build with GCC 11 Closes: https://bugs.gentoo.org/787968 Thanks-to: Agostino Sarubbo <ago@gentoo.org> Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/20729 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org> .../files/tdesktop-2.7.4-webview-fix-gcc11.patch | 25 ++++++++++++++++++++++ .../telegram-desktop/telegram-desktop-2.7.4.ebuild | 2 ++ 2 files changed, 27 insertions(+)
Created attachment 706689 [details] telegram log
It's not fixed here ^
(In reply to Marco Scardovi from comment #16) > It's not fixed here ^ It is fixed for the CI. I don't see this line in your log: * Applying tdesktop-2.7.4-webview-fix-gcc11.patch ... So I suppose that your tree has not been synced.
(In reply to Agostino Sarubbo from comment #17) > (In reply to Marco Scardovi from comment #16) > > It's not fixed here ^ > > It is fixed for the CI. > > I don't see this line in your log: > > * Applying tdesktop-2.7.4-webview-fix-gcc11.patch ... > > > So I suppose that your tree has not been synced. My bad, I don't know what's happened but at 2nd attemp the patch has been applied
Ok, find it. On both times I have tried to install it I have launched emerge --sync too. At first attempt the patch was not present while at second it was (I use gentoo-mirror as repo for emerge)