From fea4cd1b0fb62172fea0d10576774d3fbc33aaee Mon Sep 17 00:00:00 2001 From: Mihai Petracovici Date: Sat, 11 Jul 2026 18:30:56 -0600 Subject: [PATCH] ephemeral run: Fix missing libgcc.so errors in entrypoint In some host distributions not all system libraries are in the top-level /usr/lib and /usr/lib64 directories. Since we are mounting /usr from the host into the container, we need to account for that by also mounting the local ld.so.cache Signed-off-by: Mihai Petracovici --- crates/kit/src/run_ephemeral.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/kit/src/run_ephemeral.rs b/crates/kit/src/run_ephemeral.rs index dbcd25fc8..0f05b4195 100644 --- a/crates/kit/src/run_ephemeral.rs +++ b/crates/kit/src/run_ephemeral.rs @@ -839,6 +839,11 @@ fn prepare_run_command_with_temp( // (We don't want all of `/` as that would scope in a lot more) "/usr:/run/tmproot/usr:ro", "-v", + // Some host distributions don't have all libraries in /lib or /lib64. + // We mount the current ld.so.cache into the tmproot so it matches + // library locations in the mounted /usr + "/etc/ld.so.cache:/run/tmproot/etc/ld.so.cache:ro", + "-v", &format!("{}:{}", entrypoint_path, ENTRYPOINT), "-v", &format!("{self_exe}:/run/selfexe:ro"),