mudge / re2

Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python".
http://mudge.name/re2/
BSD 3-Clause "New" or "Revised" License
130 stars 13 forks source link

Consider releasing a musl build #79

Open stanhu opened 1 year ago

stanhu commented 1 year ago

In https://github.com/mudge/re2/pull/76, using a precompiled gem with alpine or other musl-based systems requires:

apk add libstdc++ gcompat

For now, we should just document this requirement.

Using a musl build requires enforcing RubyGems 3.3.22 due to https://github.com/rubygems/rubygems/pull/5852. Some glibc LInux systems might install the musl build without this enforcement:

s.required_rubygems_version = '>= 3.3.22'

I've used the rbsys/x86_64-linux-musl:0.9.72 Docker image to build a Rust-related project; it might help here.

Related issue: https://github.com/rake-compiler/rake-compiler-dock/issues/75

mudge commented 9 months ago

The newly released rake-compiler-dock 1.5.0.rc1 might be relevant here: https://github.com/rake-compiler/rake-compiler-dock/releases/tag/v1.5.0.rc1

mudge commented 6 months ago

Given all the caveats described in https://github.com/rake-compiler/rake-compiler-dock?tab=readme-ov-file#linux-gnu-and-musl-important-details, I’m inclined to agree with @flavorjones in https://github.com/sparklemotion/nokogiri/pull/3111#issuecomment-2057809887 to wait until all supported platforms have a version of RubyGems and Bundler that work with musl gems by default.