Latest version of Protobuf requires newer GCC and hence is failing CentOS 6 builds
With gitlab!27741 (merged), GitLab bumped the protobuf version. This has caused failures in CentOS 6 as seen from https://dev.gitlab.org/gitlab/omnibus-gitlab/-/jobs/7346891. We should check what is happening and fix it asap
-std=gnu90
optin in protobuf build scripts is throwing off gcc.
# In our CentOS6 builder docker image
$ gem install google-protobuf --version 3.11.4 --platform=ruby
Fetching: google-protobuf-3.11.4.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing google-protobuf:
ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.6.0/gems/google-protobuf-3.11.4/ext/google/protobuf_c
/usr/local/bin/ruby -r ./siteconf20200408-15-3hupj3.rb extconf.rb
creating Makefile
current directory: /usr/local/lib/ruby/gems/2.6.0/gems/google-protobuf-3.11.4/ext/google/protobuf_c
make "DESTDIR=" clean
current directory: /usr/local/lib/ruby/gems/2.6.0/gems/google-protobuf-3.11.4/ext/google/protobuf_c
make "DESTDIR="
compiling protobuf.c
cc1: error: unrecognized command line option "-std=gnu90"
cc1: warning: unrecognized command line option "-Wno-tautological-compare"
cc1: warning: unrecognized command line option "-Wno-self-assign"
cc1: warning: unrecognized command line option "-Wno-parentheses-equality"
cc1: warning: unrecognized command line option "-Wno-constant-logical-operand"
cc1: warning: unrecognized command line option "-Wno-cast-function-type"
make: *** [protobuf.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/lib/ruby/gems/2.6.0/gems/google-protobuf-3.11.4 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-linux/2.6.0-static/google-protobuf-3.11.4/gem_make.out
Edited by Balasankar 'Balu' C