Can't install from source on Alpine due to grpc 1.19 depenency (12+)
Summary
When installing from source, installing Ruby Gems fails due to GRPC 1.19
Steps to reproduce
Attempt to install from source with Alpine (3.8/3.9/3.10/edge)
What is the current bug behavior?
Installation Fails
What is the expected correct behavior?
Successful Gem installation
Relevant logs and/or screenshots
third_party/cares/cares/ares_init.c: At top level:
cc1: error: unrecognized command line option '-Wno-invalid-source-encoding'
[-Werror]
cc1: all warnings being treated as errors
make: *** [Makefile:2972:
/usr/lib/ruby/gems/2.5.0/gems/grpc-1.19.0/src/ruby/ext/grpc/objs/opt/third_party/cares/cares/ares_init.o]
Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory '/usr/lib/ruby/gems/2.5.0/gems/grpc-1.19.0'
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)
extconf failed, exit code 1
Gem files will remain installed in /usr/lib/ruby/gems/2.5.0/gems/grpc-1.19.0 for
inspection.
Results logged to
/usr/lib/ruby/gems/2.5.0/extensions/x86_64-linux/2.5.0/grpc-1.19.0/gem_make.out
An error occurred while installing grpc (1.19.0), and Bundler cannot continue.
Make sure that `gem install grpc -v '1.19.0' --source 'https://rubygems.org/'`
succeeds before bundling.
In Gemfile:
gitaly-proto was resolved to 1.37.0, which depends on
grpc
Possible fixes
It appears that this is an issue with GCC and Alpine and has been resolved with later grpc releases > 1.20