From: Andrew Dunstan <andrew@dunslane.net>
Date: Thu, 26 Oct 2017 14:10:37 +0000 (-0400)
Subject: Improve gendef.pl diagnostic on failure to open sym file
X-Git-Tag: REL9_2_24~10
X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=d5fb450aab740b52601b4bfb354c4be2662a940b;p=postgresql.git

Improve gendef.pl diagnostic on failure to open sym file

There have been numerous buildfarm failures but the diagnostic is
currently silent about the reason for failure to open the file. Let's
see if we can get to the bottom of it.

Backpatch to all live branches.
---

diff --git a/src/tools/msvc/gendef.pl b/src/tools/msvc/gendef.pl
index 8ef0422df9d..247cff0cac3 100644
--- a/src/tools/msvc/gendef.pl
+++ b/src/tools/msvc/gendef.pl
@@ -27,7 +27,7 @@ while (<$ARGV[0]/*.obj>)
 	print ".";
 	system("dumpbin /symbols /out:symbols.out $_ >NUL")
 	  && die "Could not call dumpbin";
-	open(F, "<symbols.out") || die "Could not open symbols.out for $_\n";
+	open(F, "<symbols.out") || die "Could not open symbols.out for $_: $!\n";
 	while (<F>)
 	{
 		s/\(\)//g;