From 37f5f0ca16212a59c177052e87ee9258fe49c004 Mon Sep 17 00:00:00 2001 From: Eliah Kagan Date: Wed, 13 Nov 2024 17:39:17 -0500 Subject: [PATCH] Install 64-bit Node in container, for its libraries This is a workaround for a problem that is the same or similar to https://github.com/actions/checkout/issues/334: Run actions/checkout@v4 /usr/bin/docker exec a7f94cb30b99bd1ee851270fad4768421eddecd7e8fa674f56c4f2d2d64210b6 sh -c "cat /etc/*release | grep ^ID" exec /__e/node20/bin/node: no such file or directory I had not originally noticed the `cat /etc/*release` part of that output, and had surmised that this was a subtly different problem, but it looks like it's probably exactly the same. The workaround in https://github.com/actions/checkout/issues/334#issuecomment-2435101135 is applied in this commit and seems to be working. As noted there, the absence of some 64-bit libraries in 32-bit containers prevents the (existing and already mapped) 64-bit Node.js outside the container from being run, and installing 64-bit Node.js in the container via `apt-get` (even though, in this case, it is a different version) installs the needed dependencies, letting the (existing) Node.js run. (Other problems, related to `safe.directory` protections as well as tests that are known to fail due to assertions about the size of data structures that implicitly assume 64-bit targets, do still prevent the job from succeeding. But `actions/checkout@v4`, which was failing before, seems to be working, as do the other actions.) --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2aaa78ae6e..051e4211a1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -164,11 +164,9 @@ jobs: steps: - name: Prerequisites 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 pkgconf - #mkdir -p /__e/node20/bin - #ln -s /usr/bin/node /__e/node20/bin/node - file /__e/node20/bin/node + apt-get install --no-install-recommends -y build-essential ca-certificates cmake curl git jq libssl-dev nodejs:amd64 pkgconf - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: