Repository navigation
Fix the Android build on Windows - #51
Merged
Merged
Conversation
Node cannot hand gradlew.bat to CreateProcess (EINVAL); run the wrapper through a shell there. Two tests also assumed a POSIX checkout's trailing newline and path separators.
The extensionless wrapper is a Unix shell script; CreateProcess rejects it with error 193. llvm-strip likewise needs .exe there.
A-nony-mous
force-pushed
the
fix/windows-build
branch
from
October 23, 2026 16:23
e15aff8 to
a32ffdc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two independent Windows-only failures kept
npm run buildfrom producing an APK on a Windows checkout:1. Node cannot hand gradlew.bat to CreateProcess (EINVAL).
scripts/kotlin-build.cjsspawned the wrapper directly; on Windows the.batmust go through a shell. Run it throughshell: truethere, quoted so checkouts under paths with spaces still work.2. The NDK clang wrapper is not a Win32 program (CreateProcess error=193). The NDK ships its clang driver twice: extensionless, as a Unix shell script, and as
.cmd, the variant Windows can launch.App_Resources/Android/app.gradleexecuted the extensionless one, soprepareFaceclawNativeLibsdied building libfaceclaw_lc3.so. Select.cmdon Windows; same story forllvm-strip.exeinprepareFaceclawLlama.Also fixes two tests that only held on a POSIX checkout: one matched a template ending in a bare newline (a Windows checkout converts it to CRLF), and one compared a
path.relative()result, which uses backslashes there.Verified on Windows 10/JDK 21/NDK 26: full debug build now succeeds end-to-end (llama.cpp, native libs, Gradle) and produces an APK; the affected tests pass (
tests/kotlin-build.test.cjs,tests/evenhub-extensions-shim.test.cjs, 13/13). No behavior change on macOS/Linux — both fixes are guarded by platform checks.