From 81576f7be83324729179eacc06d86d25d47a1693 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Wed, 13 Nov 2024 20:27:40 -0500 Subject: [PATCH] Install libstdc++6:amd64 in the container Installing `nodejs:amd64` in a 32-bit container to work around https://github.com/actions/checkout/issues/334 works by causing 64-bit libraries the external mapped `node20` needs (even though `nodejs:amd64` in Debian is Node 18), as described in https://github.com/actions/checkout/issues/334#issuecomment-2435101135. But this installed more packages than are needed. It turns out that, at least with this image, the only libraries the container is missing are the 32-bit libstdc++ and its dependencies. It is therefore sufficient to install the `libstdc++6:amd64` package. This commit makes that change, squashing a few investigatory steps that led to it (EliahKagan#5). * See if libssl3:amd64 is all we need * Temporarily omit even libssl3:amd64 With only `libssl3:amd64` and its dependencies, `actions/checkout` did fail, but with a different error than before, showing a clear error about a missing library, `libstdc++`. /usr/bin/docker exec c1e55a75713e2c4fd08241fae9f4fecbe3cbb179be45174b3138390a1238090e sh -c "cat /etc/*release | grep ^ID" /__e/node20/bin/node: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory Before trying adding that, I want to check that enabling `amd64` in `dpkg` has the expected *no effect* on the error messages, compared to not enabling it. * Install libstdc++6:amd64 in the container This does not add back libssl3:amd64 yet, in case it is not needed, though I expect that it will be needed. --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 051e4211a1b..e6843f4b2e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -166,7 +166,7 @@ jobs: run: | dpkg --add-architecture amd64 # For 64-bit Node.js, for actions. apt-get update - apt-get install --no-install-recommends -y build-essential ca-certificates cmake curl git jq libssl-dev nodejs:amd64 pkgconf + apt-get install --no-install-recommends -y build-essential ca-certificates cmake curl git jq libssl-dev libstdc++6:amd64 pkgconf - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: