From 1a49b3836f50c3ca638ef4a3b1c3279923491e2d Mon Sep 17 00:00:00 2001 From: guihkx <626206+guihkx@users.noreply.github.com> Date: Sun, 21 May 2023 08:02:33 -0300 Subject: [PATCH] ci/linux: bundle an up to date version of libXft This fixes the following error when you launch the app with an emoji font installed (e.g. Noto Emoji): X Error of failed request: BadLength (poly request too large or internal Xlib length error) Major opcode of failed request: 139 (RENDER) Minor opcode of failed request: 20 (RenderAddGlyphs) Serial number of failed request: 277 Current serial number in output stream: 300 This has been fixed[1] in libXft 2.3.5[2], but unfortunately Ubuntu 20.04 (which we currently use in the Linux CI workflow), still has version 2.3.3, so we have to build it ourselves. [1] https://gitlab.freedesktop.org/xorg/lib/libxft/-/merge_requests/12 [2] https://lists.freedesktop.org/archives/xorg-announce/2022-September/003209.html --- .github/workflows/ci.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b88e635..eaf3aed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -108,10 +108,22 @@ jobs: source ./env/bin/activate python3 -m pip install pyinstaller + # NOTE: Remove this step if/once libxft gets updated to 2.3.5 or newer on Ubuntu 20.04, which currently has 2.3.3. + - name: Build a recent version of libXft + run: | + mkdir -p /tmp/libXft + cd /tmp/libXft + curl -L https://xorg.freedesktop.org/releases/individual/lib/libXft-2.3.8.tar.xz -o libXft.tar.xz + tar xvf libXft.tar.xz + cd libXft-* + ./configure --prefix=/tmp/libXft --sysconfdir=/etc --disable-static + make + make install-strip + - name: Create portable executable run: | source ./env/bin/activate - xvfb-run --auto-servernum pyinstaller build.spec + LD_LIBRARY_PATH=/tmp/libXft/lib xvfb-run --auto-servernum pyinstaller build.spec - name: Show PyInstaller warnings run: |