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

Cannot install 3.25.0.rc.2 on Ruby 3.3.0-preview2 #14509

Closed
marcotc opened this issue Oct 23, 2023 · 2 comments
Closed

Cannot install 3.25.0.rc.2 on Ruby 3.3.0-preview2 #14509

marcotc opened this issue Oct 23, 2023 · 2 comments
Assignees

Comments

@marcotc
Copy link

marcotc commented Oct 23, 2023

What version of protobuf and what language are you using?
Version: 3.25.0.rc.2
Language: Ruby

What operating system (Linux, Windows, ...) and version?

Docker ruby:3.3.0-preview2: Linux 387032e9f908 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 GNU/Linux

What runtime / compiler are you using (e.g., python version or gcc version)

ruby 3.3.0preview2 (2023-09-14 master e50fcca9a7) [x86_64-linux]
gcc version 12.2.0 (Debian 12.2.0-14)

What did you do?
Steps to reproduce the behavior:

  1. Execute docker run --rm -it ruby:3.3.0-preview2 gem install google-protobuf -v 3.25.0.rc.2
  2. See error: LoadError: cannot load such file -- ffi-compiler/compile_task

What did you expect to see

Gem installed successfully.

What did you see instead?

Fetching google-protobuf-3.25.0.rc.2.gem
Building native extensions. This could take a while...
ERROR:  Error installing google-protobuf:
	ERROR: Failed to build gem native extension.

    current directory: /usr/local/bundle/gems/google-protobuf-3.25.0.rc.2/ext/google/protobuf_c
/usr/local/bin/ruby -rrubygems /usr/local/lib/ruby/gems/3.3.0+0/gems/rake-13.0.6/exe/rake RUBYARCHDIR\=/usr/local/bundle/extensions/x86_64-linux/3.3.0+0/google-protobuf-3.25.0.rc.2 RUBYLIBDIR\=/usr/local/bundle/extensions/x86_64-linux/3.3.0+0/google-protobuf-3.25.0.rc.2
rake aborted!
LoadError: cannot load such file -- ffi-compiler/compile_task
<internal:/usr/local/lib/ruby/3.3.0+0/rubygems/core_ext/kernel_require.rb>:128:in `require'
<internal:/usr/local/lib/ruby/3.3.0+0/rubygems/core_ext/kernel_require.rb>:128:in `require'
/usr/local/bundle/gems/google-protobuf-3.25.0.rc.2/lib/google/tasks/ffi.rake:1:in `<top (required)>'
(See full trace by running task with --trace)

rake failed, exit code 1

Gem files will remain installed in /usr/local/bundle/gems/google-protobuf-3.25.0.rc.2 for inspection.
Results logged to /usr/local/bundle/extensions/x86_64-linux/3.3.0+0/google-protobuf-3.25.0.rc.2/gem_make.out

Anything else we should know about your project / environment

@marcotc marcotc added the untriaged auto added to all issues by default when created. label Oct 23, 2023
@zhangskz zhangskz added the ruby label Oct 26, 2023
@zhangskz zhangskz added 25.x and removed untriaged auto added to all issues by default when created. labels Oct 26, 2023
@JasonLunn
Copy link
Contributor

How are protobuf dependencies installed in this environment? The gemspec lists the https://github.com/ffi/ffi-compiler as a development dependency. Installing that gem first explicitly should fix the immediate problem as a workaround, but there is more than one development dependency.

@JasonLunn
Copy link
Contributor

bundle install installs the development dependencies automatically, but gem install doesn't. The #14538 adds a safety check so that users can gem install without having ffi-compiler if they don't need access to the new FFI-based implementation.

copybara-service bot pushed a commit that referenced this issue Oct 27, 2023
Fixes #14509

Closes #14538

COPYBARA_INTEGRATE_REVIEW=#14538 from JasonLunn:fix_14509 a3f9d0b
FUTURE_COPYBARA_INTEGRATE_REVIEW=#14538 from JasonLunn:fix_14509 a3f9d0b
PiperOrigin-RevId: 577284877
zhangskz pushed a commit that referenced this issue Oct 31, 2023
Fixes #14509

Closes #14538

COPYBARA_INTEGRATE_REVIEW=#14538 from JasonLunn:fix_14509 a3f9d0b
PiperOrigin-RevId: 577837541
zhangskz added a commit that referenced this issue Oct 31, 2023
… (#14560)

Fixes #14509

Closes #14538

COPYBARA_INTEGRATE_REVIEW=#14538 from JasonLunn:fix_14509 a3f9d0b
PiperOrigin-RevId: 577837541

Co-authored-by: Jason Lunn <jason.lunn@gmail.com>
ivoanjo added a commit to DataDog/dd-trace-rb that referenced this issue Nov 27, 2023
**What does this PR do?**

This reverts commit f9ebce9.

**Motivation:**

In #3211 we disabled our CI integration testing on Ruby 3.3 because
one of the dependencies (protobuf) had an incompatibility at the
time (see protocolbuffers/protobuf#14509 for details).

Upstream has since fixed the issue, so we're good to go.

**Additional Notes:**

N/A

**How to test the change?**

Check that CircleCI is now also running the
`build_and_test_integration-3.3` test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
@marcotc @JasonLunn @zhangskz and others