ruby-changes:36989
From: nobu <ko1@a...>
Date: Tue, 30 Dec 2014 15:13:47 +0900 (JST)
Subject: [ruby-changes:36989] nobu:r49070 (trunk): fiddle: append libffi config.log
nobu 2014-12-30 15:13:33 +0900 (Tue, 30 Dec 2014) New Revision: 49070 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49070 Log: fiddle: append libffi config.log * ext/fiddle/extconf.rb: copy config.log of libffi when failed. Modified files: trunk/ext/fiddle/extconf.rb Index: ext/fiddle/extconf.rb =================================================================== --- ext/fiddle/extconf.rb (revision 49069) +++ ext/fiddle/extconf.rb (revision 49070) @@ -78,8 +78,14 @@ begin https://github.com/ruby/ruby/blob/trunk/ext/fiddle/extconf.rb#L78 FileUtils.rm_f("#{libffi.include}/ffitarget.h") Logging::open do Logging.message("%p in %p\n", args, opts) - system(*args, **opts) or + unless system(*args, **opts) + begin + IO.copy_stream(libffi.dir + "/config.log", Logging.instance_variable_get(:@logfile)) + rescue SystemCallError => e + Logfile.message("%s\n", e.message) + end raise "failed to configure libffi. Please install libffi." + end end if $mswin && File.file?("#{libffi.include}/ffitarget.h") FileUtils.rm_f("#{libffi.include}/ffitarget.h") -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/