-
Notifications
You must be signed in to change notification settings - Fork 30
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
first-class support for musl platforms #111
Conversation
821e571
to
9a7cf4f
Compare
ba8d577
to
6bfd212
Compare
6bfd212
to
9a609e1
Compare
0b25bbe
to
08b8e80
Compare
Test gems built with the `-linux-gnu` suffix only on ruby 3.1 and later, which are the ones that ship with rubygems 3.2.33 or later (the version that first recognizes the `-gnu` suffix). Also make sure we tag the `-linux-gnu` docker images as `-linux` for backwards compatibility, and make sure we test that workflow.
08b8e80
to
49ecf3d
Compare
9cb47a2
to
42ab09a
Compare
ci: extract x86_64-linux-gnu testing into two matrixed jobs, one for testing against setup-ruby, another for testing against official ruby docker images. ci: add a matrix of x86_64-linux-musl test rcd_test.gemspec: remove dependency on `git` so we can run in basic containers rake-compiler-dock.gemspec: handle missing `git` so we can run in basic containers
ci: extract testing matrices for x86-linux gnu and musl
eae7b3d
to
5dd8998
Compare
note that we have to patch rake-compiler to build ruby 2.7 on 32-byte arm because of coroutine issues that weren't fixed until 3.0. ci: extract testing matrices for arm-linux gnu and musl
b2ba362
to
828b465
Compare
ci: extract testing matrices for aarch64-linux gnu and musl
c037bf6
to
0e19cc4
Compare
because we're now updating rubygems on older images, we're able to have a full test matrix.
0e19cc4
to
36b9577
Compare
@larskanis This is a relatively small but significant change, so I'd love your 👀 on it. Changes to the Dockerfile template are minimal, essentially adding this file for musl platforms: build/mk_musl_cross.sh And the CI is made more thorough. |
36b9577
to
cfe4573
Compare
Planning to merge this tomorrow (2024-01-23) so I can start testing downstream using the snapshot images. |
Looks all good! 👍 Your documentation looks like you've seriously checked, that Rubygems is working with I'd like to try the musl support with ffi.gem, which didn't work there so far. So I'm looking forward to try out a prerelease. Sorry for having very little time for OSS development. It's hard to work together with me... |
…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.
Approach taken in this PR:
Closes #75 (or will, once this is complete)