From dbb63aeea647edfeecd3e9f2d21ebbf715719d42 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Tue, 6 Feb 2018 13:47:02 +0000 Subject: transform_mjit_header.rb: add output for debug AIX's header build is failing like: ./miniruby -I./lib -I. -I.ext/common ./tool/transform_mjit_header.rb "/usr/bin/gcc " rb_mjit_header.h .ext/include/powerpc-aix7.1.3.0/rb_mjit_min_header-2.6.0.h error in initial header file: /home/odaira/chkbuild/tmp/build/20180206T113302Z/tmp/20180206-15335556-aaiego.c:19:59: error: conflicting types for 'restrict' extern size_t fread(void *restrict, size_t, size_t, FILE *restrict); ^ https://rubyci.org/logs/rubyci.s3.amazonaws.com/aix71_ppc/ruby-trunk/log/20180206T113302Z.log.html.gz#make It's so hard to know the cause from current output. Let me add debug output and see tomorrow's CI result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/transform_mjit_header.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tool/transform_mjit_header.rb') diff --git a/tool/transform_mjit_header.rb b/tool/transform_mjit_header.rb index 1565d5fcfd..33e5ede824 100644 --- a/tool/transform_mjit_header.rb +++ b/tool/transform_mjit_header.rb @@ -83,9 +83,14 @@ module MJITHeader f.close cmd = "#{cc} #{cflags} #{f.path}" unless system(cmd, err: File::NULL) - STDERR.puts "error in #{stage} header file:" - system(cmd) - exit false + out = IO.popen(cmd, err: [:child, :out], &:read) + STDERR.puts "error in #{stage} header file:\n#{out}" + + if match = out.match(/error: conflicting types for '(?[^']+)'/) + unless (related_lines = code.lines.grep(/#{match[:name]}/)).empty? + STDERR.puts "possibly related lines:\n#{related_lines.join("\n")}" + end + end end end end -- cgit v1.2.3