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

Ruby Gem v3.20.0 on arm64 requires >= Ruby 3.1 #9733

Closed
deecewan opened this issue Apr 4, 2022 · 6 comments
Closed

Ruby Gem v3.20.0 on arm64 requires >= Ruby 3.1 #9733

deecewan opened this issue Apr 4, 2022 · 6 comments
Assignees
Labels

Comments

@deecewan
Copy link

deecewan commented Apr 4, 2022

What version of protobuf and what language are you using?
Version: 3.20.0
Language: Ruby

What operating system (Linux, Windows, ...) and version?
macOS M1 - ARM64

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

What did you do?

  • Be on a arm64-darwin platform
  • Use ruby 2.7 (anything less than 3.1)
  • Add `gem 'google-protobuf', '3.20.0' to a gemfile
  • Run bundle install

What did you expect to see
Successful install

What did you see instead?

google-protobuf-3.20.0-arm64-darwin requires ruby version < 3.2.dev, >= 3.1, which is incompatible with the current version, ruby 2.7.2p137

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

I've had a look at the gemspec and the Rakefile and I can't see a reason that the amd64 version requires ruby 3.1. All the other versions of the gem require only ruby 2.5/

For reference, the rubygems entry for arm64-darwin: https://rubygems.org/gems/google-protobuf/versions/3.20.0-arm64-darwin
for x86_64-darwin: https://rubygems.org/gems/google-protobuf/versions/3.20.0-x86_64-darwin

@BobbyMcWho
Copy link

This is an unexpected change from what I'm reading in the changelog as well.

@BobbyMcWho
Copy link

It was likely caused by #9657 if I had to guess.

@msakrejda
Copy link

You mean arm64, right?

@deecewan deecewan changed the title Ruby Gem v3.20.0 on amd64 requires >= Ruby 3.1 Ruby Gem v3.20.0 on arm64 requires >= Ruby 3.1 Apr 13, 2022
@deecewan
Copy link
Author

yes 🤦‍♂️ thanks @uhoh-itsmaciek

@JoshCheek
Copy link

I haven't investigated whether there's a reason for this, but:

Depends on Ruby >= 2.3

Depends on Ruby >= 2.5, < 3.1.DEV

Depends on Ruby >= 2.5, < 3.2.DEV

Depends on Ruby >= 3.1, < 3.2.DEV

So there is not a single version of Ruby which works for all the platforms of 3.20.0 (eg x64-mingw32 requires < 3.1.DEV, and arm64-darwin requires >= 3.1). I checked 3.20.1, and it's the same way.

@lfittl
Copy link
Contributor

lfittl commented Aug 6, 2022

It appears this is no longer an issue with newer versions, since the compiled gem version has been removed for ARM64 (and so it now builds things from source again, as before) - and therefore I think this can be closed.

% ruby -v
ruby 2.7.3p183 (2021-04-05 revision 6847ee089d) [arm64-darwin21]

% gem install google-protobuf
Fetching google-protobuf-3.21.4.gem
Building native extensions. This could take a while...
Successfully installed google-protobuf-3.21.4
Parsing documentation for google-protobuf-3.21.4
unable to convert "\xDB" from ASCII-8BIT to UTF-8 for lib/google/protobuf/descriptor_pb.rb, skipping
Installing ri documentation for google-protobuf-3.21.4
Done installing documentation for google-protobuf after 0 seconds
1 gem installed

@fowles fowles closed this as completed Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants