|
| 1 | +From 672262c8715b24485f82e18580fe33786dbce2b9 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Trevor Gamblin <tgamblin@baylibre.com> |
| 3 | +Date: Thu, 23 Jul 2026 10:57:00 -0400 |
| 4 | +Subject: [PATCH] depends: install_libavif.sh: fix cache LIBDIR for non-x86_64 |
| 5 | + hosts |
| 6 | + |
| 7 | +The GitHub Actions cache restore/save paths hardcode |
| 8 | +LIBDIR=/usr/lib/x86_64-linux-gnu, but on riscv64 the multiarch install |
| 9 | +path is /usr/lib/riscv64-linux-gnu. The cache-save cp then fails: |
| 10 | + |
| 11 | + cp: cannot stat '/usr/lib/x86_64-linux-gnu/libavif.so*': No such file or directory |
| 12 | + |
| 13 | +Because that cp isn't the last command in an && list, `set -e` |
| 14 | +doesn't stop the script there either, so it falls through with a |
| 15 | +stale working directory and breaks the next dependency's `pushd |
| 16 | +depends` in .ci/install.sh: |
| 17 | + |
| 18 | + .ci/install.sh: line 58: pushd: depends: No such file or directory |
| 19 | + |
| 20 | +Derive LIBDIR from `uname -m` instead of hardcoding the triplet. |
| 21 | + |
| 22 | +Upstream-Status: To upstream [relevant for non-x86_64 CI runners] |
| 23 | + |
| 24 | +Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> |
| 25 | +--- |
| 26 | + depends/install_libavif.sh | 4 ++-- |
| 27 | + 1 file changed, 2 insertions(+), 2 deletions(-) |
| 28 | + |
| 29 | +diff --git a/depends/install_libavif.sh b/depends/install_libavif.sh |
| 30 | +index b837f6d65..ae4d7f87a 100755 |
| 31 | +--- a/depends/install_libavif.sh |
| 32 | ++++ b/depends/install_libavif.sh |
| 33 | +@@ -5,7 +5,7 @@ version=1.4.2 |
| 34 | + |
| 35 | + if [[ "$GHA_LIBAVIF_CACHE_HIT" == "true" ]]; then |
| 36 | + |
| 37 | +- LIBDIR=/usr/lib/x86_64-linux-gnu |
| 38 | ++ LIBDIR=/usr/lib/$(uname -m)-linux-gnu |
| 39 | + |
| 40 | + # Copy cached files into place |
| 41 | + sudo cp ~/cache-libavif/lib/* $LIBDIR/ |
| 42 | +@@ -80,7 +80,7 @@ else |
| 43 | + |
| 44 | + if [ -n "$GITHUB_ACTIONS" ] && [ "$(uname)" != "Darwin" ]; then |
| 45 | + # Copy to cache |
| 46 | +- LIBDIR=/usr/lib/x86_64-linux-gnu |
| 47 | ++ LIBDIR=/usr/lib/$(uname -m)-linux-gnu |
| 48 | + rm -rf ~/cache-libavif |
| 49 | + mkdir -p ~/cache-libavif/lib |
| 50 | + mkdir -p ~/cache-libavif/include |
| 51 | +-- |
| 52 | +2.55.0 |
| 53 | + |
0 commit comments