Issue: net-im/telegram-desktop-2.7.4 fails to compile with gcc-11.
Discovered on: amd64 (internal ref: ci)
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
Created attachment 705807 [details]
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
Created attachment 705843 [details]
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):
Author: Esteve Varela Colominas <email@example.com>
AuthorDate: 2021-05-08 14:17:28 +0000
Commit: Georgy Yakovlev <firstname.lastname@example.org>
CommitDate: 2021-05-09 08:04:43 +0000
net-im/telegram-desktop: Fix build with GCC 11
Thanks-to: Agostino Sarubbo <email@example.com>
Signed-off-by: Esteve Varela Colominas <firstname.lastname@example.org>
Signed-off-by: Georgy Yakovlev <email@example.com>
.../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]
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)