develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #40652] unclear version error message

From:
James E Keenan via RT
Date:
January 6, 2012 19:27
Subject:
[perl #40652] unclear version error message
Message ID:
rt-3.6.HEAD-14510-1325906835-1342.40652-15-0@perl.org
On Thu Nov 02 11:53:38 2006, perl@nevcal.com wrote:
> This is a bug report for perl from perl@nevcal.com,
> generated with the help of perlbug 1.35 running under perl v5.8.8.
> 

I reviewed this older ticket tonight.  Because it is lengthy, I urge
readers of the list to refer to the original ticket.  But I believe the
salient points were:

* A complaint about the lack of helpfulness of this error message:

> 
> Perl lib version (v5.8.8) doesn't match executable version (v5.8.3) at
> C:/Perl/lib/Config.pm line 46.
> 

-- a message which I have also found confusing.

* The original poster's analysis, with particular focus on how this gets
more confusing on Windows.

* The poster's suggestion for an improved error message:

> 
> It would be great if the error message said something like:
> 
> "Config.pm version (v5.8.8) doesn't match
> C:\Windows\system32\perl58.dll
> version (v5.8.3)"
> 
> And it would be great if there were some explanation in Config.pod
> that
> explained what is going wrong and why Config.pm should have a version
> that gets checked against the version in perl58.dll, etc.  

* The author's citation from feedback on a mailing list from Andy --
presumably Andy Dougherty:

> Yes, that would have been more useful in this case.  The 'Config.pm'
> part
> is easy.  Unfortunately, I don't know offhand how to get the shared
> library location.  Perl's $^X variable would likely just be
> C:/Perl/bin/perl.exe or something like that.
> [snip]
> On a related note, would adding useful comments to Config.pm near line
> 46
> have been any help?  Perhaps we could add a paragraph there discussing
> the
> problem in more detail?
> 

* The original poster's response to Andy's feedback and an inline patch:

> 
> --- Config.pm~    Thu Sep 21 18:48:43 2006
> +++ Config.pm    Thu Nov  2 10:11:43 2006
> @@ -40,11 +40,22 @@
>      return;
>  }
> 
> -die "Perl lib version (v5.8.8) doesn't match executable version ($])"
> +# this error is generated when the compiled perl binary, either the
> executable
> +# perl program for static builds, or the dynamic shared library for
> dynamic
> +# builds, is not consistent with the version found in the CORE
> distributed
> +# Config.pm file.  This indicates some inconsistency in the Perl
> components
> +# found at execution time, and such inconsistency is serious enough
> to be
> +# considered fatal immediately, rather than attempting to execute
> with
> +# mismatched components, which would likely lead to other, more
> mysterious
> +# and difficult to diagnose issues.  Check versions and paths to
> figure out
> +# how the inconsistency was generated; be aware that on Windows,
> there are
> +# 4 places searched for shared libraries before the PATH is searched!
> +
> +die "Perl Config.pm version (v5.8.8) doesn't match executable (or
> possibly shared library) version ($])"
>      unless $^V;
> 
>  $^V eq v5.8.8
> -    or die "Perl lib version (v5.8.8) doesn't match executable
> version (" .
> +    or die "Perl Config.pm version (v5.8.8) doesn't match executable
> (or possibly shared library) version (" .
>      sprintf("v%vd",$^V) . ")";
> 
> 

Now, since Config.pm is a generated file, I believe the patch should
have been made against 'configpm'.  And, inspecting that program in
blead, I see that the wording of the error message has changed somewhat
from the time this ticket was originally filed:

#####
    281 die "Perl lib version (%s) doesn't match executable '$0' version
($])"
    282     unless $^V;
    283 
    284 $^V eq %s
    285     or die "Perl lib version (%s) doesn't match executable '$0'
version (" .
    286     sprintf("v%%vd",$^V) . ")";
#####

So, do people feel these error messages are sufficiently helpful?

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org:443/rt3/Ticket/Display.html?id=40652



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About