sauoq has asked for the wisdom of the Perl Monks concerning the following question:
I want to take a Perl/Tk program and use PAR to create a standalone Windows executable that can then be distributed.
Okay... you got me... you know me too well. I hate working on Windows and I don't really want to do this. I just kinda have to. (If I want to get paid by this client, anyway.)
So, I installed Perl...
I also installed ActiveState ActiveTcl 8.4.11.1.175185 whether I needed it or not. (I don't know if I do, did, or ever will... but I have it now.) All right. Good to go. Oh, but I know I need PAR. No problem. I fired up ppm, install PAR, and away I go. Well, not quite. There were plenty of problems at this point. Some issue finding parl.exe was among them, which led me to realize I had to upgrade PAR because I got some horribly out of date version (0.79)... upgrading was a royal hassle, mostly because ppm upgrade PAR incorrectly reported that 0.89 is available in the Activestate Package Repository†. But, with some help from the CB, I finally got that straightened out.This is perl, v5.8.7 built for MSWin32-x86-multi-thread (with 7 registered patches, see perl -V for more detail) Copyright 1987-2005, Larry Wall Binary build 813 [148120] provided by ActiveState http://www.ActiveSta +te.com ActiveState is a division of Sophos. Built Jun 6 2005 13:36:37
Okay... so, now I'm good to go! Whee...C:\Perl\bin>perl -MPAR -e"print $PAR::VERSION" 0.89
Well, I didn't write the script I need to do this with and it's kind of a big one and not at all trivial... so I thought I'd try doing it with an extremely simple script first. Like this one:
which creates a cute little Tk editor that's fairly useless but somehow more fun than notepad. Anyway, I put that in a little file called pledit.pl and...use Tk; use Tk::TextUndo; (tkinit)->Scrolled('TextUndo')->pack; MainLoop;
And did that work like a charm, or what?C:\Perl\bin>pp -o ple.exe pledit.pl
No. It didn't.<gomer>Surprise! Surprise! Surprise!</gomer> As you've almost certainly correctly surmised, if it had, I wouldn't be writing this. I got this error message‡:
The procedure entry point PL_memory_wrap could not be located in the dynamic link library perl58.dll.
There were, at least, some slightly more juicy messages at the command prompt...
Not that I found them that useful though...C:\Perl\bin>.\ple.exe Can't load 'C:\DOCUME~1\SAUOQ~1.LOA\LOCALS~1\Temp\par-Sauoq\cache-1129 +323134\7 e4f5644.dll' for module Encode: load_file:The specified procedure coul +d not be found at D:/Perl58/lib/DynaLoader.pm line 229. at ../blib/lib/PAR/Heavy.pm line 107 Compilation failed in require at Tk.pm line 21. BEGIN failed--compilation aborted at Tk.pm line 21. Compilation failed in require at script/pledit.pl line 1. BEGIN failed--compilation aborted at script/pledit.pl line 1.
Well, I've seen errors before and I know what to do. Quickly dash up a half-assed SoPW post and wait for the monks to do my job for me. Research. I found this thread and this one on gmane. But the only thing that I managed to get from reading through those is that this problem was almost certainly related to the perl58.dll shipped with 5.8.6. Well, I've got 5.8.7 and I've never had another perl on this Windows box... so that didn't give me much to go on. There was a thread on comp.lang.perl.misc that didn't help much. Then there was this thread on aspn.activestate.com (no real help.) And finally, a Super Search for "PL_memory_wrap" turned up two threads:
I've tried PAR versions 0.89 from both randyk's uwinnipeg repository and from bribes and version 0.85 from crazyinsomniac's repository to no avail. (Given randyk's responses in various discussions on this, I really had high hopes that the PAR package from his repository would work for me.) I noticed somewhere where someone downgraded perl to 5.8.6 and got things working that way, but that's not an option in my case. I'm at a bit of a loss. Has anyone had this problem and been able to correct it? Or does anyone have a PAR package that will work for me?
† I suspect these were related to the problem discussed in PPM mis-identifying / failing to upgrade some module upgrade candidates.
‡ Wouldn't it be nice if you could copy and paste the messages that pop up in Windows? Blah...
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Windows + Tk + PAR == PL_memory_wrap error.
by randyk (Parson) on Oct 15, 2005 at 04:37 UTC | |
by sauoq (Abbot) on Oct 15, 2005 at 05:15 UTC | |
by strat (Canon) on Oct 15, 2005 at 08:46 UTC | |
by vayu (Initiate) on Dec 01, 2005 at 16:08 UTC | |
by randyk (Parson) on Dec 04, 2005 at 06:04 UTC | |
by vayu (Initiate) on Dec 05, 2005 at 11:02 UTC |