-
-
Notifications
You must be signed in to change notification settings - Fork 897
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
feat: first-class musl support #3111
base: main
Are you sure you want to change the base?
Conversation
08f40c7
to
a8bdd44
Compare
Found a pretty significant blocker this weekend. We probably cannot release this unless rubygems/rubygems#7432 is addressed in bundler or rubygems. And even then, we probably need additional documentation to help people resolve issues. Putting this on hold until we know more. |
…x libc (#236) ### Problem I'm trying to solve Rubygems does not correctly recognize `-musl` or `-gnu` platform suffixes until v3.3.22. ### Solution If rake-compiler is building a linux native gem that specifies a libc in its platform object, then add ">= 3.3.22" to the required_rubygems_version requirement. https://github.com/rubygems/rubygems/blob/master/CHANGELOG.md#3322--2022-09-07 ### Context While working on musl support in the precompilation toolchain: - rake-compiler/rake-compiler-dock#111 - flavorjones/ruby-c-extensions-explained#27 - sparklemotion/sqlite3-ruby#442 - sparklemotion/nokogiri#3111 I noticed that Ruby 3.0 is still shipping with Rubygems 3.2.33, which does not recognize these gem platforms. Specifying the rubygems requirement changes the error experienced by users during gem installation from: > ERROR: While executing gem ... (Gem::Exception) > Unable to find spec for #<Gem::NameTuple rcee_precompiled, 0.6.test.2024.0128.1724, aarch64-linux> to: > ERROR: Error installing rcee_precompiled-0.6.test.2024.0128.1735-x86_64-linux-musl.gem: > rcee_precompiled-0.6.test.2024.0128.1735-x86_64-linux-musl requires RubyGems version >= 3.3.22. > The current RubyGems version is 3.2.33. Try 'gem update --system' to update RubyGems itself.
a8bdd44
to
6c94d58
Compare
Picking this back up again since the fix to the rubygems issue mentioned above was released in bundler 2.5.6. |
7261336
to
c581896
Compare
c581896
to
94592d2
Compare
I'm proceeding carefully here since an exploration shows that the version of rubygems and bundler that ships with Ruby 3.0 by default don't work well with the My instinct is to wait until we drop support for Ruby 3.0 in Nokogiri before we ship first-class musl support, since we don't know of any issues with the current linux gem. |
Additional note that I had forgotten about: There are some things we're doing to work around precompiled-musl-support-from-a-gnu-toolchain. Specifically I'm thinking of:
|
Tagging for v1.18 which is when we're planning to drop support for Ruby 3.0. |
What problem is this PR intended to solve?
Ship
linux-musl
gems built specifically for musl libc systems.Although there are no existing issues that this addresses, we've been bitten in the past by musl incompatibilities and this should prevent those sorts of problems going forward.
Also: upgrade to rake-compiler-dock 1.5.0.rc1
Have you included adequate test coverage?
Test coverage has been updated.
Does this change affect the behavior of either the C or the Java implementations?
No functional changes.