Skip to content

Issue compiling a project with required_ruby_version >= 3.2.0 #145

@cretz

Description

@cretz

I was directed here after discussion on https://github.com/oxidize-rb/rb-sys Slack. I am using their tool rb-sys-dock to cross-compile a Rust-based C-extension, and it just delegates most of the compilation to this one. I have upgraded my project's gemspec to have required_ruby_version = '>= 3.2.0' because I no longer want to build for 3.1.0 and I have 3.2.0-specific things. But it is breaking (I did this at temporalio/sdk-ruby#194 before I reverted it to keep at >= 3.1.0 due to this break). The CI action outputted:

+ rb-sys-dock --platform aarch64-linux --directory ./temporalio --ruby-versions 3.2,3.3,3.4 --build
::info::🐳 Building for Ruby requested versions: ["3.2.0", "3.3.5", "3.4.0"]
::warn::⚠️ Could not determine Cargo rb-sys version
::info::🐳 Downloading container "rbsys/aarch64-linux:0.9.108", this might take awhile...
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Could not find compatible versions

Because every version of temporalio depends on Ruby >= 3.2.0
  and Gemfile depends on temporalio >= 0,
  Ruby >= 3.2.0 is required.
So, because current Ruby version is = 3.1.3,
  version solving has failed.
rake aborted!
Gem::MissingSpecError: Could not find 'grpc-tools' (>= 0) among 89 total gem(s)
Checked in 'GEM_PATH=/tmp/home/rb-sys-dock/.gem/ruby/3.1.0:/usr/local/rbenv/versions/3.1.3/lib/ruby/gems/3.1.0' , execute `gem env` for more information
/home/runner/work/sdk-ruby/sdk-ruby/temporalio/Rakefile:31:in `add_protoc_to_path'
/home/runner/work/sdk-ruby/sdk-ruby/temporalio/Rakefile:41:in `<top (required)>'
(See full trace by running task with --trace)

@jbourassa helpfully pointed out that rb-sys-dock just invokes this at https://github.com/oxidize-rb/rb-sys/blob/0efd9519fb0bd3808794895ede73a1cd008fdeb7/gem/exe/rb-sys-dock#L373-L404 and the docker container is fixed to 3.1 at https://github.com/rake-compiler/rake-compiler-dock/blob/c4e7dc390e0757891ad8c7898953f87a35c957dc/Dockerfile.mri.erb#L77C5-L77C17.

Any suggestions on how to build a >= 3.2.0 with rake-compiler-dock/rb-sys-dock?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions