New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fat binary gem support for ruby-3.1 #2409
Conversation
@larskanis Thanks so much for shipping this. I'm going to merge #2408 and rebase this on top of it. |
8d37543
to
fb5aa23
Compare
Oh, I just noticed that arm64-darwin doesn't build. I'll update the PR. |
@larskanis Can you please peek at 0c32749 and tell me if that Windows ucrt test for the native gem looks right? |
0c32749
to
b2edee8
Compare
@larskanis Not sure if you're actively working on this, I don't want to clobber any work you're doing ... |
@larskanis So this change broke some things: - # Prefer host_alias over host in order to use i586-mingw32msvc as
- # correct compiler prefix for cross build, but use host if not set.
- recipe.host = RbConfig::CONFIG["host_alias"].empty? ? RbConfig::CONFIG["host"] : RbConfig::CONFIG["host_alias"]
+ recipe.host = RbConfig::CONFIG["host"] An example is how we derive the name of the "ar" tool for building libgumbo (with this change, we end up looking for the nonexistent I'm not familiar with why this particular change was made, and I wish we were collaborating more closely on these changes. Can you help me understand why this change was made and whether I can safely revert it (it seems to work fine when I do)? |
@larskanis I'm going to step away for the evening, but I will have time tomorrow to collaborate -- in real time -- if you're willing and able to. Thanks for working on this! |
dc70fd5
to
84b350c
Compare
Tests look good now. I don't understand the JRuby install error. It looks like jruby/jruby#6904 . I tried to use ruby-maven from git, but to no avail. |
Thank you! I have some context on the JRuby thing, I'll take a look this morning. |
Ruby-3.1-x64 on Windows has a changed platform string "x64-mingw-ucrt" vc. "x64-mingw32". Consequentally rake-compiler-dock has a new corresponding platform image. See https://rubyinstaller.org/2021/12/31/rubyinstaller-3.1.0-1-released.html Unfortunately the compiler triplet is still "x86_64-w64-mingw32" for both ruby platforms, although the compiled code isn't compatible. Therefore we have to differ by RUBY_PLATFROM instead of the "host" string.
50bbc4f
to
6c19e2b
Compare
The ruby-maven gem was packaged from commit ef96c08, see jruby/jruby#6904 (comment) for background information.
rake-compiler/rake-compiler-dock#57 has been shipped in RCD v1.2.0 making this unnecessary.
6c19e2b
to
a76963c
Compare
@larskanis rake-compiler sets the gemspec spec.required_ruby_version = [
">= #{ruby_api_version(sorted_ruby_versions.first)}",
"< #{ruby_api_version(sorted_ruby_versions.last).succ}.dev"
] (see https://github.com/rake-compiler/rake-compiler/blob/master/lib/rake/extensiontask.rb#L282-L285) For Nokogiri this will always be |
I opened rake-compiler/rake-compiler#199 to fix this issue in rake-compiler. |
Ruby-3.1-x64 on Windows has a changed platform string "x64-mingw-ucrt" vc. "x64-mingw32".
Consequentally rake-compiler-dock has a new corresponding platform image.
See https://rubyinstaller.org/2021/12/31/rubyinstaller-3.1.0-1-released.html
Unfortunately the compiler triplet is still "x86_64-w64-mingw32" for both ruby platforms, although the compiled code isn't compatible.
Therefore we have to differ by RUBY_PLATFROM instead of the "host" string.
What problem is this PR intended to solve?
It shall add binary gems for ruby-3.1.
Have you included adequate test coverage?
This is another PR #2408
Does this change affect the behavior of either the C or the Java implementations?
C only.
Fixes #2397