Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^5: no modules unziped from par archive

by marto (Chancellor)
on Jul 23, 2012 at 10:26 UTC ( #983143=note: print w/ replies, xml ) Need Help??


in reply to Re^4: no modules unziped from par archive
in thread no modules unziped from par archive

Well, if you've read the pp docs and the advice given to date you're creating the executable with pp with the -x option right? To date none of your posts show you actually doing this.

"I wonder how can i extract all of these files without running the executable."

Really? It tells you this in the documentation. Again, have you actually packed your script and it's dependencies?

Creating an exe based on my example from Re: PP: Executables still need require files.....:

C:\>pp -o pptest2.exe -c -x pptest.pl -v C:\strawberry\perl\site\bin/pp: Packing pptest.pl C:\strawberry\perl\site\bin/pp: Generating a fresh 'parl'. C:\strawberry\perl\site\bin/pp: Running C:\DOCUME~1\REMOVED\LOCALS~1\T +emp\parlf 7H0GJh.exe -B -Opptest2.exe C:\DOCUME~1\REMOVED\LOCALS~1\Temp\ppXKxhZ. +par Packing "AutoLoader.pm"... Written as "AutoLoader.pm" Packing "Compress/Zlib.pm"... Written as "Compress/Zlib.pm" Packing "Compress/Raw/Zlib.pm"... Written as "Compress/Raw/Zlib.pm" Packing "Config.pm"... Written as "Config.pm" Packing "Config_git.pl"... Written as "Config_git.pl" Packing "Config_heavy.pl"... Written as "Config_heavy.pl" Packing "Cwd.pm"... Written as "Cwd.pm" Packing "DynaLoader.pm"... Written as "DynaLoader.pm" Packing "Errno.pm"... Written as "Errno.pm" Packing "Exporter.pm"... Written as "Exporter.pm" Packing "Exporter/Heavy.pm"... Written as "Exporter/Heavy.pm" Packing "Fcntl.pm"... Written as "Fcntl.pm" Packing "File/Basename.pm"... Written as "File/Basename.pm" Packing "File/Copy.pm"... Written as "File/Copy.pm" Packing "File/Find.pm"... Written as "File/Find.pm" Packing "File/Glob.pm"... Written as "File/Glob.pm" Packing "File/GlobMapper.pm"... Written as "File/GlobMapper.pm" Packing "File/Path.pm"... Written as "File/Path.pm" Packing "File/Spec.pm"... Written as "File/Spec.pm" Packing "File/Spec/Unix.pm"... Written as "File/Spec/Unix.pm" Packing "File/Spec/Win32.pm"... Written as "File/Spec/Win32.pm" Packing "File/Temp.pm"... Written as "File/Temp.pm" Packing "FileHandle.pm"... Written as "FileHandle.pm" Packing "IO.pm"... Written as "IO.pm" Packing "IO/Compress/Adapter/Deflate.pm"... Written as "IO/Compress/Adapter/Deflate.pm" Packing "IO/Compress/Base.pm"... Written as "IO/Compress/Base.pm" Packing "IO/Compress/Base/Common.pm"... Written as "IO/Compress/Base/Common.pm" Packing "IO/Compress/Gzip.pm"... Written as "IO/Compress/Gzip.pm" Packing "IO/Compress/Gzip/Constants.pm"... Written as "IO/Compress/Gzip/Constants.pm" Packing "IO/Compress/RawDeflate.pm"... Written as "IO/Compress/RawDeflate.pm" Packing "IO/Compress/Zlib/Extra.pm"... Written as "IO/Compress/Zlib/Extra.pm" Packing "IO/File.pm"... Written as "IO/File.pm" Packing "IO/Handle.pm"... Written as "IO/Handle.pm" Packing "IO/Seekable.pm"... Written as "IO/Seekable.pm" Packing "IO/Uncompress/Adapter/Inflate.pm"... Written as "IO/Uncompress/Adapter/Inflate.pm" Packing "IO/Uncompress/Base.pm"... Written as "IO/Uncompress/Base.pm" Packing "IO/Uncompress/Gunzip.pm"... Written as "IO/Uncompress/Gunzip.pm" Packing "Archive/Zip/Member.pm"... Written as "Archive/Zip/Member.pm" Packing "Archive/Zip/NewFileMember.pm"... Written as "Archive/Zip/NewFileMember.pm" Packing "IO/Uncompress/RawInflate.pm"... Written as "IO/Uncompress/RawInflate.pm" Packing "List/Util.pm"... Written as "List/Util.pm" Packing "PerlIO.pm"... Written as "PerlIO.pm" Packing "PerlIO/scalar.pm"... Written as "PerlIO/scalar.pm" Packing "Scalar/Util.pm"... Written as "Scalar/Util.pm" Packing "SelectSaver.pm"... Written as "SelectSaver.pm" Packing "Symbol.pm"... Written as "Symbol.pm" Packing "Tie/Hash/NamedCapture.pm"... Written as "Tie/Hash/NamedCapture.pm" Packing "Time/Local.pm"... Written as "Time/Local.pm" Packing "UNIVERSAL.pm"... Written as "UNIVERSAL.pm" Packing "Win32.pm"... Written as "Win32.pm" Packing "XSLoader.pm"... Written as "XSLoader.pm" Packing "attributes.pm"... Written as "attributes.pm" Packing "auto/Compress/Raw/Zlib/autosplit.ix"... Written as "auto/Compress/Raw/Zlib/autosplit.ix" Packing "auto/DynaLoader/dl_findfile.al"... Written as "auto/DynaLoader/dl_findfile.al" Packing "base.pm"... Written as "base.pm" Packing "bytes.pm"... Written as "bytes.pm" Packing "constant.pm"... Written as "constant.pm" Packing "integer.pm"... Written as "integer.pm" Packing "lib.pm"... Written as "lib.pm" Packing "overload.pm"... Written as "overload.pm" Packing "strict.pm"... Written as "strict.pm" Packing "utf8.pm"... Written as "utf8.pm" Packing "vars.pm"... Written as "vars.pm" Packing "warnings.pm"... Written as "warnings.pm" Packing "warnings/register.pm"... Written as "warnings/register.pm" Packing "Carp.pm"... Written as "Carp.pm" Packing "Carp/Heavy.pm"... Written as "Carp/Heavy.pm" Packing "PAR.pm"... Written as "PAR.pm" Packing "PAR/Dist.pm"... Written as "PAR/Dist.pm" Packing "PAR/Filter.pm"... Written as "PAR/Filter.pm" Packing "PAR/Filter/PatchContent.pm"... Written as "PAR/Filter/PatchContent.pm" Packing "PAR/Filter/PodStrip.pm"... Written as "PAR/Filter/PodStrip.pm" Packing "PAR/Heavy.pm"... Written as "PAR/Heavy.pm" Packing "PAR/SetupProgname.pm"... Written as "PAR/SetupProgname.pm" Packing "PAR/SetupTemp.pm"... Written as "PAR/SetupTemp.pm" Packing "Archive/Zip.pm"... Written as "Archive/Zip.pm" Packing "Archive/Zip/Archive.pm"... Written as "Archive/Zip/Archive.pm" Packing "Archive/Zip/DirectoryMember.pm"... Written as "Archive/Zip/DirectoryMember.pm" Packing "Archive/Zip/FileMember.pm"... Written as "Archive/Zip/FileMember.pm" Packing "Archive/Zip/StringMember.pm"... Written as "Archive/Zip/StringMember.pm" Packing "Archive/Zip/ZipFileMember.pm"... Written as "Archive/Zip/ZipFileMember.pm" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/06a88e00.dll"... Written as "auto/PerlIO/scalar/scalar.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/08de616f.dll"... Written as "auto/Win32/Win32.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/22b248d3.dll"... Written as "auto/File/Glob/Glob.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/45bc464c.dll"... Written as "auto/Cwd/Cwd.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/4a862d50.dll"... Written as "auto/attributes/attributes.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/60b1a25f.dll"... Written as "auto/List/Util/Util.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/b8aa0537.dll"... Written as "auto/Compress/Raw/Zlib/Zlib.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/d3cbdc54.dll"... Written as "auto/Fcntl/Fcntl.dll" Packing "C:\DOCUME~1\REMOVED\LOCALS~1\Temp\par-REMOVED\cache-19142cd9f +bef10ee1 18be11356696fdeed3306b5/da39e022.dll"... Written as "auto/IO/IO.dll" C:\>

unzip the exe to a temporary directory:

Volume in drive C is XP MP 3.01 Volume Serial Number is CE02-00E2 Directory of C:\tmptmp 23/07/2012 11:01 <DIR> . 23/07/2012 11:01 <DIR> .. 23/07/2012 11:01 <DIR> lib 23/07/2012 10:56 27,040 MANIFEST 23/07/2012 10:56 218 META.yml 23/07/2012 11:01 <DIR> script 3 File(s) 27,258 bytes Directory of C:\tmptmp\lib 23/07/2012 11:01 <DIR> . 23/07/2012 11:01 <DIR> .. 23/07/2012 11:00 <DIR> auto 23/07/2012 10:56 5,457 AutoLoader.pm 23/07/2012 10:56 8,103 B.pm 23/07/2012 10:56 4,915 base.pm 23/07/2012 10:56 476 bytes.pm 21/11/2010 15:40 758 bytes_heavy.pl 23/07/2012 10:56 11,602 Carp.pm 23/07/2012 11:00 <DIR> Class 23/07/2012 10:56 2,900 Config.pm 15/05/2011 17:53 421 Config_git.pl 15/05/2011 17:53 34,958 Config_heavy.pl 23/07/2012 10:56 4,505 constant.pm 23/07/2012 10:56 17,060 Cwd.pm 23/07/2012 10:56 11,531 DynaLoader.pm 23/07/2012 10:56 143,518 Errno.pm 23/07/2012 11:00 <DIR> Exporter 23/07/2012 10:56 2,414 Exporter.pm 23/07/2012 10:56 3,586 Fcntl.pm 23/07/2012 10:56 2,516 feature.pm 23/07/2012 11:00 <DIR> File 23/07/2012 10:56 2,139 FileHandle.pm 23/07/2012 10:56 203 integer.pm 23/07/2012 11:00 <DIR> IO 23/07/2012 10:56 442 IO.pm 23/07/2012 11:00 <DIR> List 23/07/2012 11:00 <DIR> Math 23/07/2012 10:56 883 mro.pm 23/07/2012 11:00 <DIR> overload 23/07/2012 10:56 4,564 overload.pm 23/07/2012 10:56 992 overloading.pm 23/07/2012 10:56 4,238 re.pm 23/07/2012 11:00 <DIR> Scalar 23/07/2012 10:56 379 SelectSaver.pm 23/07/2012 10:56 3,768 Socket.pm 23/07/2012 10:56 909 strict.pm 23/07/2012 10:56 2,130 Symbol.pm 23/07/2012 11:00 <DIR> Term 23/07/2012 11:00 <DIR> Text 23/07/2012 10:56 2,832 threads.pm 23/07/2012 11:00 <DIR> Tie 23/07/2012 11:00 <DIR> tmpinc 23/07/2012 11:01 <DIR> unicore 23/07/2012 10:56 899 UNIVERSAL.pm 23/07/2012 10:56 407 utf8.pm 23/07/2012 10:56 20,149 utf8_heavy.pl 23/07/2012 10:56 1,176 vars.pm 23/07/2012 11:01 <DIR> warnings 23/07/2012 10:56 14,041 warnings.pm 23/07/2012 10:56 23,666 Win32.pm 23/07/2012 11:00 <DIR> Win32API 23/07/2012 10:56 3,109 XSLoader.pm 35 File(s) 341,646 bytes Directory of C:\tmptmp\lib\auto 23/07/2012 11:00 <DIR> . 23/07/2012 11:00 <DIR> .. 23/07/2012 11:00 <DIR> B 23/07/2012 11:00 <DIR> Cwd 23/07/2012 11:00 <DIR> DynaLoader 23/07/2012 11:00 <DIR> Fcntl 23/07/2012 11:00 <DIR> File 23/07/2012 11:00 <DIR> IO 23/07/2012 11:00 <DIR> List 23/07/2012 11:00 <DIR> Math 23/07/2012 11:00 <DIR> mro 23/07/2012 11:00 <DIR> re 23/07/2012 11:00 <DIR> Socket 23/07/2012 11:00 <DIR> threads 23/07/2012 11:00 <DIR> Win32 23/07/2012 11:00 <DIR> Win32API 0 File(s) 0 bytes Directory of C:\tmptmp\lib\auto\B 23/07/2012 11:00 <DIR> . 23/07/2012 11:00 <DIR> .. 15/05/2011 18:04 119,808 B.dll 1 File(s) 119,808 bytes Directory of C:\tmptmp\lib\auto\Cwd 23/07/2012 11:00 <DIR> . 23/07/2012 11:00 <DIR> .. 15/05/2011 18:19 0 Cwd.bs 15/05/2011 18:19 16,896 Cwd.dll 2 File(s) 16,896 bytes And so on....

Copy the exe to a computer which does not have perl installed, and it works as expected (in Re: PP: Executables still need require files.....).

I see no point in posting further until you provide a repeatable example of your code, how you're packaging it and what the actual output is. I doubt that you're taking the advice given on the -x option.

Update: broke the post size limit, removed some output.


Comment on Re^5: no modules unziped from par archive
Select or Download Code
Re^6: no modules unziped from par archive
by une04 (Initiate) on Jul 23, 2012 at 11:27 UTC
    Marto, thanks for your help, but here you go:
    # cat test.pl #!/usr/bin/perl -w print "1.TEST PRINT\n"; $num_args = $#ARGV + 1; if ($num_args == 1) { if ('123' eq $ARGV[0]) { print "2. EQUEL\n"; } } else { print "2.NOT EQUEL\n"; }
    ]# pp -o test -c -x test.pl -v /usr/local/bin/pp: Packing test.pl /tmp/tuHXoUo56p syntax OK /usr/local/bin/pp: Generating a fresh 'parl'. /usr/local/bin/pp: Running /tmp/parlwsGIGpI -B -Otest /tmp/ppXCvh8.par Packing "Config.pm"... Written as "Config.pm" Packing "Config_git.pl"... Written as "Config_git.pl" Packing "Config_heavy.pl"... Written as "Config_heavy.pl" Packing "Cwd.pm"... Written as "Cwd.pm" Packing "DynaLoader.pm"... Written as "DynaLoader.pm" Packing "Errno.pm"... Written as "Errno.pm" Packing "Fcntl.pm"... Written as "Fcntl.pm" Packing "File/Glob.pm"... Written as "File/Glob.pm" Packing "IO.pm"... Written as "IO.pm" Packing "IO/File.pm"... Written as "IO/File.pm" Packing "IO/Handle.pm"... Written as "IO/Handle.pm" Packing "IO/Seekable.pm"... Written as "IO/Seekable.pm" Packing "List/Util.pm"... Written as "List/Util.pm" Packing "PerlIO/scalar.pm"... Written as "PerlIO/scalar.pm" Packing "Scalar/Util.pm"... Written as "Scalar/Util.pm" Packing "XSLoader.pm"... Written as "XSLoader.pm" Packing "auto/DynaLoader/dl_findfile.al"... Written as "auto/DynaLoader/dl_findfile.al" Packing "lib.pm"... Written as "lib.pm" Packing "re.pm"... Written as "re.pm" Packing "Compress/Raw/Zlib.pm"... Written as "Compress/Raw/Zlib.pm" Packing "auto/Compress/Raw/Zlib/autosplit.ix"... Written as "auto/Compress/Raw/Zlib/autosplit.ix" Packing "Archive/Zip.pm"... Written as "Archive/Zip.pm" Packing "Archive/Zip/Archive.pm"... Written as "Archive/Zip/Archive.pm" Packing "Archive/Zip/DirectoryMember.pm"... Written as "Archive/Zip/DirectoryMember.pm" Packing "Archive/Zip/FileMember.pm"... Written as "Archive/Zip/FileMember.pm" Packing "Archive/Zip/Member.pm"... Written as "Archive/Zip/Member.pm" Packing "Archive/Zip/NewFileMember.pm"... Written as "Archive/Zip/NewFileMember.pm" Packing "Archive/Zip/StringMember.pm"... Written as "Archive/Zip/StringMember.pm" Packing "Archive/Zip/ZipFileMember.pm"... Written as "Archive/Zip/ZipFileMember.pm" Packing "Compress/Zlib.pm"... Written as "Compress/Zlib.pm" Packing "File/GlobMapper.pm"... Written as "File/GlobMapper.pm" Packing "IO/Compress/Adapter/Deflate.pm"... Written as "IO/Compress/Adapter/Deflate.pm" Packing "IO/Compress/Base.pm"... Written as "IO/Compress/Base.pm" Packing "IO/Compress/Base/Common.pm"... Written as "IO/Compress/Base/Common.pm" Packing "IO/Compress/Gzip.pm"... Written as "IO/Compress/Gzip.pm" Packing "IO/Compress/Gzip/Constants.pm"... Written as "IO/Compress/Gzip/Constants.pm" Packing "IO/Compress/RawDeflate.pm"... Written as "IO/Compress/RawDeflate.pm" Packing "IO/Compress/Zlib/Extra.pm"... Written as "IO/Compress/Zlib/Extra.pm" Packing "IO/Uncompress/Adapter/Inflate.pm"... Written as "IO/Uncompress/Adapter/Inflate.pm" Packing "IO/Uncompress/Base.pm"... Written as "IO/Uncompress/Base.pm" Packing "IO/Uncompress/Gunzip.pm"... Written as "IO/Uncompress/Gunzip.pm" Packing "IO/Uncompress/RawInflate.pm"... Written as "IO/Uncompress/RawInflate.pm" Packing "PAR.pm"... Written as "PAR.pm" Packing "PAR/Filter.pm"... Written as "PAR/Filter.pm" Packing "PAR/Filter/PatchContent.pm"... Written as "PAR/Filter/PatchContent.pm" Packing "PAR/Filter/PodStrip.pm"... Written as "PAR/Filter/PodStrip.pm" Packing "PAR/Heavy.pm"... Written as "PAR/Heavy.pm" Packing "PAR/SetupProgname.pm"... Written as "PAR/SetupProgname.pm" Packing "PAR/SetupTemp.pm"... Written as "PAR/SetupTemp.pm" Packing "AutoLoader.pm"... Written as "AutoLoader.pm" Packing "Carp.pm"... Written as "Carp.pm" Packing "Carp/Heavy.pm"... Written as "Carp/Heavy.pm" Packing "Exporter.pm"... Written as "Exporter.pm" Packing "Exporter/Heavy.pm"... Written as "Exporter/Heavy.pm" Packing "File/Basename.pm"... Written as "File/Basename.pm" Packing "File/Copy.pm"... Written as "File/Copy.pm" Packing "File/Find.pm"... Written as "File/Find.pm" Packing "File/Path.pm"... Written as "File/Path.pm" Packing "File/Spec.pm"... Written as "File/Spec.pm" Packing "File/Spec/Unix.pm"... Written as "File/Spec/Unix.pm" Packing "File/Temp.pm"... Written as "File/Temp.pm" Packing "FileHandle.pm"... Written as "FileHandle.pm" Packing "PAR/Dist.pm"... Written as "PAR/Dist.pm" Packing "PerlIO.pm"... Written as "PerlIO.pm" Packing "SelectSaver.pm"... Written as "SelectSaver.pm" Packing "Symbol.pm"... Written as "Symbol.pm" Packing "Tie/Hash/NamedCapture.pm"... Written as "Tie/Hash/NamedCapture.pm" Packing "Time/Local.pm"... Written as "Time/Local.pm" Packing "UNIVERSAL.pm"... Written as "UNIVERSAL.pm" Packing "attributes.pm"... Written as "attributes.pm" Packing "base.pm"... Written as "base.pm" Packing "bytes.pm"... Written as "bytes.pm" Packing "constant.pm"... Written as "constant.pm" Packing "integer.pm"... Written as "integer.pm" Packing "overload.pm"... Written as "overload.pm" Packing "strict.pm"... Written as "strict.pm" Packing "utf8.pm"... Written as "utf8.pm" Packing "vars.pm"... Written as "vars.pm" Packing "warnings.pm"... Written as "warnings.pm" Packing "warnings/register.pm"... Written as "warnings/register.pm" Packing "/tmp/par-726f6f74/cache-0658de967295ddc35810e9cb5745d3c02d44f +4ee/0ae15695.so"... Written as "auto/List/Util/Util.so" Packing "/tmp/par-726f6f74/cache-0658de967295ddc35810e9cb5745d3c02d44f +4ee/51ee12a1.so"... Written as "auto/IO/IO.so" Packing "/tmp/par-726f6f74/cache-0658de967295ddc35810e9cb5745d3c02d44f +4ee/5387c047.so"... Written as "auto/Compress/Raw/Zlib/Zlib.so" Packing "/tmp/par-726f6f74/cache-0658de967295ddc35810e9cb5745d3c02d44f +4ee/70f078ff.so"... Written as "auto/PerlIO/scalar/scalar.so" Packing "/tmp/par-726f6f74/cache-0658de967295ddc35810e9cb5745d3c02d44f +4ee/bd1be12d.so"... Written as "auto/File/Glob/Glob.so" Packing "/tmp/par-726f6f74/cache-0658de967295ddc35810e9cb5745d3c02d44f +4ee/c2b1a7cf.so"... Written as "auto/Fcntl/Fcntl.so" Packing "/tmp/par-726f6f74/cache-0658de967295ddc35810e9cb5745d3c02d44f +4ee/c366adf6.so"... Written as "auto/Cwd/Cwd.so"
    # unzip test Archive: test creating: script/ inflating: MANIFEST inflating: META.yml inflating: script/main.pl inflating: script/test.pl
    so, there is no *.so or *.pm files listed when were packaging...

      Thanks for the info, this looks weird. I don't have access to a linux/unix system at the moment. Could you confirm which Perl versions you have installed on what OS, and ensure you have the most up to date versions of PAR and PAR::Packer installed?

        # pp -V PAR Packager, version 1.013 (PAR version 1.005)

      Managed to access a Solaris system, Perl 5.8.8, PAR 1.005, PAR::Packer 1.012 (N.B. PAR::Packer isn't up to date, and 5.8.8 is ancient). I've packed your example script, it's correctly including the /lib directory with the required .so and .pm files.

        Yep, that's strange.. I have perl v5.10.1. Dont know what else info I need to provide. It seems like I need to reinstall perl from scratch.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983143]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-07-25 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (167 votes), past polls