Open ntkme opened 1 month ago
As a workaround, uninstalling the prebuilt gem and reinstall platform ruby to build from source fixes the issue:
/ # gem uninstall google-protobuf
Successfully uninstalled google-protobuf-4.26.1-aarch64-linux
/ # apk add alpine-sdk
...
/ # gem install --platform ruby google-protobuf
Fetching google-protobuf-4.26.1.gem
Building native extensions. This could take a while...
Successfully installed google-protobuf-4.26.1
1 gem installed
/ # ruby -e "require 'google/protobuf'"
There are a few options here:
aarch64-linux
gem, and let both aarch64-linux-gnu
and aarch64-linux-musl
platforms fallback to platform ruby and compile from source. aarch64-linux-gnu
, so that it does not get installed incorrectly on aarch64-linux-musl
.aarch64-linux-gnu
and aarch64-linux-musl
gems.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
@acozzette Can you please have a look when you get a chance?
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]
What did you do? Steps to reproduce the behavior:
What did you expect to see google-protobuf should work on aarch64-linux-musl just like how it works on x86_64-linux-musl
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