Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

POE and Activestate perlapp fail on MacOSX

1 view
Skip to first unread message

Craig Votava

unread,
Jan 4, 2016, 7:00:02 PM1/4/16
to POE Mailing List
Folks-

I’m running Yosemite (MacOSX 10.10.5) on a MacPro (Mid 2010) and am trying to use ActiveState’s perlapp to create an executable perl script.

I have been successful in creating some perl scripts that don’t use POE, however when I try a script using POE, I get the following error:

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 <Craig....@alcatel-lucent.com>

-e syntax OK
Free non-Callback 101ea3e08 RV=0 during global destruction.
. (1):
 0 0x104012158   IV f=00000001 undef(1)
SV = IV(0x104012148) at 0x104012158
  REFCNT = 1
  FLAGS = ()
  IV = 0
'mactst.pl' had compilation errors.


The contents of mactst.pl is as follows:

#!/usr/local/ActivePerl-5.20/bin/perl
use warnings;
use strict;
use Tk;
use POE;

if(! defined($poe_main_window)) { die "\$poe_main_window not defined" };

This *MAY* have something to do with an issue about the POE::Loop that gets selected (read about it here), but I’m not sure.

How can I debug this?

Any help is much appreciated!

Thanks

-Craig

Rocco Caputo

unread,
Jan 5, 2016, 12:00:02 AM1/5/16
to POE Mailing List
Hi, Craig.

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.

-- 
Rocco Caputo <rca...@pobox.com>

Craig Votava

unread,
Jan 5, 2016, 9:15:02 AM1/5/16
to Rocco Caputo, POE Mailing List
Hi Rocco-

The PerlMonks solution seems to be for a different problem on a different platform, but this is a good suggestion that yielded interesting results:

  1. Needed to comment out POE::Resource:Statistics (when did that go away?)
  2. The perlapp fails when “use Tk;” is uncommented
  3. The perlapp succeeds when “use Tk;” is commented out
  4. The perlapp succeeds when all the POE lines are commented out and the “use Tk” is uncommented.

So maybe the PerlMonks solution isn’t as far off as I thought. It looks like we have a perlapp-Tk-POE issue.

What would be a good next step?

Thanks
-Craig

#!/usr/local/ActivePerl-5.20/bin/perl
use warnings;
use strict;

use Tk;

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;

if(! defined($poe_main_window)) { die "\$poe_main_window not defined" };

$ 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 <Craig....@alcatel-lucent.com>

-e syntax OK
Free non-Callback 1032e2a88 RV=0 during global destruction.
. (1):
 0 0x103801558   IV f=00000001 undef(1)
SV = IV(0x103801548) at 0x103801558

  REFCNT = 1
  FLAGS = ()
  IV = 0
'mactst.pl' had compilation errors.

Rocco Caputo

unread,
Jan 5, 2016, 9:30:02 AM1/5/16
to POE Mailing List
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"?

-- 
Rocco Caputo <rca...@pobox.com>
0 new messages