summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/fiddle/extconf.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/fiddle/extconf.rb b/ext/fiddle/extconf.rb
index f505a28..a05eccf 100644
--- a/ext/fiddle/extconf.rb
+++ b/ext/fiddle/extconf.rb
@@ -78,8 +78,14 @@ begin
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")