From a451711e964a544a196db4eeda9002798d7eb3a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Gonz=C3=A1lez?= Date: Sat, 26 Apr 2025 16:25:25 +0200 Subject: [PATCH] Fix ARM64 Debian packages lacking dependencies It looks like cargo-deb v2.5.0 silently broke this for our use case, and other use cases which have been reported upstream: https://github.com/kornelski/cargo-deb/issues/21 To make dpkg-shlibdeps work more reliably until this inconsistent choice of multiarch and cross-build lib directories is sorted out, let's pass the documented `LD_LIBRARY_PATH` environment variable to ensure such libraries are always found. Interestingly, setting `DEB_HOST_ARCH` to a different value did not have any effect. --- .github/workflows/deploy.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 578e85d6..f94536c9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -103,8 +103,17 @@ jobs: # properly sudo apt-get -yq install libc6-arm64-cross libgcc-s1-arm64-cross - - name: Build deb archives + - name: Build Debian packages if: endsWith(matrix.target, '-linux-gnu') + env: + # The *-arm64-cross packages above install AArch64 libraries in + # /usr//lib instead of /usr/lib/, as expected by + # cargo-deb and dpkg-shlibdeps to find such shared libraries. + # Make both of them visible to such commands by adding that directory + # to the dynamic linker's library search path. See: + # - ("Errors" section) + # - + LD_LIBRARY_PATH: /usr/aarch64-linux-gnu/lib run: | mkdir -p "target/${{ matrix.target }}/release" mv target/oxipng "target/${{ matrix.target }}/release"