Re: [COMMERCIAL] POE and Activestate perlapp fail on MacOSX

2016-01-05 Thread Craig Votava
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:

Needed to comment out POE::Resource:Statistics (when did that go away?)
The perlapp fails when “use Tk;” is uncommented
The perlapp succeeds when “use Tk;” is commented out
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 


-e syntax OK
Free non-Callback 1032e2a88 RV=0 during global destruction.
. (1):
 0 0x103801558   IV f=0001 undef(1)
SV = IV(0x103801548) at 0x103801558
  REFCNT = 1
  FLAGS = ()
  IV = 0
'mactst.pl' had compilation errors.


> On Jan 4, 2016, at 10:48 PM, Rocco Caputo  wrote:
> 
> 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 mailto:rcap...@pobox.com>>
> 
>> On Jan 4, 2016, at 13:34, Craig Votava > > wrote:
>> 
>> 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 
>> mailto:craig.vot...@alcatel-lucent.com>>
>> 
>> -e syntax OK
>> Free non-Callback 101ea3e08 RV=0 during global destruction.
>> . (1):
>>  0 0x104012158   IV f=0001 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
>> 
> 



Re: [COMMERCIAL] POE and Activestate perlapp fail on MacOSX

2016-01-05 Thread Rocco Caputo
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 

> On Jan 5, 2016, at 08:42, Craig Votava  
> wrote:
> 
> 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:
> 
> Needed to comment out POE::Resource:Statistics (when did that go away?)
> The perlapp fails when “use Tk;” is uncommented
> The perlapp succeeds when “use Tk;” is commented out
> 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 
> mailto:craig.vot...@alcatel-lucent.com>>
> 
> -e syntax OK
> Free non-Callback 1032e2a88 RV=0 during global destruction.
> . (1):
>  0 0x103801558   IV f=0001 undef(1)
> SV = IV(0x103801548) at 0x103801558
>   REFCNT = 1
>   FLAGS = ()
>   IV = 0
> 'mactst.pl' had compilation errors.
> 
> 
>> On Jan 4, 2016, at 10:48 PM, Rocco Caputo > > wrote:
>> 
>> 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 mailto:rcap...@pobox.com>>
>> 
>>> On Jan 4, 2016, at 13:34, Craig Votava >> > wrote:
>>> 
>>> 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 
>>> mailto:craig.vot...@alcatel-lucent.com>>
>>> 
>>> -e syntax OK
>>> Free non-Callback 101ea3e08 RV=0 during global destruction.
>>> . (1):
>>>  0 0x104012158   IV f=0001 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
>>> 
>> 
>