telegram-desktop broken with 16k pi5 kernel

Problems with packages? Post here, using [tags] of the package name.

telegram-desktop broken with 16k pi5 kernel

Postby darksky » Fri Mar 21, 2025 1:48 pm

This issue is back again with telegram-desktop and 5.12.3-4 and jemalloc.

make_clickable_callback(MAGIC_URL_LOCAL, '
', 'https://archlinuxarm.org/forum', 'viewtopic.php?f=15&t=16881', ' class="postlink-local"')
darksky
 
Posts: 46
Joined: Thu Oct 15, 2020 5:57 pm

Re: telegram-desktop broken with 16k pi5 kernel

Postby darksky » Tue May 27, 2025 2:58 am

It still would be nice if telegram-desktop had jemalloc (so system version is used) added as a depend when building as opposed it using some version internally so the pi5 can run using a 16k kernel.

[ray@jellyfin ~]$ telegram-desktop
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
<jemalloc>: Unsupported system page size
../glib/glib/gprintf.c:350: failed to allocate memory
Aborted (core dumped)
darksky
 
Posts: 46
Joined: Thu Oct 15, 2020 5:57 pm

Re: telegram-desktop broken with 16k pi5 kernel

Postby graysky » Tue May 27, 2025 11:59 am

You're saying that adding jemalloc as a makedepends will fix this? Does it also need to be a depends?
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: telegram-desktop broken with 16k pi5 kernel

Postby darksky » Tue May 27, 2025 1:32 pm

I added it just as a depends like was stated in the first post link I posted. I am not sure if it would work as just makedepends. or not. Afterwards telegram-desktop will boot up ok on the pi5.

Guessing if it see that it is installed on the system it will not use it's version at build time.

[ray@jellyfin ~]$ ldd /usr/bin/telegram-desktop | grep jemalloc
libjemalloc.so.2 => /usr/lib/libjemalloc.so.2 (0x0000ffff021b0000)

It was weird though I could not get the package built with distcc this time around. It built just fine using my pi5 with -j4.

# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
# Contributor: hexchain <i@hexchain.org>

pkgname=telegram-desktop
pkgver=5.14.3
pkgrel=2
pkgdesc='Official Telegram Desktop client'
arch=('x86_64' 'aarch64')
url="https://desktop.telegram.org/"
license=('GPL-3.0-or-later WITH OpenSSL-exception')
depends=(
'abseil-cpp'
'ada'
'ffmpeg'
'glib2'
'hicolor-icon-theme'
'hunspell'
'jemalloc'
'kcoreaddons'
'libdispatch'
'libxcomposite'
'libxdamage'
'libxrandr'
'libxtst'
'lz4'
'minizip'
'openal'
'openh264'
'openssl'
'pipewire'
'protobuf'
'qt6-imageformats'
'qt6-svg'
'qt6-wayland'
'rnnoise'
'xxhash'
)
makedepends=(
'boost'
'cmake'
'git'
'glib2-devel'
'gobject-introspection'
'gperf'
'libtg_owt'
'microsoft-gsl'
'ninja'
'python'
'range-v3'
'tl-expected'
)
optdepends=(
'geoclue: geoinformation support'
'geocode-glib-2: geocoding support'
'geocode-glib: geocoding support'
'webkit2gtk-4.1: embedded browser features provided by webkit2gtk-4.1'
'webkit2gtk: embedded browser features provided by webkit2gtk'
'webkitgtk-6.0: embedded browser features provided by webkitgtk-6.0 (Wayland only)'
'xdg-desktop-portal: desktop integration'
)
_td_commit=51743dfd01dff6179e2d8f7095729caa4e2222e9
source=(
"https://github.com/telegramdesktop/tdesktop/releases/download/v${pkgver}/tdesktop-${pkgver}-full.tar.gz"
"git+https://github.com/tdlib/td.git#tag=${_td_commit}"
)
sha512sums=('1c8d6f3f858789c716bdaef8ef00896aac07ef8e6792489b80bf162b40db80dc2cf1831335269c4bc12e11c1b6326cbf8ffd40fc9d847c13196f540e15a1978d'
'd622b8f3580ee49415546d025c4ba45f5b2de50b315fc379dc57c0427c5f815c7cc3820cca937c12182ee461641bb61f87ebc99b6c74a1a666cea9a08f0f41a0')

build() {
CXXFLAGS+=' -ffat-lto-objects'

cmake -S td -B td/build \
-DCMAKE_BUILD_TYPE=None \
-DCMAKE_INSTALL_PREFIX="$PWD/td/install" \
-Wno-dev \
-DTD_E2E_ONLY=ON
cmake --build td/build
cmake --install td/build

# Turns out we're allowed to use the official API key that telegram uses for
# their snap builds:
#make_clickable_callback(MAGIC_URL_FULL, ' ', 'https://github.com/telegramdesktop/tdesktop/blob/8fab9167beb2407c1153930ed03a4badd0c2b59f/snap/snapcraft.yaml#L87-L88', '', ' class="postlink"')
# Thanks @primeos!
cmake -B build -S tdesktop-$pkgver-full -G Ninja \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_INSTALL_PREFIX="/usr" \
-Dtde2e_DIR="$PWD/td/install/lib/cmake/tde2e" \
-DCMAKE_BUILD_TYPE=Release \
-DTDESKTOP_API_ID=611335 \
-DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
cmake --build build
}

package() {
DESTDIR="$pkgdir" cmake --install build
}
darksky
 
Posts: 46
Joined: Thu Oct 15, 2020 5:57 pm

Re: telegram-desktop broken with 16k pi5 kernel

Postby graysky » Tue May 27, 2025 2:48 pm

Thank you for pointing it out. Builds with distcc find for me.

Added:make_clickable_callback(MAGIC_URL_FULL, ' ', 'https://github.com/archlinuxarm/PKGBUILDs/commit/1c0d317d25147d99cf4ad2387c469c89da27ad99', '', ' class="postlink"')
graysky
Developer
 
Posts: 1870
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: telegram-desktop broken with 16k pi5 kernel

Postby darksky » Wed May 28, 2025 10:52 am

Thank you @graysky. It works like a champ.
darksky
 
Posts: 46
Joined: Thu Oct 15, 2020 5:57 pm


Return to Packages

Who is online

Users browsing this forum: No registered users and 39 guests