Windows build artifacts error #7

Closed
catbot wants to merge 1 commit from claude/issue-6 into master
Showing only changes of commit 86fce525c7 - Show all commits

pin Crafter.Asset to mingw-rotr64 fix commit so Windows CI builds
Some checks failed
CI / build-test-release (pull_request) Has been cancelled

The CI's mingw cross-compile (--target=x86_64-w64-mingw32) has been
failing for a while at lib/gdeflate/libdeflate/lib/utils.c, where
libdeflate's compiler_gcc.h defines _rotr* as macros before mingw's
<stdlib.h> can declare them as functions. The fix is in
Catcrafts/Crafter.Asset PR #1 (commit 021ced6); pin to that SHA so
the Windows artifact jobs unblock immediately rather than waiting on
master-tracking + a merge race. Once the upstream PR is merged and
master is confirmed to carry the fix, the pin can be removed.

Adds an optional commit arg to resolveDep so the existing
"track-master" call site for Crafter.Math is unchanged.

Refs Catcrafts/Crafter.Build#6.
catbot 2026-05-27 02:32:01 +00:00

View file

@ -15,7 +15,7 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
for (std::string_view a : args) {
if (a == "--local") { useLocal = true; break; }
}
auto resolveDep = [&](std::string_view name, std::string_view gitUrl) -> Configuration* {
auto resolveDep = [&](std::string_view name, std::string_view gitUrl, std::string_view commit = "") -> Configuration* {
if (useLocal) {
return LocalProject({
.projectFile = fs::path("../") / name / "project.cpp",
@ -23,7 +23,7 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
});
}
return GitProject({
.source = { .url = std::string(gitUrl) },
.source = { .url = std::string(gitUrl), .commit = std::string(commit) },
.args = depArgs,
});
};
@ -44,7 +44,12 @@ extern "C" Configuration CrafterBuildProject(std::span<const std::string_view> a
// The bootstrap (build.sh) defines no such dep — its impl unit takes the
// stub branch and cfg.assets errors at runtime until a self-host rebuild.
Configuration* math = resolveDep("Crafter.Math", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Math.git");
Configuration* asset = resolveDep("Crafter.Asset", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Asset.git");
// Crafter.Asset is pinned here because the mingw cross-compile needs the
// libdeflate _rotr* / stdlib.h fix from Catcrafts/Crafter.Asset PR #1.
// Once that PR lands on master and we've confirmed master tracks the fix,
// the pin can be dropped back to tip-tracking (third arg removed).
Configuration* asset = resolveDep("Crafter.Asset", "https://forgejo.catcrafts.net/Catcrafts/Crafter.Asset.git",
"021ced683d589fae7dbc7e7fa6108a9ee11bf64c");
crafterBuildLib->dependencies = { math, asset };
crafterBuildLib->defines.push_back({"CRAFTER_BUILD_HAS_ASSET", ""});
{