From 4c64dc9af87ba1826c4cbeef887b69663c5966c0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Sep 2017 16:53:47 +0200 Subject: [PATCH] workaround verconf.h problem --- tools/distrib/build_ruby_environment_macos.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/distrib/build_ruby_environment_macos.sh b/tools/distrib/build_ruby_environment_macos.sh index c2240ce9761..fe0c5a4d70b 100644 --- a/tools/distrib/build_ruby_environment_macos.sh +++ b/tools/distrib/build_ruby_environment_macos.sh @@ -21,9 +21,10 @@ CROSS_RUBY=`mktemp tmpfile.XXXXXXXX` curl https://raw.githubusercontent.com/rake-compiler/rake-compiler/v1.0.3/tasks/bin/cross-ruby.rake > $CROSS_RUBY +# See https://github.com/grpc/grpc/issues/12161 for verconf.h patch details patch $CROSS_RUBY << EOF ---- cross-ruby.rake 2016-02-05 16:26:53.000000000 -0800 -+++ cross-ruby.rake.patched 2016-02-05 16:27:33.000000000 -0800 +--- cross-ruby.rake 2017-09-27 16:46:00.311020325 +0200 ++++ patched 2017-09-27 16:49:46.127016895 +0200 @@ -133,7 +133,8 @@ "--host=#{MINGW_HOST}", "--target=#{MINGW_TARGET}", @@ -32,8 +33,16 @@ patch $CROSS_RUBY << EOF + '--enable-static', + '--disable-shared', '--disable-install-doc', - '--without-tk', - '--without-tcl' + '--with-ext=' + ] +@@ -151,6 +152,7 @@ + # make + file "#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/ruby.exe" => ["#{USER_HOME}/builds/#{MINGW_HOST}/#{RUBY_CC_VERSION}/Makefile"] do |t| + chdir File.dirname(t.prerequisites.first) do ++ sh "test -s verconf.h || rm -f verconf.h" # if verconf.h has size 0, make sure it gets re-built by make + sh MAKE + end + end EOF MAKE="make -j8"