-
Notifications
You must be signed in to change notification settings - Fork 15.6k
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
Ruby google-protobuf linux precompiled gem is not compatible with linux-musl #16853
Comments
As a workaround, uninstalling the prebuilt gem and reinstall platform ruby to build from source fixes the issue:
For bundler, the following in Gemfile would work: gem 'google-protobuf', force_ruby_platform: true if RUBY_PLATFORM.include?('linux-musl') |
There are a few options here:
Again, please refer to rake-compiler's documentation on details: https://github.com/rake-compiler/rake-compiler-dock?tab=readme-ov-file#linux-gnu-and-musl-important-details |
@dazuma - what's the expected platform support for |
As said early, even if we don't "officially" support linux-musl, we can avoid it from breaking out of box. - Just ship the gem with label |
I'd really appreciate if @ntkme's comment could be actioned pls
|
This issue used to be aarch64-linux-musl only. However, with 4.29.3 release, that
This issue can be worked around by force compiling from source by adding the following in Gemfile: gem 'google-protobuf', force_ruby_platform: true if RUBY_PLATFORM.include?('linux-musl') @JasonLunn I highly suggest that we take action now to update rake-compiler and split |
The statistics from my own gem that has 10M+ total download shows that roughly 10% of x86_64-linux are from linux-musl, which is definitely not a small number. E.g. As of writing, the download counts for the latest version show:
The statistics for google-protobuf might be different, but the total download for google-protobuf is way higher that even only 5% would affect tons of users. I know lots of users in ruby community uses |
I was probably the earliest adaptor of splitting From my own experience with it, I can say that as of now it's reliable with ruby >=3.1 and the default rubygems/bundler or higher version from them. In fact, Now it's time to adopt |
What version of protobuf and what language are you using?
Version: 4.26.1
Language: Ruby
What operating system (Linux, Windows, ...) and version?
Alpine Linux 3.19.1
What runtime / compiler are you using (e.g., python version or gcc version)
ruby 3.3.1 (2024-04-23 revision c56cd86388) [aarch64-linux-musl]
ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux-musl]
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux-musl]
What did you do?
Steps to reproduce the behavior:
What did you expect to see
google-protobuf should work on linux-musl just like how it works on linux-gnu
What did you see instead?
google-protobuf prebuilt library is strictly linked to glibc and it's not compatible with musl-libc
Anything else we should know about your project / environment
Please see rake-compiler's documentation regarding recent changes in rubygems in regarding to -linux, -linux-gnu, and -linux-musl platforms: https://github.com/rake-compiler/rake-compiler-dock?tab=readme-ov-file#linux-gnu-and-musl-important-details
The text was updated successfully, but these errors were encountered: