fix: unify Windows build on GNU toolchain (RubyInstaller + MSYS2)#419
Merged
Conversation
- Replace standalone msys2/setup-msys2 with RubyInstaller's built-in MSYS2 (ridk exec pacman) to keep toolchain consistent - Set Rust target to x86_64-pc-windows-gnu to match RubyInstaller's MinGW toolchain (eliminates MSVC/GNU mismatch in rb-sys/bindgen) - Remove MSYS2 env overrides (CPATH, BINDGEN_EXTRA_CLANG_ARGS, etc.) - Fix Linux/Windows verify step to use bundle exec for load path Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
🚀 Preview deployed: https://smalruby.jp/smalruby3-editor/fix/gem-build-windows-gnu/ |
github-actions Bot
pushed a commit
that referenced
this pull request
Mar 29, 2026
…-windows-gnu fix: unify Windows build on GNU toolchain (RubyInstaller + MSYS2)
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.
Summary
Windows gem ビルドの MSVC/GNU ツールチェーン不一致を修正。
根本原因:
ruby/setup-rubyは RubyInstaller (MinGW/GNU) を使うが、Rust のデフォルトターゲットがx86_64-pc-windows-msvcであるため、rb-sysの bindgen が MSVC の sysroot を探してstrings.hnot found エラーになっていた。修正: 「混ぜるな危険」の原則に従い、GNU ツールチェーンに統一。
msys2/setup-msys2→ RubyInstaller 内蔵の MSYS2 (ridk exec pacman)x86_64-pc-windows-gnuを明示指定CPATH,BINDGEN_EXTRA_CLANG_ARGS等)を全て削除bundle exec rubyに修正(ロードパス解決)Related Issues
Follow-up to #416, #418