From: | John Harvey <john(dot)harvey(at)crunchydata(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | MSVC pl-perl error message is not verbose enough |
Date: | 2016-07-26 15:41:49 |
Message-ID: | CABcP5fjEjgOsh097cWnQrsK9yCswo4DZxp-V47DKCH-MxY9Gig@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello folks,
I've got a small patch I'd like to submit for consideration.
The scenario involves MSVC builds, where a user can do the following:
1) Install ActivePerl's latest (5.22 or 5.24).
2) Add this line to their config.pl file (in src/tools/msvc):
$config->{perl} = "C:\\Perl64";
This will enable pl-perl as part of the build configuration
3) Try to run "build" using MSVC
However, users that do this will end up with a curious error:
"Could not identify perl library version at src/tools/msvc/Mkvcbuild.pm
line 583."
This is a confusing error to see, especially since ActivePerl was just
installed.
It makes debugging a little difficult (path issue? Perl installation
issue? Code issue?).
Other folks have seen this error before and been similiarly confused:
https://www.postgresql.org/message-id/DUB126-W931DEA250B21C3A48DCABAD10C0@phx.gbl
I've actually followed up with that submitter, and he had said that after a
couple of days, they gave up on finding the solution for this error and
tried a different path.
The problem is that a default installation of ActivePerl installs
perl524.dll, but not perl524.lib. I'm not sure if there's any way to get
ActivePerl to install the lib file as part of its installation process, so
I resorted to generating my own .lib file from the .dll that was
installed. After doing that, and placing the .lib file in
C:\Perl64\lib\CORE, the error goes away.
The user does at this point have to modify the ActivePerl config file so
that it will use MSVC compiler formats instead of gcc by modifying
C:\Perl64\lib\CORE\config.h
from:
#define PERL_STATIC_INLINE static __inline__
to
#define PERL_STATIC_INLINE static __inline
After that, it works.
I understand there's a lot of stuff out of the postgres community's hands
here; we can't expect to solve ActivePerl problems. However, I think that
the error message in the MSVC scripts isn't verbose enough to tell people
what to look for. If their perl skills aren't very good, it may take some
learning just to figure out what the problem is.
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.
Attached is my patch for review.
Thank you,
-John Harvey
Attachment | Content-Type | Size |
---|---|---|
msvc_pl_perl_error_verbose.patch | application/octet-stream | 820 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-07-26 16:05:16 | Re: Proposal: revert behavior of IS NULL on row types |
Previous Message | Tom Lane | 2016-07-26 15:29:08 | Re: [PATCH v12] GSSAPI encryption support |