summaryrefslogtreecommitdiff
path: root/tool/transform_mjit_header.rb
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 13:47:02 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-02-06 13:47:02 +0000
commitdbb63aeea647edfeecd3e9f2d21ebbf715719d42 (patch)
treec979e621488f506c461929203d35e6df83689533 /tool/transform_mjit_header.rb
parent2b90469ac7b456f052ca8eb6294f08ecd3912f12 (diff)
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
Diffstat (limited to 'tool/transform_mjit_header.rb')
-rw-r--r--tool/transform_mjit_header.rb11
1 files changed, 8 insertions, 3 deletions
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 '(?<name>[^']+)'/)
+ unless (related_lines = code.lines.grep(/#{match[:name]}/)).empty?
+ STDERR.puts "possibly related lines:\n#{related_lines.join("\n")}"
+ end
+ end
end
end
end