issues installing/using PAR::Packer
completely new to perl here and wanting to use PAR::Packer to generate a stand-alone of my app for use on a remote machine. i've stumbled my way through the install of PAR and PAR::Packer successfully, i think. to install: cpan make install PAR cpan make install PAR::Packer but when i put use PAR::Packer in my script it bombs with the following message: Can't locate Module/ScanDeps.pm in @INC (@INC contains: CODE(0x5052a4) C:/strawb erry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/ lib . CODE(0 x5055bc)) at C:/strawberry/perl/site/lib/PAR/Packer.pm line 35. BEGIN failed--compilation aborted at C:/strawberry/perl/site/lib/PAR/ Packer.pm l ine 35. Compilation failed in require at search.pl line 7. BEGIN failed--compilation aborted at search.pl line 7. ScanDeps.pm does exist in my strawberry directory, just not in the @INC locations. also: cpan install PAR PAR is up to date (1.002). cpan install PAR::Packer PAR::Packer is up to date (1.007). I'm running Windows 7, Perl 5. any help would be greatly appreciated. ryan
Re: issues installing/using PAR::Packer
On Wed, Nov 17, 2010 at 4:16 AM, Ryan A arne...@gmail.com wrote: completely new to perl here and wanting to use PAR::Packer to generate a stand-alone of my app for use on a remote machine. i've stumbled my way through the install of PAR and PAR::Packer successfully, i think. to install: cpan make install PAR cpan make install PAR::Packer but when i put use PAR::Packer in my script it bombs with the following message: Why do you want to use PAR::Packer at all? For the vast majority of use cases a simple invocation pp -o my_stand_alone.exe my_script.pl should do it, i.e. pack my_script.pl and all modules etc it depends on into a stand-alone executable - no programming, esp. no changes to my_script.pl, necessary. Cheers, Roderich
[rt.cpan.org #63083] pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry
Wed Nov 17 08:13:18 2010: Request 63083 was acted upon. Transaction: Ticket created by Coctic Queue: PAR-Packer Subject: pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry Broken in: 1.007 Severity: Important Owner: Nobody Requestors: cs...@parallel.ru Status: new Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=63083 I compile simple file #!/usr/bin/perl use IO (); with pp -o a.exe a.pl On the same machine it works OK. Then I transfer it to another machine and get: $ ./a.exe Undefined subroutine DynaLoader::bootstrap called at /usr/lib/perl5/x86_64-linux/XSLoader.pm line 105. Compilation failed in require at /usr/lib/perl5/x86_64-linux/IO/Handle.pm line 263. BEGIN failed--compilation aborted at /usr/lib/perl5/x86_64-linux/IO/Handle.pm line 263. Compilation failed in require at /usr/lib/perl5/x86_64-linux/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at /usr/lib/perl5/x86_64-linux/IO/Seekable.pm line 101. Compilation failed in require at /usr/lib/perl5/x86_64-linux/IO/File.pm line 133. BEGIN failed--compilation aborted at /usr/lib/perl5/x86_64-linux/IO/File.pm line 133. Compilation failed in require at -e line 351. Some details about machines: Compile machine: $ pp --version PAR Packager, version 1.007 (PAR version 1.002) $ perl -v This is perl, v5.8.8 built for x86_64-linux-thread-multi $ uname -a Linux t60-2.parallel.ru 2.6.18-skif-rhel-alt13.M41.3 #1 SMP Tue Feb 2 12:09:59 MSK 2010 x86_64 GNU/Linux Target machine (with binary not working): $ perl -v This is perl, v5.8.9 built for x86_64-linux-thread-multi $ uname -a Linux access.lomonosov.parallel.ru 2.6.27-tmc-srv-tmc76 #1 SMP Fri Aug 27 20:32:25 UTC 2010 x86_64 GNU/Linux How can I make binary using IO that can be transferred to another machine?
[rt.cpan.org #63083] pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry
Wed Nov 17 08:56:17 2010: Request 63083 was acted upon. Transaction: Correspondence added by RSCHUPP Queue: PAR-Packer Subject: pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry Broken in: 1.007 Severity: Important Owner: Nobody Requestors: cs...@parallel.ru Status: new Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=63083 On 2010-11-17 08:13:18, Coctic wrote: Then I transfer it to another machine and get: $ ./a.exe Undefined subroutine DynaLoader::bootstrap called at /usr/lib/perl5/x86_64-linux/XSLoader.pm line 105. That's not supposed to happen :( A couple of questions: - did you build PAR::Packer yourself? - if yes - did you build it on the machine where you do the packing? - did you run make test and all tests succeeded? Can you run the following on the machine where the packed executable fails: strace -o a.strace -f -v -e trace=file,process ./a.exe gzip the resulting a.strace and attach it to the ticket. Cheers, Roderich
[rt.cpan.org #63083] pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry
Wed Nov 17 09:26:36 2010: Request 63083 was acted upon. Transaction: Correspondence added by Coctic Queue: PAR-Packer Subject: pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry Broken in: 1.007 Severity: Important Owner: Nobody Requestors: cs...@parallel.ru Status: open Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=63083 On Wed Nov 17 08:56:17 2010, RSCHUPP wrote: - did you build PAR::Packer yourself? - if yes - did you build it on the machine where you do the packing? - did you run make test and all tests succeeded? I ran cpan shell, then used 'install pp' command. As I remeber, it did the tests and did not complain about it. I can try re-make the tests if it's needed. gzip the resulting a.strace and attach it to the ticket. Done it. a.strace.gz Description: application/binary
[rt.cpan.org #63083] pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry
Wed Nov 17 10:30:16 2010: Request 63083 was acted upon. Transaction: Correspondence added by Coctic Queue: PAR-Packer Subject: pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry Broken in: 1.007 Severity: Important Owner: Nobody Requestors: cs...@parallel.ru Status: open Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=63083 - did you build PAR::Packer yourself? - if yes - did you build it on the machine where you do the packing? Forgot to say: yes, it was done on the same machine that did the packing. - did you run make test and all tests succeeded? I rebuilt pp, cpan skipped 1 test, all others succeeded. The bug did not go away.
[rt.cpan.org #63083] pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry
Wed Nov 17 12:28:26 2010: Request 63083 was acted upon. Transaction: Correspondence added by RSCHUPP Queue: PAR-Packer Subject: pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry Broken in: 1.007 Severity: Important Owner: Nobody Requestors: cs...@parallel.ru Status: open Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=63083 Thanks for info and strace. strace shows that a.exe pulled in /usr/lib64/libperl.so.5.8, i.e the shared perl library from the system where it ran (instead of the copy that is packed in the executable). Since this is from another version of Perl it might explain the problem. But it isn't supposed to do that... strace also shows that you ran a.exe with LD_LIBRARY_PATH set in the environment. Can you rerun a.exe without it and see if the problem goes away? Another thing to try: first remove PAR's cache area which according to strace was /home/users/cstef/tmp/par-cstef (you have TMPDIR=$HOME/tmp, right?) then run a.exe and look for a file also called a.exe in the cache area, should be something like /home/users/cstef/tmp/par-cstef/cache-LONGSHA1DIGEST/a.exe and post the output of readelf -d /home/users/cstef/tmp/par-cstef/cache-LONGSHA1DIGEST/a.exe In the same directory there should also be a file matching libperl*so* -what is its name? Cheers, Roderich
[rt.cpan.org #63083] pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry
Thu Nov 18 01:51:24 2010: Request 63083 was acted upon. Transaction: Correspondence added by Coctic Queue: PAR-Packer Subject: pp: Undefined subroutine DynaLoader::bootstrap called in pp-compiled bianry Broken in: 1.007 Severity: Important Owner: Nobody Requestors: cs...@parallel.ru Status: open Ticket URL: https://rt.cpan.org/Ticket/Display.html?id=63083 On Wed Nov 17 12:28:26 2010, RSCHUPP wrote: strace also shows that you ran a.exe with LD_LIBRARY_PATH set in the environment. Can you rerun a.exe without it and see if the problem goes away? No, it doesn't: $ export LD_LIBRARY_PATH= cs...@access:~ $ ./a.exe Undefined subroutine DynaLoader::bootstrap called at /usr/lib/perl5/x86_64-linux/XSLoader.pm line 105. Compilation failed in require at /usr/lib/perl5/x86_64-linux/IO/Handle.pm line 263. BEGIN failed--compilation aborted at /usr/lib/perl5/x86_64-linux/IO/Handle.pm line 263. Compilation failed in require at /usr/lib/perl5/x86_64-linux/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at /usr/lib/perl5/x86_64-linux/IO/Seekable.pm line 101. Compilation failed in require at /usr/lib/perl5/x86_64-linux/IO/File.pm line 133. BEGIN failed--compilation aborted at /usr/lib/perl5/x86_64-linux/IO/File.pm line 133. Compilation failed in require at -e line 351. Another thing to try: first remove PAR's cache area which according to strace was /home/users/cstef/tmp/par-cstef (you have TMPDIR=$HOME/tmp, right?) Right. then run a.exe and look for a file also called a.exe in the readelf -d /home/users/cstef/tmp/par-cstef/cache-LONGSHA1DIGEST/a.exe $ readelf -d /home/users/cstef/tmp/par-cstef/cache-91983bfecf21472d244f6bf26116bc20ee4433d3/a.exe Dynamic section at offset 0xc028 contains 22 entries: TagType Name/Value 0x0001 (NEEDED) Shared library: [libperl.so.5.8] 0x0001 (NEEDED) Shared library: [libpthread.so.0] 0x0001 (NEEDED) Shared library: [libc.so.6] 0x000c (INIT) 0x401dd0 0x000d (FINI) 0x405b38 0x6ef5 (GNU_HASH) 0x400240 0x0005 (STRTAB) 0x400ea8 0x0006 (SYMTAB) 0x4003e0 0x000a (STRSZ) 1501 (bytes) 0x000b (SYMENT) 24 (bytes) 0x0015 (DEBUG) 0x0 0x0003 (PLTGOT) 0x60c1e0 0x0002 (PLTRELSZ) 1896 (bytes) 0x0014 (PLTREL) RELA 0x0017 (JMPREL) 0x401668 0x0007 (RELA) 0x401620 0x0008 (RELASZ) 72 (bytes) 0x0009 (RELAENT)24 (bytes) 0x6ffe (VERNEED)0x401570 0x6fff (VERNEEDNUM) 3 0x6ff0 (VERSYM) 0x401486 0x (NULL) 0x0 In the same directory there should also be a file matching libperl*so* -what is its name? $ ls /home/users/cstef/tmp/par-cstef/cache-91983bfecf21472d244f6bf26116bc20ee4433d3/libperl* /home/users/cstef/tmp/par-cstef/cache-91983bfecf21472d244f6bf26116bc20ee4433d3/libperl.so.5.8.8