From 04badb070e0d48dfeca9952e55efd46b98d785b1 Mon Sep 17 00:00:00 2001 From: vasilito Date: Thu, 9 Jul 2026 00:49:15 +0300 Subject: [PATCH] Fix zsh cross-compilation: --srcdir flag + awk permissions Added --srcdir="${COOKBOOK_SOURCE}" to zsh configure flags to fix the config.status error '/subs1.awk: Permission denied' during cross-compilation. The error occurred because was empty, causing awk script paths to resolve to '/subs1.awk' instead of the correct source directory path. Also added chmod +x on Src/*.awk to ensure configure-generated config.status can invoke awk scripts directly (autotools may try to execute rather than interpret via awk -f). This unblocks Phase 2.1 end-to-end build test. --- recipes/shells/zsh/recipe.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/recipes/shells/zsh/recipe.toml b/recipes/shells/zsh/recipe.toml index edb533b0d6..97dc9e6b05 100644 --- a/recipes/shells/zsh/recipe.toml +++ b/recipes/shells/zsh/recipe.toml @@ -18,6 +18,7 @@ script = """ DYNAMIC_INIT COOKBOOK_CONFIGURE_FLAGS+=( + --srcdir="${COOKBOOK_SOURCE}" --disable-gdbm --disable-pcre --disable-cap @@ -26,6 +27,10 @@ COOKBOOK_CONFIGURE_FLAGS+=( "${COOKBOOK_CONFIGURE}" "${COOKBOOK_CONFIGURE_FLAGS[@]}" +# Ensure awk scripts are executable (cross-compilation fix for +# config.status which tries to invoke awk scripts directly). +chmod +x "${COOKBOOK_SOURCE}"/Src/*.awk 2>/dev/null || true + # Pre-generate signames artifacts deterministically for Redox cross builds. gawk -f "${COOKBOOK_SOURCE}/Src/signames1.awk" "${COOKBOOK_ROOT}/prefix/${TARGET}/sysroot/${TARGET}/include/signal.h" > "${COOKBOOK_BUILD}/Src/sigtmp.c" "${COOKBOOK_ROOT}/bin/${TARGET}-gcc" -E -P "${COOKBOOK_BUILD}/Src/sigtmp.c" > "${COOKBOOK_BUILD}/Src/sigtmp.out"