in reply to Re^6: Perl_croak_xs_usage problem
in thread Perl_croak_xs_usage problem

Might there be an error within PAR?

You'd have to consult PAR maintainers as to whether they consider it a error. I suspect that they'll say that you are using it wrongly.

When you package up your scripts with PAR, it not only incorporates your scripts and modules, but also as much of the installed perl--including any required DLLs--as is required to allow your script to run on a machine that does not have a perl installation. The intention being that you can distribute that single file to users and not require them to install Perl before using your code.

What you are attempting to do is run that packaged application on a system that already has a full perl installation. And a different version of Perl to that which was used during the packaging. Hence you are creating a situation whereby there are multiple executable files (dlls) with the same name but differing contents being loaded at runtime. Needless to say, this doesn't work.

Essentially, you have discovered that my guess regarding the presence of an incompatible version of perl510.dll exists within your .par file is correct. You now need to decide what to do about it. If you contact the PAR maintainers they might have a work-around?

The simplest solution would be for you to install the appropriate parts of your application--ie. just your sources files (.pls and .pms)--onto the system manually (by copying the files from the original system), and then, if necessary, repackage the application on the new system using PAR.


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.
RIP PCW It is as I've been saying!(Audio until 20090817)

Replies are listed 'Best First'.
Re^8: Perl_croak_xs_usage problem
by markuhs (Scribe) on Oct 02, 2009 at 08:31 UTC
    It happens during "packaging time" not during "run time"... The system stays the same all the time. (Not for later usage! But I currently do NOT reach the point, where I can deploy it as a tool to other users/systems.)

    I downgraded to active state build 1005 and it works again...

      Somewhere on your system you have two different files called perl510.dll. The one installed with the AS distribution; and the one that doesn't export the Perl_croak_xs_usage entrypoint.

      When you revert to the earlier perl installation and things work, it is because the "other perl510.dll" is still being found, but it now matches the one from the earlier perl distribution, so everything works. What you need to do, if you wish to upgrade to the latest version of Perl, is isolate where that hidden dll is located.

      My guess is that when you are trying to package whatever it is you are trying to package, it has a dependency upon something that is already packaged--and was packaged using the earlier distribution.

      In order to upgrade, you need to repackage that dependency (and any prepackaged dependencies it might have), before you will be able to package anything that has that currently down-level package as a dependency,


      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.
        BrowserUk, Thanks a lot for your continued help!

        If I search perl*.dll on my local drives, all I find is located in C:\Perl\bin\:
        • perl510.dll
        • perlEx30.dll
        • PerlEz.dll
        • perlis.dll
        • PerlMsg.dll
        • PerlSE.dll
        I doubt, that code from a network drive will be used. In addition my PATH has no drive letter except for C:\... in it.

        So I doubt that any "other DLL" exists...
        As to your second suggestion:
        What could be already packaged with a wrong version?
        • My own code? - No, it is all plain text files.
        • Any modules? - How can I find out if any?
        • What else???
Re^8: Perl_croak_xs_usage problem
by Anonymous Monk on Oct 02, 2009 at 08:30 UTC
    Also, it would be good idea to first test your pp'd file locally by removing perl from path, something like
    C:\>set path=%windir%\system32;%windir% C:\>mypp.exe