From c503d12e620293ba655c1d107775ac65786ee2e0 Mon Sep 17 00:00:00 2001 From: yusufipk Date: Thu, 27 Aug 2026 16:25:59 +0300 Subject: [PATCH] Leave both halves of libxkbcommon to the system Qt's xcb plugin links libxkbcommon and libxkbcommon-x11, and the x11 half hands keymap objects to the core half to free, so the pair must come from one build. The build machine has only the core half installed, so PyInstaller bundled that one alone and the other kept loading from the user's system; an Ubuntu 22.04 core freeing what a current x11 half allocated is the segfault of issue #57, which a Turkish layout happened to move to startup. Every desktop that can show a window carries both libraries from one build, so the bundle now carries neither. Fixes #57 --- packaging/dikte.spec | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packaging/dikte.spec b/packaging/dikte.spec index 6cfd651..f977777 100644 --- a/packaging/dikte.spec +++ b/packaging/dikte.spec @@ -56,6 +56,18 @@ analysis = Analysis( # noqa: F821 noarchive=False, ) +# Qt's xcb platform plugin uses libxkbcommon in two halves: the core library +# and libxkbcommon-x11, which allocates keymap objects and hands them to the +# core half to use and free, so the two must come from the same build. The +# build machine has only the core half installed, which had PyInstaller +# bundling that one while the other kept coming from the user's system, and a +# 22.04-era core freeing what a current x11 half allocated is the startup +# crash of issue #57. Ship neither: any desktop that can show a window +# carries both, from one build. +if not (MACOS or WINDOWS): + analysis.binaries = [entry for entry in analysis.binaries + if "libxkbcommon" not in entry[0]] + archive = PYZ(analysis.pure) # noqa: F821 executable = EXE( # noqa: F821