Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^6: Perl_croak_xs_usage problem

by markuhs (Scribe)
on Oct 02, 2009 at 06:07 UTC ( #798788=note: print w/ replies, xml ) Need Help??


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

Sorry, dumpbin did not work on my system... It would have shown me no different output than yours, I guess.

I use PAR (a Perl module) to package some "pl" and "pm" files to one "exe" file. There is no "par" file involved. Nevertheless PAR creates a "par" file. For me, this means, that there is no "par" file containing any dll as far as I know.


I looked at the Process Explorer. I found:
->cmd.exe
   ->perl.exe
      ->parlIlTc.exe
         ->parlIlTc.exe

perl.exe has the correct dlls, as well as the first parlIlTc process. The last process has C:\WINNT\Temp\par-li04870\cache-5c8d934cadf7f43c5d1b5b758a47dff329f59ea8\perl510.dll, though!

Might there be an error within PAR?


Comment on Re^6: Perl_croak_xs_usage problem
Select or Download Code
Re^7: Perl_croak_xs_usage problem
by BrowserUk (Pope) on Oct 02, 2009 at 07:55 UTC
    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.
      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
      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://798788]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2014-07-23 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (146 votes), past polls