Skip to content

Add support to msys2/mingw #5

Merged
urbanogilson merged 5 commits intomainfrom
ci/mingw-msys2-test
Apr 4, 2026
Merged

Add support to msys2/mingw #5
urbanogilson merged 5 commits intomainfrom
ci/mingw-msys2-test

Conversation

@urbanogilson
Copy link
Copy Markdown
Member

Fixes build failures when installing @napi-ffi/ffi-napi from source under MSYS2 subsystems on Windows.

Adds a dedicated MinGW (MSYS2 MINGW64) job to ci.yml.

Closes #1

Upstream fixes present:
- libffi.gyp: correct preprocess_asm.cmd path for Windows (node-ffi-napi#293, node-ffi-napi#265)
- src/ffi.cc: remove NAPI_EXPERIMENTAL define (node-ffi-napi#283)
- node-gyp-build bumped to ^4.8.2, prebuildify to ^6.0.1 (node-ffi-napi#283)
Uses MSYS2's own Node.js package so os.type() returns MINGW64_NT-*,
which activates the MinGW code path in libffi.gyp (GCC compiles .S
files directly instead of the MSVC preprocess_asm.cmd route).
@urbanogilson urbanogilson self-assigned this Apr 4, 2026
@urbanogilson urbanogilson added bug Something isn't working enhancement New feature or request labels Apr 4, 2026
On MSYS2 MinGW nodes, libuv is not necessarily re-exported from the
node binary, so GetProcAddress("uv_fs_open") returns error 127. The
test still verifies that Library(null, {}) succeeds on MinGW; only the
MSVC-specific symbol export assumption is skipped.
@urbanogilson urbanogilson merged commit 6778d42 into main Apr 4, 2026
13 checks passed
@urbanogilson urbanogilson deleted the ci/mingw-msys2-test branch April 4, 2026 18:58
@Kreijstal
Copy link
Copy Markdown

sorry I didn't get to do it, you are doing god's work, thank you.

@urbanogilson
Copy link
Copy Markdown
Member Author

Thanks, I appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failing to install with msys2/mingw nodejs

2 participants