Skip to content
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

Fix Installation Build for Ruby 3.4 #1328

Open
arielvalentin opened this issue Jan 8, 2025 · 1 comment · Fixed by #1329
Open

Fix Installation Build for Ruby 3.4 #1328

arielvalentin opened this issue Jan 8, 2025 · 1 comment · Fixed by #1329
Assignees

Comments

@arielvalentin
Copy link
Collaborator

The latest version of Ruby 3.4 requires mutex_m to be explicitly installed as a gem.

/opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/gems/3.4.0/gems/httpclient-2.8.3/lib/httpclient/auth.rb:11: warning: mutex_m was loaded from the standard library, but is not part of the default gems starting from Ruby 3.4.0.
You can add mutex_m to your Gemfile or gemspec to silence this warning.
/opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require': cannot load such file -- mutex_m (LoadError)
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/gems/3.4.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in 'Kernel#require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/gems/3.4.0/gems/httpclient-2.8.3/lib/httpclient/auth.rb:11:in '<top (required)>'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/gems/3.4.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in 'Kernel#require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/gems/3.4.0/gems/httpclient-2.8.3/lib/httpclient.rb:19:in '<top (required)>'
   from <internal:/opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'
   from <internal:/opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:37:in 'Kernel#require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel.replace_require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/gems/3.4.0/gems/zeitwerk-2.7.1/lib/zeitwerk/core_ext/kernel.rb:34:in 'Kernel.require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundler/runtime.rb:65:in 'block (2 levels) in Bundler::Runtime#require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundler/runtime.rb:60:in 'Array#each'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundler/runtime.rb:60:in 'block in Bundler::Runtime#require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundler/runtime.rb:52:in 'Array#each'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundler/runtime.rb:52:in 'Bundler::Runtime#require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundler.rb:216:in 'Bundler.require'
   from /home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/releases/test/test_helper.rb:8:in '<top (required)>'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
   from /home/runner/work/opentelemetry-ruby-contrib/opentelemetry-ruby-contrib/releases/test/integration/installation_test.rb:7:in '<top (required)>'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'Kernel.require'
   from /opt/hostedtoolcache/Ruby/3.4.1/x64/lib/ruby/3.4.0/bundled_gems.rb:82:in 'block (2 levels) in Kernel#replace_require'
   from -e:1:in '<main>'

https://github.com/open-telemetry/opentelemetry-ruby-contrib/actions/runs/12672136281/job/35315485307

@arielvalentin
Copy link
Collaborator Author

I learned that mutex_m is a dependency of some transitive gems. I think we should upgrade them to the latest version compatible with Ruby 3.4.

E.g. the latest version of minitest no longer uses mutex_m and we should remove it whereever possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant