unused parameter in ruby.h - native ruby extension compilation failure on ruby 2.4
platform and version:
When compiling a ruby c-extension on the above ruby platform and version, the compilation fails with an error:
In file included from ../../../../src/ruby/ext/grpc/rb_byte_buffer.c:34:
/usr/local/rvm/rubies/ruby-2.4.0/include/ruby-2.4.0/ruby/ruby.h:2339:8: error: unused parameter 'varc' [-Werror,-Wunused-parameter]
int varc, VALUE *vars)
With ruby on the above platform and version:
git clone https://github.com/grpc/grpc.git
git checkout 26623b3d77ae78e66f66b (tip of master at current time of posting)
cd grpc && git submodule update --init
gem install bundle
BUNDLE_SPECIFIC_PLATFORM=true bundle install # bundle install crashes on this platform, BUNDLE_SPECIFIC_PLATFORM followed as a work around, followed suggestion in: https://github.com/bundler/bundler/issues/3692
Compilation should failure with the error above.
An example failure log is posted.
We're using rake-compiler gem to compile the grpc-ruby gem native extension.
The extconf.rb Makefile generator is in grpc/src/ruby/ext/grpc/extconf.rb -- this file currently sets -Werror as a compilation option. We're planning to remove it for the time being as work around but would like to put it back in.