diff --git a/local/recipes/libs/mesa/recipe.toml b/local/recipes/libs/mesa/recipe.toml index fa098fad6e..d458fe19d7 100644 --- a/local/recipes/libs/mesa/recipe.toml +++ b/local/recipes/libs/mesa/recipe.toml @@ -53,6 +53,16 @@ ln -sf "$(command -v "${LLVM_CONFIG}")" .cookbook-tools/llvm-config if [ -x "/usr/bin/wayland-scanner" ]; then ln -sf "/usr/bin/wayland-scanner" .cookbook-tools/wayland-scanner fi +# meson 26.1.4 resolves wayland-scanner from the TARGET wayland-scanner.pc, which +# hardcodes ${COOKBOOK_SYSROOT}/usr/bin/wayland-scanner — but that is the Redox +# (cross) binary and CANNOT execute on the Linux build host (ninja fails with +# code=127 "cannot execute: required file not found"). The generated protocol C +# is host/target-independent, so replace the sysroot copy with the runnable host +# wayland-scanner. PATH/$WAYLAND_SCANNER overrides do not help because meson uses +# the .pc's absolute path. +if [ -x "/usr/bin/wayland-scanner" ] && [ -e "${COOKBOOK_SYSROOT}/usr/bin/wayland-scanner" ]; then + cp -f "/usr/bin/wayland-scanner" "${COOKBOOK_SYSROOT}/usr/bin/wayland-scanner" +fi for tool in gcc-ar gcc-ranlib g++ gcc cpp c++; do src="$(command -v "${TARGET}-${tool}" 2>/dev/null)" if [ -n "$src" ]; then