Skip to content

Fix source gem compilation#8471

Merged
acozzette merged 2 commits into
protocolbuffers:masterfrom
jamesgecko:jd/fix-ruby-compile
Apr 12, 2021
Merged

Fix source gem compilation#8471
acozzette merged 2 commits into
protocolbuffers:masterfrom
jamesgecko:jd/fix-ruby-compile

Conversation

@jamesgecko

Copy link
Copy Markdown
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.

Comment thread ruby/Rakefile Outdated
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.
@jamesgecko jamesgecko force-pushed the jd/fix-ruby-compile branch from f808707 to dce61c9 Compare April 9, 2021 21:59
@acozzette acozzette merged commit 68cb69e into protocolbuffers:master Apr 12, 2021
@acozzette

Copy link
Copy Markdown
Collaborator

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