Skip to content
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

precompiled: add first-class linux-musl support #27

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

flavorjones
Copy link
Owner

No description provided.

@flavorjones flavorjones force-pushed the flavorjones-musl-support branch 4 times, most recently from be2583d to b96bf15 Compare January 27, 2024 21:44
@flavorjones flavorjones force-pushed the flavorjones-musl-support branch from b96bf15 to 30e90e5 Compare January 27, 2024 21:48
@flavorjones flavorjones merged commit f3896fd into main Jan 27, 2024
84 checks passed
@flavorjones flavorjones deleted the flavorjones-musl-support branch January 27, 2024 21:57
kou pushed a commit to rake-compiler/rake-compiler that referenced this pull request Jan 30, 2024
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant