Created attachment 861641 [details] emerge --info telegram-desktop Telegram with USE=qt6 works but crash on exit. $ telegram-desktop Painter::begin: Paint device returned engine == 0, type: 2 QWidget::render: Cannot render with an inactive painter qt.svg: Error while inflating gzip file: SVG format check failed … qt.svg: Error while inflating gzip file: SVG format check failed qt.gui.imageio.jpeg: Corrupt JPEG data: premature end of data segment Segmentation fault (core dumped) $ telegram-desktop … corrupted size vs. prev_size in fastbins Aborted (core dumped)
Created attachment 861642 [details] Build log
Telegram exits normally if patch tdesktop-4.2.4-jemalloc-only-telegram.patch not used. Without patch: $ ldd /usr/bin/telegram-desktop | fgrep jem libjemalloc.so.2 => /usr/lib64/libjemalloc.so.2 (0x00007f02bf600000) Gentoo ebuild: $ ldd /usr/bin/telegram-desktop | fgrep jem $ Also telegram quit without crash if preloaded jemalloc.
Created attachment 861644 [details] Build log without jemalloc cmake patch Build logs files differ in parts: 1. Linking with jemalloc utilities codegen_style, codegen_emoji, codegen_lang 2. Linking with jemalloc application. For my opinion patch should affect only first part and should not prevent linking telegram-desktop with jemalloc.
Reproduced; jemalloc is indeed not linked when it should be. I wonder if replacing INTERFACE with PRIVATE in the telegram target_link_libraries would work. I'll test more tomorrow.
Telegram linked with jemalloc with patch from https://github.com/gentoo/gentoo/pull/31044
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce4cbbe6125f6444606f3c3df4c82c93e17a8e64 commit ce4cbbe6125f6444606f3c3df4c82c93e17a8e64 Author: Esteve Varela Colominas <esteve.varela@gmail.com> AuthorDate: 2023-05-15 14:20:02 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-05-16 17:07:16 +0000 net-im/telegram-desktop: Fix jemalloc linkage Updated patch allows for jemalloc to be linked properly Closes: https://bugs.gentoo.org/906302 Thanks-to: Михаил <spike@lmu.name> Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/31044 Signed-off-by: Sam James <sam@gentoo.org> .../tdesktop-4.2.4-jemalloc-only-telegram-r1.patch | 43 ++++++++++++++++++++++ ...-r1.ebuild => telegram-desktop-4.6.5-r2.ebuild} | 2 +- ...-r1.ebuild => telegram-desktop-4.8.1-r2.ebuild} | 2 +- 3 files changed, 45 insertions(+), 2 deletions(-)