Re: [COMMERCIAL] POE and Activestate perlapp fail on MacOSX
[email protected] (Rocco Caputo) Tue, 5 Jan 2016 09:24:40 -0500
| Newsgroups | perl.poe |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail=_E012E225-F7C9-4C6C-93EA-8627B75D5DF5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi, Craig. According to http://code.activestate.com/lists/perl-tk/13841/ the error = seems to be coming from within Tk, so it's understandable the tests = without Tk would pass. That URL suggests calling Tk::exit() or $poe_main_window->destroy() = after POE::Kernel->run() returns may solve the problem. I'm inclined to = believe it since the "during global destruction" implies that objects = may be in the throes of out-of-order destruction. Ensuring a clean, = orderly shutdown of Tk is probably a good thing in general. Since your test program isn't calling POE::Kernel->run(), just invoking = $poe_main_window->destroy() or Tk::exit() at the end should be enough to = see if it's going to help. The "-e syntax OK" suggests that the error is happening as a result of a = "perl -c" check within PerlApp. Can you reproduce the error with just = "perl -c mactst.pl"? --=20 Rocco Caputo <[email protected]> > On Jan 5, 2016, at 08:42, Craig Votava = <[email protected]> wrote: >=20 > Hi Rocco- >=20 > The PerlMonks solution seems to be for a different problem on a = different platform, but this is a good suggestion that yielded = interesting results: >=20 > Needed to comment out POE::Resource:Statistics (when did that go = away?) > The perlapp fails when =E2=80=9Cuse Tk;=E2=80=9D is uncommented > The perlapp succeeds when =E2=80=9Cuse Tk;=E2=80=9D is commented out > The perlapp succeeds when all the POE lines are commented out and the = =E2=80=9Cuse Tk=E2=80=9D is uncommented. >=20 > So maybe the PerlMonks solution isn=E2=80=99t as far off as I thought. = It looks like we have a perlapp-Tk-POE issue. >=20 > What would be a good next step? >=20 > Thanks > -Craig >=20 > #!/usr/local/ActivePerl-5.20/bin/perl > use warnings; > use strict; >=20 > use Tk; >=20 > use POE qw (Loop::TkActiveState); > use POE::Loop::TkActiveState; > use POE::Kernel; > use POE::Session; > use POE::Resource::Aliases; > use POE::Resource::Events; > use POE::Resource::Extrefs; > use POE::Resource::FileHandles; > use POE::Resource::Sessions; > use POE::Resource::SIDs; > use POE::Resource::Signals; > #use POE::Resource::Statistics; >=20 > if(! defined($poe_main_window)) { die "\$poe_main_window not defined" = }; >=20 > $ perlapp --perl /usr/local/ActivePerl-5.20/bin/perl --verbose --clean = --force --lib lib --exe mca mactst.pl > PerlApp 9.4.0 build 298593 (perl 5.14.0) > Copyright (C) 1998-2014 ActiveState Software Inc. All rights reserved. > Commercial license S2EB72B1777B for Craig Votava = <[email protected] = <mailto:[email protected]>> >=20 > -e syntax OK > Free non-Callback 1032e2a88 RV=3D0 during global destruction. > . (1): > 0 0x103801558 IV f=3D00000001 undef(1) > SV =3D IV(0x103801548) at 0x103801558 > REFCNT =3D 1 > FLAGS =3D () > IV =3D 0 > 'mactst.pl' had compilation errors. >=20 >=20 >> On Jan 4, 2016, at 10:48 PM, Rocco Caputo <[email protected] = <mailto:[email protected]>> wrote: >>=20 >> Hi, Craig. >>=20 >> The PerlMonks thread you quoted ends with a solution to the OP's = problem. The mactst.pl you quoted doesn't seem to implement that = solution, so my first recommendation would be to try that. >>=20 >> --=20 >> Rocco Caputo <[email protected] <mailto:[email protected]>> >>=20 >>> On Jan 4, 2016, at 13:34, Craig Votava = <[email protected] = <mailto:[email protected]>> wrote: >>>=20 >>> Folks- >>>=20 >>> I=E2=80=99m running Yosemite (MacOSX 10.10.5) on a MacPro (Mid 2010) = and am trying to use ActiveState=E2=80=99s perlapp to create an = executable perl script. >>>=20 >>> I have been successful in creating some perl scripts that don=E2=80=99= t use POE, however when I try a script using POE, I get the following = error: >>>=20 >>> perlapp --perl /usr/local/ActivePerl-5.20/bin/perl --verbose --clean = --force --lib lib --exe mca mactst.pl >>> PerlApp 9.4.0 build 298593 (perl 5.14.0) >>> Copyright (C) 1998-2014 ActiveState Software Inc. All rights = reserved. >>> Commercial license S2EB72B1777B for Craig Votava = <[email protected] = <mailto:[email protected]>> >>>=20 >>> -e syntax OK >>> Free non-Callback 101ea3e08 RV=3D0 during global destruction. >>> . (1): >>> 0 0x104012158 IV f=3D00000001 undef(1) >>> SV =3D IV(0x104012148) at 0x104012158 >>> REFCNT =3D 1 >>> FLAGS =3D () >>> IV =3D 0 >>> 'mactst.pl' had compilation errors. >>>=20 >>> The contents of mactst.pl is as follows: >>>=20 >>> #!/usr/local/ActivePerl-5.20/bin/perl >>> use warnings; >>> use strict; >>> use Tk; >>> use POE; >>>=20 >>> if(! defined($poe_main_window)) { die "\$poe_main_window not = defined" }; >>>=20 >>> This *MAY* have something to do with an issue about the POE::Loop = that gets selected (read about it here = <http://www.perlmonks.org/?node_id=3D758312>), but I=E2=80=99m not sure. >>>=20 >>> How can I debug this? >>>=20 >>> Any help is much appreciated! >>>=20 >>> Thanks >>>=20 >>> -Craig >>>=20 >>=20 >=20 --Apple-Mail=_E012E225-F7C9-4C6C-93EA-8627B75D5DF5 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html = charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; = -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" = class=3D"">Hi, Craig.<div class=3D""><br class=3D""></div><div = class=3D"">According to <a = href=3D"http://code.activestate.com/lists/perl-tk/13841/" = class=3D"">http://code.activestate.com/lists/perl-tk/13841/</a> the = error seems to be coming from within Tk, so it's understandable the = tests without Tk would pass.</div><div class=3D""><br = class=3D""></div><div class=3D"">That URL suggests calling Tk::exit() or = $poe_main_window->destroy() after POE::Kernel->run() returns may = solve the problem. I'm inclined to believe it since the "during = global destruction" implies that objects may be in the throes of = out-of-order destruction. Ensuring a clean, orderly shutdown of Tk = is probably a good thing in general.</div><div class=3D""><br = class=3D""></div><div class=3D"">Since your test program isn't calling = POE::Kernel->run(), just invoking $poe_main_window->destroy() or = Tk::exit() at the end should be enough to see if it's going to = help.</div><div class=3D""><br class=3D""></div><div class=3D"">The "-e = syntax OK" suggests that the error is happening as a result of a "perl = -c" check within PerlApp. Can you reproduce the error with just = "perl -c mactst.pl"?</div><div class=3D""><br class=3D""></div><div = class=3D""><div class=3D""> <span class=3D"Apple-style-span" style=3D"border-collapse: separate; = font-family: Monaco; line-height: normal; border-spacing: 0px;"><div = class=3D"">-- </div><div class=3D"">Rocco Caputo <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>></div></span> </div> <br class=3D""><div><blockquote type=3D"cite" class=3D""><div = class=3D"">On Jan 5, 2016, at 08:42, Craig Votava <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""> <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dutf-8" = class=3D""><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: = space; -webkit-line-break: after-white-space;" class=3D"">Hi Rocco-<div = class=3D""><br class=3D""></div><div class=3D"">The PerlMonks solution = seems to be for a different problem on a different platform, but this is = a good suggestion that yielded interesting results:</div><div = class=3D""><br class=3D""></div><div class=3D""><ol = class=3D"MailOutline"><li class=3D"">Needed to comment out = POE::Resource:Statistics (when did that go away?)</li><li class=3D"">The = perlapp fails when =E2=80=9Cuse Tk;=E2=80=9D is uncommented</li><li = class=3D"">The perlapp succeeds when =E2=80=9Cuse Tk;=E2=80=9D is = commented out</li><li class=3D"">The perlapp succeeds when all the POE = lines are commented out and the =E2=80=9Cuse Tk=E2=80=9D is = uncommented.</li></ol></div><div class=3D""><br class=3D""></div><div = class=3D"">So maybe the PerlMonks solution isn=E2=80=99t as far off as I = thought. It looks like we have a perlapp-Tk-POE issue.</div><div = class=3D""><br class=3D""></div><div class=3D"">What would be a good = next step?</div><div class=3D""><br class=3D""></div><div = class=3D"">Thanks</div><div class=3D"">-Craig</div><div class=3D""><br = class=3D""></div><div class=3D""><span style=3D"font-family: 'Courier = New';" class=3D"">#!/usr/local/ActivePerl-5.20/bin/perl</span></div><div = class=3D""><div class=3D""><font face=3D"Courier New" class=3D"">use = warnings;</font></div><div class=3D""><font face=3D"Courier New" = class=3D"">use strict;</font></div><div class=3D""><font face=3D"Courier = New" class=3D""><br class=3D""></font></div><div class=3D""><font = face=3D"Courier New" class=3D"">use Tk;</font></div><div class=3D""><font = face=3D"Courier New" class=3D""><br class=3D""></font></div><div = class=3D""><font face=3D"Courier New" class=3D"">use POE qw = (Loop::TkActiveState);</font></div><div class=3D""><font face=3D"Courier = New" class=3D"">use POE::Loop::TkActiveState;</font></div><div = class=3D""><font face=3D"Courier New" class=3D"">use = POE::Kernel;</font></div><div class=3D""><font face=3D"Courier New" = class=3D"">use POE::Session;</font></div><div class=3D""><font = face=3D"Courier New" class=3D"">use = POE::Resource::Aliases;</font></div><div class=3D""><font face=3D"Courier = New" class=3D"">use POE::Resource::Events;</font></div><div = class=3D""><font face=3D"Courier New" class=3D"">use = POE::Resource::Extrefs;</font></div><div class=3D""><font face=3D"Courier = New" class=3D"">use POE::Resource::FileHandles;</font></div><div = class=3D""><font face=3D"Courier New" class=3D"">use = POE::Resource::Sessions;</font></div><div class=3D""><font face=3D"Courier= New" class=3D"">use POE::Resource::SIDs;</font></div><div = class=3D""><font face=3D"Courier New" class=3D"">use = POE::Resource::Signals;</font></div><div class=3D""><font face=3D"Courier = New" class=3D"">#use POE::Resource::Statistics;</font></div><div = class=3D""><font face=3D"Courier New" class=3D""><br = class=3D""></font></div><div class=3D""><font face=3D"Courier New" = class=3D"">if(! defined($poe_main_window)) { die "\$poe_main_window not = defined" };</font></div><div class=3D""><br class=3D""></div><div = class=3D"">$ perlapp --perl /usr/local/ActivePerl-5.20/bin/perl = --verbose --clean --force --lib lib --exe mca mactst.pl<br = class=3D"">PerlApp 9.4.0 build 298593 (perl 5.14.0)<br = class=3D"">Copyright (C) 1998-2014 ActiveState Software Inc. All rights = reserved.<br class=3D"">Commercial license S2EB72B1777B for Craig Votava = <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>><br class=3D""><br = class=3D"">-e syntax OK<br class=3D"">Free non-Callback 1032e2a88 RV=3D0 = during global destruction.<br class=3D"">. (1):<br class=3D""> 0 = 0x103801558 IV f=3D00000001 undef(1)<br class=3D"">SV =3D= IV(0x103801548) at 0x103801558<br class=3D""> REFCNT =3D = 1<br class=3D""> FLAGS =3D ()<br class=3D""> IV =3D = 0<br class=3D"">'mactst.pl' had compilation errors.<br class=3D""><br = class=3D""></div><div class=3D""><br class=3D""></div><div = class=3D""><blockquote type=3D"cite" class=3D""><div class=3D"">On Jan = 4, 2016, at 10:48 PM, Rocco Caputo <<a = href=3D"mailto:[email protected]" class=3D"">[email protected]</a>> = wrote:</div><br class=3D"Apple-interchange-newline"><div class=3D""> <div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D""><div class=3D"">Hi, = Craig.</div><div class=3D""><br class=3D""></div>The PerlMonks thread = you quoted ends with a solution to the OP's problem. The mactst.pl = you quoted doesn't seem to implement that solution, so my first = recommendation would be to try that.<div class=3D""><br class=3D""><div = class=3D""> <span class=3D"Apple-style-span" style=3D"border-collapse: separate; = font-family: Monaco; border-spacing: 0px;"><div = class=3D"">-- </div><div class=3D"">Rocco Caputo <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>></div></span> </div> <br class=3D""><div class=3D""><blockquote type=3D"cite" class=3D""><div = class=3D"">On Jan 4, 2016, at 13:34, Craig Votava <<a = href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>> wrote:</div><br = class=3D"Apple-interchange-newline"><div class=3D""> <div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; = -webkit-line-break: after-white-space;" class=3D"">Folks-<div = class=3D""><br class=3D""></div><div class=3D"">I=E2=80=99m running = Yosemite (MacOSX 10.10.5) on a MacPro (Mid 2010) and am trying to use = ActiveState=E2=80=99s perlapp to create an executable perl = script.</div><div class=3D""><br class=3D""></div><div class=3D"">I have = been successful in creating some perl scripts that don=E2=80=99t use = POE, however when I try a script using POE, I get the following = error:</div><div class=3D""><br class=3D""></div><div class=3D""><font = face=3D"Courier New" class=3D"">perlapp --perl = /usr/local/ActivePerl-5.20/bin/perl --verbose --clean --force --lib lib = --exe mca mactst.pl<br class=3D"">PerlApp 9.4.0 build 298593 (perl = 5.14.0)<br class=3D"">Copyright (C) 1998-2014 ActiveState Software Inc. = All rights reserved.<br class=3D"">Commercial license S2EB72B1777B for = Craig Votava <<a href=3D"mailto:[email protected]" = class=3D"">[email protected]</a>><br class=3D""><br = class=3D"">-e syntax OK<br class=3D"">Free non-Callback 101ea3e08 RV=3D0 = during global destruction.<br class=3D"">. (1):<br class=3D""> 0 = 0x104012158 IV f=3D00000001 undef(1)<br class=3D"">SV =3D= IV(0x104012148) at 0x104012158<br class=3D""> REFCNT =3D = 1<br class=3D""> FLAGS =3D ()<br class=3D""> IV =3D = 0<br class=3D"">'mactst.pl' had compilation errors.</font><br = class=3D""><br class=3D""></div><div class=3D"">The contents of = mactst.pl is as follows:</div><div class=3D""><br class=3D""></div><div = class=3D""><font face=3D"Courier New" = class=3D"">#!/usr/local/ActivePerl-5.20/bin/perl<br class=3D"">use = warnings;<br class=3D"">use strict;<br class=3D"">use Tk;<br = class=3D"">use POE;<br class=3D""><br class=3D"">if(! = defined($poe_main_window)) { die "\$poe_main_window not defined" = };</font></div><div class=3D""><br class=3D""></div><div class=3D"">This = *MAY* have something to do with an issue about the POE::Loop that gets = selected (<a href=3D"http://www.perlmonks.org/?node_id=3D758312" = class=3D"">read about it here</a>), but I=E2=80=99m not sure.</div><div = class=3D""><br class=3D""></div><div class=3D"">How can I debug = this?</div><div class=3D""><br class=3D""></div><div class=3D"">Any help = is much appreciated!</div><div class=3D""><br class=3D""></div><div = class=3D"">Thanks</div><div class=3D""><br class=3D""></div><div = class=3D"">-Craig</div><div class=3D""><br = class=3D""></div></div></div></blockquote></div><br = class=3D""></div></div></div></blockquote></div><br = class=3D""></div></div></div></blockquote></div><br = class=3D""></div></body></html>= --Apple-Mail=_E012E225-F7C9-4C6C-93EA-8627B75D5DF5--