http://www.perlmonks.org?node_id=798652

markuhs has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I have ActivePerl 5.10.1.1006 installed. I convert my Perl scripts since some time now using the PAR module (pp --output=pte.exe pte.pl).
Today, after changing the Perl code and using some more modules, I find the following message box.

The procedure entry point Perl_croak_xs_usage could not be located in the dynamic link library perl510.dll.

Afterwards the console says:
Set up gcc environment - 3.4.5 (mingw-vista special r3) Can't load 'C:/Perl/lib/auto/IO/IO.dll' for module IO: load_file:The s +pecified procedure could not be found at C:/Perl/lib/XSLoader.pm line + 70. at C:/Perl/lib/IO.pm line 11 Compilation failed in require at C:/Perl/lib/IO/Handle.pm line 266. BEGIN failed--compilation aborted at C:/Perl/lib/IO/Handle.pm line 266 +. Compilation failed in require at C:/Perl/lib/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at C:/Perl/lib/IO/Seekable.pm line 1 +01. Compilation failed in require at C:/Perl/lib/IO/File.pm line 133. BEGIN failed--compilation aborted at C:/Perl/lib/IO/File.pm line 133. Compilation failed in require at -e line 448. C:\Perl\site\bin/pp: Failed to extract a parl from 'PAR::StrippedPARL: +:Static' to file 'parl1JrEi1a.exe' at C:/Perl/site/lib/PAR/Packer.pm +line 1155, <DATA> line 1.
First suggestions in CB were:
> - Most likely you've overwritten the wrong DLL
> or are trying to launch a perl.exe that was
> for Perl 5.8.

Seems that this is not the reason, since I have no Perl 5.8 installed and nothing changed here in the last time.

> - Well, to answer your question as per your
> phrasing ("any suggestions?") I'd recompile the
> Perl module code you're using so that it matches
> the version of Perl you're running, markuhs.

How to do that on Windows?
How to find out, which module it was?
How to find out the "Perl version" of the module?

I only installed perl modules using "ppm" and the perl5.10 repositories...

Thanks
Lukas

Replies are listed 'Best First'.
Re: Perl_croak_xs_usage problem
by BrowserUk (Patriarch) on Oct 01, 2009 at 14:17 UTC

    If you have dumpbin.exe on your system, and you run it against the module named in the very first error message:

    Can't load 'C:/Perl/lib/auto/IO/IO.dll' for module IO: load_file: The specified procedure could not be found at C:/Perl/lib/XSLoader.pm +line 70.

    You'll find that it attempts to import this entrypoint (amongst many others), from perl510.dll:

    C:\test>dumpbin /imports \perl64\lib\auto\IO\IO.dll Microsoft (R) COFF/PE Dumper Version 7.00.9466 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file \perl64\lib\auto\IO\IO.dll File Type: DLL Section contains the following imports: perl510.dll ... 42E Perl_sv_newmortal 21C Perl_croak_xs_usage 8F PerlIO_tmpfile ...

    And if you dump the exports from perl510.dll, you should see it there:

    C:\test>dumpbin /exports \perl64\bin\perl510.dll | find "usage" 541 21C 00035690 Perl_croak_xs_usage

    For it not to be found in the DLL (you'd get a different error if the DLL wasn't found), suggests that the entrypoint is either:

    1. being exported under different name.

      Unlikely if this is a AS install.

    2. being imported under a different name (by IO.dll).

      Again unlikely as IO.dll comes with the AS distribution.

    My guess is that one or other (or both) of those two DLLs is being embedded in your .par and being found instead of those in your current AS distribution.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Just come from re-installing...
      No change! :-(

      Why should PAR work until last week and today it does not anymore?

        At the risk of stating the obvious, something changed!

        Without access to the .par in question and your system, diagnosis is impossible. Ie. You're the only one who can work out what is going on.


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.
        I'm seeing exactly the same problem, your not alone on this one :(
Re: Perl_croak_xs_usage problem
by syphilis (Archbishop) on Oct 02, 2009 at 07:06 UTC
    The procedure entry point Perl_croak_xs_usage could not be located in the dynamic link library perl510.dll.

    This particular procedure entry point will be locatable in the perl-5.10.1 dll, but not in the perl-5.10.0 dll.
    Ensuring that PAR was built for the particular build of Perl that you're using should eliminate this problem. But if PAR was built using perl-5.10.1, and you're using that PAR with perl-5.10.0, then you can expect an error like that.

    Cheers,
    Rob
      Sorry, I think I did not state my problem correctly.

      I do NOT have any problems on running the .par file.
      I DO have a problem CREATING the .par file.

      For me only C:\Perl\bin\perl510.dll exists...
        Hi, Curious if this ever got resolved.. I'm having the same issues. ==update== I decided to do an uninstall of 5.10.1 (I'm on Vista). When I started to do the uninstall, I noticed there were both 5.10.0 and 5.10.1 listed as installed. So I uninstalled both, and reinstalled 5.10.0. No problems after that.