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 source gem compilation #8471

Merged
merged 2 commits into from Apr 12, 2021

Conversation

jamesgecko
Copy link
Contributor

This change should fix #8372. It does two things:

  1. Helps the compiler find the wyhash header when building from git.
  2. Uses the system installation of protoc when building the source gem, as the specified ../src/protoc binary does not exist in the source gem.

This does not allow the gem to be built directly from git in a Gemfile (eg, gem 'google-protobuf', github: 'protocolbuffers/protobuf'), but it should allow the gem to be built successfully when bundle config force_ruby_platform true has been set.

ruby/Rakefile Outdated Show resolved Hide resolved
This should allow gem installation when
`bundle config force_ruby_platform true` has been set.

It has the unfortunate side effect of printing the protoc version during
build, but a quiet cross-platform solution is more complicated.
@acozzette acozzette merged commit 68cb69e into protocolbuffers:master Apr 12, 2021
@acozzette
Copy link
Member

Thanks, @jamesgecko.

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

Successfully merging this pull request may close these issues.

Ruby gem cannot build on ruby 2.7.2 on Mac M1
3 participants