We know that rubygems 3.33.22 / bundler 2.3.21 is required for basic support of linux-gnu
and linux-musl
platform names; but buggy bundler behavior prior to 2.5.6 may cause challenges for some users.
This issue is to record some research into how the default versions behave with different native platform gems, and to document recommendations for maintainers as to how and when to ship linux-gnu
and linux-musl
versions.
To help test this, I published "linux + linux-musl" and "linux-gnu + linux-musl" combinations of the gem rcee_precompiled
which you can find at https://rubygems.org/gems/rcee_precompiled/versions.
Note that the versions in question being tested below are:
ruby gem bundler 3.0 3.2.33 2.2.33 3.0 (updated rubygems) 3.5.7 2.5.7 3.1 3.3.26 2.3.26 3.2 3.4.19 2.4.19 3.3 3.5.3 2.5.3and the alpine containers have build-base
installed to compile the source gem if necessary.
We test Ruby 3.0 with updated rubygems because its default version is below the known minimum needed for this to work correctly (3.3.22).
testinggem install
target linux + linux-musl (v0.5.0.1) linux-gnu + linux-musl (v0.5.1) 3.0 gnu โ installs -linux
๐คท installs source gem 3.0 musl โ installs -linux
๐คท installs source gem 3.0 gnu (updated rubygems) โ installs -linux
โ installs -linux-gnu
3.0 musl (updated rubygems) โ installs -linux-musl
โ installs -linux-musl
3.1 gnu โ installs -linux
โ installs -linux-gnu
3.1 musl โ installs -linux-musl
โ installs -linux-musl
3.2 gnu โ installs -linux
โ installs -linux-gnu
3.2 musl โ installs -linux-musl
โ installs -linux-musl
3.3 gnu โ installs -linux
โ installs -linux-gnu
3.3 musl โ installs -linux-musl
โ installs -linux-musl
testing bundle install
target linux + linux-musl (v0.5.0.1) linux-gnu + linux-musl (v0.5.1) 3.0 gnu โ installs -linux
๐คท installs source gem 3.0 musl ๐คท installs source gem ๐คท installs source gem 3.0 gnu (updated rubygems) โ fails to install [1] โ installs -linux-gnu
3.0 musl (updated rubygems) โ installs -linux-musl
โ installs -linux-musl
3.1 gnu โ installs -linux
โ installs -linux-gnu
3.1 musl โ installs -linux-musl
โ installs -linux-musl
3.2 gnu โ installs -linux
โ installs -linux-gnu
3.2 musl โ installs -linux-musl
โ installs -linux-musl
3.3 gnu โ installs -linux
โ installs -linux-gnu
3.3 musl โ installs -linux
โ installs -linux-musl
Error [1]:
Could not find gems matching 'rcee_precompiled (= 0.5.0.1)' valid for all resolution platforms (aarch64-linux-musl,
aarch64-linux, arm-linux-musl, arm-linux, arm64-darwin, x86-linux-musl, x86-linux, x86_64-darwin, x86_64-linux-musl) in
rubygems repository https://rubygems.org/ or installed locally.
The source contains the following gems matching 'rcee_precompiled (= 0.5.0.1)':
* rcee_precompiled-0.5.0.1-aarch64-linux
* rcee_precompiled-0.5.0.1-aarch64-linux-musl
* rcee_precompiled-0.5.0.1-arm-linux
* rcee_precompiled-0.5.0.1-arm-linux-musl
* rcee_precompiled-0.5.0.1-arm64-darwin
* rcee_precompiled-0.5.0.1
* rcee_precompiled-0.5.0.1-x64-mingw-ucrt
* rcee_precompiled-0.5.0.1-x64-mingw32
* rcee_precompiled-0.5.0.1-x86-linux
* rcee_precompiled-0.5.0.1-x86-linux-musl
* rcee_precompiled-0.5.0.1-x86_64-darwin
* rcee_precompiled-0.5.0.1-x86_64-linux
* rcee_precompiled-0.5.0.1-x86_64-linux-musl
Recommendations
Given the inconsisent behavior of gem
and bundle
when the gem in question ships linux
and linux-musl
platform gems, it seems pretty clear that it's not a good idea to do this.
So the recommendation has to be:
-linux
platform gem that works for both gnu and musl systems,-linux-gnu
and -linux-musl
platform gems.-linux
and -linux-musl
platform gems for the same version.The installation docs for users should contain some warnings:
required_rubygems_version
for native gems that specify the linux libc rake-compiler#236musl
native gem platform in the lock file rubygems/rubygems#7432RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4