From 7ace7ead5a5205be477f93d1662af799b95f860f Mon Sep 17 00:00:00 2001 From: "Aleksei (Faumaray) Selikhov" Date: Sun, 6 Dec 2026 07:08:20 +0300 Subject: [PATCH] ci(windows): put the cross toolchain's lib directory on the loader path cc1plus depends on the bundled GMP/MPFR/MPC/isl/zstd shared objects in /lib; without them on the search path the loader fails and the driver reports the misleading 'cannot execute cc1plus: No such file or directory'. Export LD_LIBRARY_PATH for the job. --- .gitea/scripts/install-mingw.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitea/scripts/install-mingw.sh b/.gitea/scripts/install-mingw.sh index fc2de0f..852379d 100644 --- a/.gitea/scripts/install-mingw.sh +++ b/.gitea/scripts/install-mingw.sh @@ -11,6 +11,13 @@ url="https://github.com/AmanoTeam/mingw-gcc-cross/releases/download/${release}/$ prefix="${1:-/opt/mingw-gcc-cross}" compiler="${prefix}/bin/x86_64-w64-mingw32-ucrt-g++" +# cc1plus links against the GMP/MPFR/MPC/isl/zstd copies shipped in the +# toolchain, so the host loader needs the prefix on its search path. +export LD_LIBRARY_PATH="${prefix}/lib:${prefix}/lib64:${LD_LIBRARY_PATH:-}" +if [ -n "${GITHUB_ENV:-}" ]; then + echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> "${GITHUB_ENV}" +fi + self_check() { local probe probe="$(mktemp -d)"