From acb3ee2c8beb31797a9b0976f9ae99eb4ed09835 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 17 Aug 2026 16:59:47 +0100 Subject: [PATCH] release.yml: install arm64 shlibs on amd64 runner for cross-build shlibdeps When cross-building PostIt.Desktop for linux-arm64 from an amd64 runner, dpkg-shlibdeps fails to resolve arm64 shlibs (libc6, libstdc++6, libdl, libm, libpthread, libfontconfig, libgtk-3, etc.): dpkg-shlibdeps: error: cannot find library libdl.so.2 needed by debian/postit/usr/lib/postit/PostIt.Desktop (ELF format: 'elf64-little' abi: '020100b700000000'; RPATH: '') dh_shlibdeps: error: ... returned exit code 2 Add arm64 as a foreign architecture via dpkg and install the shlibs needed at build time. Minimal set: libc6, libstdc++6, libfontconfig1, libfreetype6, libgtk-3-0. libpthread / libdl / libm are pulled in transitively via libc6. Discovered via Forgejo Actions run #10 on tag 1.0.6. --- .forgejo/workflows/release.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 71b38ac..d615125 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -77,6 +77,18 @@ jobs: apt-get install -y --no-install-recommends \ build-essential debhelper imagemagick librsvg2-bin \ ca-certificates + # dpkg-shlibdeps at arm64 build time needs the arm64 + # shlibs (libc6, libstdc++6, libdl, libm, libpthread, + # libfontconfig, libgtk-3, etc.) to be present on the + # host. We add arm64 as a foreign architecture and pull + # them in. --no-install-recommends keeps the install + # surface minimal. + dpkg --add-architecture arm64 + apt-get update + apt-get install -y --no-install-recommends \ + libc6:arm64 libstdc++6:arm64 \ + libfontconfig1:arm64 libfreetype6:arm64 \ + libgtk-3-0:arm64 rm -rf /var/lib/apt/lists/* : > "$STATE_FILE"