Sat Nov 30 14:25:12 2013: Request 90870 was acted upon. Transaction: Correspondence added by RSCHUPP Queue: PAR-Packer Subject: Segmentation fault (core dumped) (MooX::Options) Broken in: (no value) Severity: (no value) Owner: RSCHUPP Requestors: ga...@szabgab.com Status: open Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=90870 >
On 2013-11-28 13:54:36, RSCHUPP wrote: > Here's the real culprit: > > $ pp -o hello.exe -e 'die "WTF?";' > $ ./hello.exe > Segmentation fault > > This happens for Perl 5.18.1. But Perl 5.16.3 is OK: > > $ pp -o hello.exe -e 'die "WTF?";' > $ ./hello.exe > WTF? at script/ppTspYF.pl line 1. Fixed in PAR::Packer 1.016 (just uploaded to PAUSE). NOTE: This fixes segfaults triggered by any "die" in the packed executable, but not your original problem trying to pack stuff using Moo* stuff. At least, you can see the real reason: $ pp -o szabgab.exe -e 'use B::Hooks::EndOfScope; print "hello world\n";' $ ./szabgab.exe Could not find a suitable B::Hooks::EndOfScope implementation: Can't locate B/Hooks/EndOfScope/XS.pm in @INC (you may need to install the B::Hooks::EndOfScope::XS module) (@INC contains: CODE(0x31f0420) /tmp/par-726f646572696368/cache-6c66675a43a552779a3148d04cd01bdb1fbc6744/inc/lib /tmp/par-726f646572696368/cache-6c66675a43a552779a3148d04cd01bdb1fbc6744/inc CODE(0x30a44f0) CODE(0x30b6540)) at Module/Runtime.pm line 317. Can't locate B/Hooks/EndOfScope/PP.pm in @INC (you may need to install the B::Hooks::EndOfScope::PP module) (@INC contains: CODE(0x31f0420) /tmp/par-726f646572696368/cache-6c66675a43a552779a3148d04cd01bdb1fbc6744/inc/lib /tmp/par-726f646572696368/cache-6c66675a43a552779a3148d04cd01bdb1fbc6744/inc CODE(0x30a44f0) CODE(0x30b6540)) at Module/Runtime.pm line 317. at B/Hooks/EndOfScope.pm line 21. BEGIN failed--compilation aborted at B/Hooks/EndOfScope.pm line 32. Compilation failed in require at script/ppXCrHm.pl line 1. BEGIN failed--compilation aborted at script/ppXCrHm.pl line 1. B::Hooks::EndOfScope needs either B::Hooks::EndOfScope::PP or B::Hooks::EndOfScope::XS, but Module::ScanDeps didn't detect that. Workaround: add the missing modules to the "pp" command (witn option "-M"). I may fix Module::ScanDeps to detect that, but don't hold your breath :) Another example: $ pp -o szabgab.exe -e 'use namespace::clean; print "hello world\n";' $ ./szabgab.exe Could not find a suitable B::Hooks::EndOfScope implementation: ... So that's caused by the missing dependencies of B::Hooks::EndOfScope. The last example is from your post on PerlMonks: $ pp -o szabgab.exe -e 'use Pod::Usage qw(pod2usage); print "hello world\n";' $ ./szabgab.exe Can't locate Pod/Text.pm in @INC (you may need to install the Pod::Text module) (@INC contains: CODE(0x20b3bc8) /tmp/par-726f646572696368/cache-b5dffca7b1fc4b69c2161e1512cc77e7d16f538d/inc/lib /tmp/par-726f646572696368/cache-b5dffca7b1fc4b69c2161e1512cc77e7d16f538d/inc CODE(0x1f65320) CODE(0x1f77370)) at (eval 17) line 2. BEGIN failed--compilation aborted at Pod/Usage.pm line 30. Compilation failed in require at script/ppJ7pGG.pl line 1. BEGIN failed--compilation aborted at script/ppJ7pGG.pl line 1. Again, Module::ScanDeps failed to detect that Pod::Usage requires Pod::Text. Cheers, Roderich