Package Details: karere 4.2.5-3

Git Clone URL: https://aur.archlinux.org/karere.git (read-only, click to copy)
Package Base: karere
Description: A fast, native WhatsApp client for Linux with GTK4/LibAdwaita
Upstream URL: https://github.com/tobagin/karere
Keywords: chat gnome gtk4 libadwaita messenger rust webkit whatsapp
Licenses: GPL-3.0-or-later
Submitter: bannert
Maintainer: bannert
Last Packager: bannert
Votes: 4
Popularity: 0.060057
First Submitted: 2025-09-17 17:09 (UTC)
Last Updated: 2026-09-15 22:56 (UTC)

Latest Comments

hzxiaxz commented on 2026-11-07 04:11 (UTC)

Upstream is at 4.3.5 now. I refreshed the patch in the gist (same URL): it brings the package to 4.3.5 via update.sh and also installs the CEF LICENSE.txt to /usr/share/licenses/karere/ as you suggested. 4.3.5 still pins cef-152.0.6-proprietary-codecs, so the CEF archive and checksum are unchanged from 4.3.0. Built with a full makepkg here; the RUNPATH is $ORIGIN and ldd shows no missing libraries. Applies with git am: https://gist.github.com/hz-xiaxz/72e06758556caeaa14398a943301dd03

hzxiaxz commented on 2026-09-19 05:49 (UTC)

4.3.0 moves to CEF 152.0.6, so a pkgver-only bump builds against the wrong runtime. I wrote a small update.sh that reads the CEF release tag / version / sha256 from upstream's Flatpak manifest at the target tag and updates pkgver, _cefver, checksums and .SRCINFO together (it can run right after Renovate's bump). Patch incl. the 4.3.0 update, applies with git am:https://gist.github.com/hz-xiaxz/72e06758556caeaa14398a943301dd03

bannert commented on 2026-09-16 06:47 (UTC)

@hzxiaxz, thanks for the detailed analysis — verified and published.

Your patch is applied in karere 4.2.5-3, essentially as proposed. Before publishing, I confirmed the mechanism independently in a throwaway container (same karere build, only the CEF runtime swapped, 30 s sampling window):

  • generic CEF from cef-dll-sys (no upstream karere-151-detach-worksource.patch): main GTK thread pinned at ~100% of one core, all other threads idle — visible immediately at the login screen, no WhatsApp session needed
  • pinned cef-150.0.10-proprietary-codecs runtime: same window, main thread at ~1%

That matches your numbers (99% vs ~1.27%) and confirms the WorkSource / external_message_pump diagnosis from tobagin/karere#185.

I also checked the patch details before applying: the pinned CEF version matches upstream's release notes ("Includes the message-pump idle fix (#151)"), the sha256 matches the actual release asset, CEF_PATH is exported in both build() and package(), and the install list matches the archive's Release/Resources layout.

One optional nit for a future pass: neither the old nor the new packaging ships the CEF LICENSE.txt, which the MPL-licensed components inside libcef.so technically ask for. Harmless as is, but a one-line install would tidy it up.

hzxiaxz commented on 2026-09-14 16:40 (UTC)

@bannert, I tracked down the high-CPU issue reported in tobagin/karere#185 (https://github.com/tobagin/karere/issues/185). It is caused by the CEF runtime selected by the current AUR packaging.

The 4.2.5-2 package installs the generic CEF runtime downloaded by cef-dll-sys. That runtime does not contain Karere's upstream karere-151-detach-worksource.patch. Because Karere enables external_message_pump, the unpatched Chromium GLib WorkSource remains attached and repeatedly reports an immediate timeout, making the GTK main thread busy-loop in g_main_context_iteration.

I rebuilt the package using Karere's matching custom CEF release, cef-150.0.10-proprietary-codecs, and packaged its Release and Resources files together as a version-matched runtime.

A/B measurements using the same machine, account and session:

  • Current AUR 4.2.5-2 with generic CEF: approximately 99% CPU in the main process.
  • Rebuilt package with Karere's custom CEF: 127 ms task-clock over 10 seconds, approximately 1.27% CPU.

I installed the resulting package system-wide and confirmed that /usr/lib/karere/karere loads /usr/lib/karere/libcef.so. The WhatsApp session loads normally and the busy-loop remains gone.

Proposed PKGBUILD and .SRCINFO patch:

https://gist.github.com/hz-xiaxz/5758bda2ae58827a121b92eb2680113f

SHA-256:

127b80ec47a5e89ac546f2cb48de87266fe5370e1f4d695536f922e35c0d277d

The patch:

  1. downloads Karere's upstream custom CEF archive with a fixed checksum;
  2. exports CEF_PATH during both build and package phases;
  3. installs libcef.so, helper libraries, snapshots, PAK files, ICU data and locales from the same verified CEF distribution;
  4. bumps pkgrel to 3.

It can be applied from the AUR package repository with:

bash curl -L https://gist.githubusercontent.com/hz-xiaxz/5758bda2ae58827a121b92eb2680113f/raw/karere-aur-cef-fix.patch | git apply

bannert commented on 2026-09-11 09:33 (UTC) (edited on 2026-09-11 09:33 (UTC) by bannert)

@hzxiaxz Thanks for the thorough report, all four points confirmed and fixed in 4.2.5-2:

  • options=('!lto'), exactly as diagnosed (ring's C objects vs. rust-lld).
  • The binary and the CEF runtime (libcef.so, GL/Vulkan helpers, *.pak, icudtl.dat, v8_context_snapshot.bin, vk_swiftshader_icd.json, locales/, chrome-sandbox) now install to /usr/lib/karere with patchelf --set-rpath '$ORIGIN', and /usr/bin/karere is a relative symlink. Same layout you proposed; /proc/self/exe resolves through the symlink so resource lookup keeps working.
  • depends: webkitgtk-6.0 is gone (v4's meson only checks glib/gio/gtk4/libadwaita). Added the libcef.so NEEDED set as read from the built artifact with readelf: nss, nspr, alsa-lib, libx11, libxcb, libxcomposite, libxdamage, libxext, libxfixes, libxrandr, libxkbcommon, mesa, systemd-libs, libcups. CEF 150 doesn't link libdrm/fontconfig/freetype2 (Chromium ships its own font stack), so those are deliberately omitted; atk/at-spi and expat arrive transitively.
  • package() now re-exports the build RUSTFLAGS before meson install. Meson's cargo target is build_always_stale, so install re-invoked cargo inside fakeroot with different flags, which rebuilt everything and leaked $srcdir into the binary. With the env restored, makepkg's packaging-issues check passes clean. cmake and patchelf joined makedepends (cef_dll_wrapper needs the former), and the v3-only --offline sed that no longer matched anything in v4 was dropped.

Verified with a full makepkg in a clean archlinux container: builds, ldd resolves every library including libcef.so via $ORIGIN (checked through the symlink too), no $srcdir references, namcap quiet apart from glibc-stub noise. 143.7 MiB compressed, 352 MiB installed, which matches your numbers.

Heads up for anyone building from AUR: the build now downloads the CEF distribution (~400 MiB) and the install footprint is correspondingly large. If anything still misbehaves, please follow up here.

hzxiaxz commented on 2026-09-10 23:01 (UTC)

karere 4.2.5-1 fails to build, and the package it would produce does not run. All four points below were verified on a current Arch system (rustc 1.98.1, gcc 16.2.1); the patch at the end produces a working package.

1) Build failure: undefined ring_core_0_17_14__* symbols when linking the cef-dll-sys build script. Cause: makepkg's default OPTIONS contain lto, so ring's C sources are compiled with -flto=s whose symtab holds only __gnu_lto_slim. rustc >= 1.90 links with rust-lld by default, and rust-lld cannot read GCC's LTal crate depending on ring 0.17.14: it fails with CFLAGS=-flto=auto, and links fine either without it or with -ffat-lto-objects added. Fix: options=('!lto'

2) The package ships onNEEDED libcef.so and no RUNPATH, so it dies with error while loadin cef-dll-sys downloads the CEF distribution to build/target/releaselinux_x86_64 and copiesit beside the binary, b rules for any of it. CEF also resolves resources.pak / icudtl.dat / locales relative to /proc/self/exe, so the executable. Working layout: binary plus CEF runtime in /usr/lib/karere, rpath set to $ORIGIN, and /usr/bin/karere elf/exe resolves through the symlink, so resource lookup still works).

3) depends still lists webkitgtk-6.0, which v4 no longer uses: meson.build only checks glib-2.0, gio-2.0, gtk4 and libadwaita-1, and the only webkit references left in sirectories. Converselythe libraries libcef.so m depends.

4) package() does not ed() sets, and meson install re-runs ninja, so cargo recompiles the whole crate graph inside fakeroot withpath-prefix is lost. With the debug option on this is masked by the /usr/src/debug remap makepkg adds; turn debug off and it shows up as "Package contains reference to $srcdir".

Patch:

options=('!lto') depends=( 'gtk4' 'libadwaita' 'glib2' 'hicolor-icon-theme' 'dbus' 'cairo' 'pango' - 'webkitgtk-6.0' + # libcef.so runtime libraries (from readelf -d NEEDED) + 'nss' 'nspr' 'alss' 'libx11' 'libxcb' + 'libxcomposite' 'libxdamage' 'libxext' 'libxfixes' 'libxrandr' + 'libxkbcommon' 'm ) makedepends=( ... 'pat

package() { cd "$srcdir/$pkgname-$pkgver" + export RUSTFLAGS=/build" meson install -C build --destdir="$pkgdir" + + local cefdir + cefdir=$(find "$starget/release/build" \ + -maxdepth 3 -type d -name 'cef_linux_*' -print -quit) + [[ -n $cefdir ]] ot found" >&2; return 1; + + install -d "$pkgd + install -m755 -t "$pkgdir/usr/lib/karere" \ + "$cefdir"v2.so,libvk_swiftshader.so.1} + install -m644 -t + "$cefdir"/{chrome_100_percent.pak,chrome_200_percent.pak,resour + "$cefdir"hot.bin,vk_swiftshader_ic + cp -a "$cefdir/locales" "$pkgdir/usr/lib/karere/" + + mv "$pkgdir/usr/bin/karere" "$pkgdir/usr/lib/karere/karere" + patchelf --set-rpb/karere/karere" + ln -s ../lib/karere/karere "$pkgdir/usr/bin/karere" ... }

With this the package builds and runs: 144 MB compressed, 368 MB installed, of which libcef.so is 2

drakkar1969 commented on 2026-01-27 20:39 (UTC)

Requires blueprint-compiler as a make dependency