On Wed, Jul 27, 2016 at 12:41 AM, John Harvey
<john.har...@crunchydata.com> wrote:
> Because of this, I've submitted a small patch which fixes the verbosity of
> the error message to actually explain what's missing.  I hope that this
> patch will be considered for the community, and it would be nice if it was
> back-patched.

Improving this error message a bit looks like a good idea to me.
Looking at the code to figure out what build.pl is looking for is a
bit a pain for users just willing to compile the code, so if we can
avoid such lookups with a cheap way, let's do it.

Instead of your patch, I'd suggest saving $solution->{options}->{perl}
. '\lib\CORE\perl*.lib' in a variable and then raise an error based on
that. See attached.
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index fe905d3..5fad939 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -578,16 +578,17 @@ sub mkvcbuild
+		my $perl_path = $solution->{options}->{perl} . '\lib\CORE\perl*.lib';
 		my @perl_libs =
 		  grep { /perl\d+.lib$/ }
-		  glob($solution->{options}->{perl} . '\lib\CORE\perl*.lib');
+		  glob($perl_path);
 		if (@perl_libs == 1)
-			die "could not identify perl library version";
+			die "could not identify perl library version matching pattern $perl_path\n";
 		# Add transform module dependent on plperl
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to