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
This commit is contained in:
k0kubun 2018-02-06 13:47:02 +00:00
Родитель 2b90469ac7
Коммит dbb63aeea6
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -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