Skip Menu |

This queue is for tickets about the PAR-Packer CPAN distribution.

Report information
The Basics
Id: 59710
Status: resolved
Priority: 0/
Queue: PAR-Packer

People
Owner: RSCHUPP [...] cpan.org
Requestors: kaloyan [...] digsys.bg
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Par-Packer not including all dependencies
Date: Mon, 26 Jul 2010 17:02:31 +0300
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hello. I follow ticket 56020 but found out that I still have common problem. [~/TestScript/tmp]$ pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = charinfo(0x42); print $i->{name};" [~/TestScript/tmp]$ ./ucd.exe Unicode::UCD: failed to find UnicodeData.txt in CODE(0x802e083d8) CODE(0x8028e4420) CODE(0x8028e48a0) at script/ppSf5Yf.pl line 1 Compilation failed in require at script/ppSf5Yf.pl line 1. BEGIN failed--compilation aborted at script/ppSf5Yf.pl line 1. And the other example: [~/TestScript/tmp]$ cat test.pl #!/usr/bin/perl use strict; use warnings; use Carp; use PDF::API2; print "Hello"; [~/TestScript/tmp]$ pp test.pl [~/TestScript/tmp]$ ./a.out Unicode::UCD: failed to find UnicodeData.txt in CODE(0x802f2f2d0) CODE(0x8028dcc90) CODE(0x8028ae938) at PDF/API2/Resource/Font/BdFont.pm line 45 Compilation failed in require at PDF/API2/Resource/Font/BdFont.pm line 45. BEGIN failed--compilation aborted at PDF/API2/Resource/Font/BdFont.pm line 45. Compilation failed in require at PDF/API2.pm line 67. BEGIN failed--compilation aborted at PDF/API2.pm line 67. Compilation failed in require at script/test.pl line 6. BEGIN failed--compilation aborted at script/test.pl line 6. [$]perl -v This is perl, v5.10.1 (*) built for amd64-freebsd-thread-multi [$] uname -a FreeBSD xxxxxx.xxxxxxx.xx 7.2-STABLE FreeBSD 7.2-STABLE #0: Fri Sep 18 15:03:01 EEST 2009 root@xxxxxx.xxxxxxx.xx:/usr/obj/usr/src/sys/GENERIC amd64 [$]pp -version PAR Packager, version 1.005 (PAR version 1.000) Any help will be appreciated. Thanks in advance. Kaloyan PS. Info for ScanDeps.pm. perl -MModule::ScanDeps -e 'print $Module::ScanDeps::VERSION'; 0.97 I give example from ScanDeps.pm: " 'Tk/FBox.pm' => [qw( Tk/folder.xpm Tk/file.xpm )], 'Tk/Getopt.pm' => [qw( Tk/openfolder.xpm Tk/win.xbm )], 'Tk/Toplevel.pm' => [qw( Tk/Wm.pm )], 'Unicode/UCD.pm' => sub { # add data files (cf. sub openunicode in Unicode::UCD) grep /\.txt$/, map "unicore/$_->{name}", _glob_in_inc('unicore', 0); }, 'URI.pm' => sub { grep !/.\b[_A-Z]/, _glob_in_inc('URI', 1); }, "
Subject: Re: [rt.cpan.org #59710] AutoReply: Par-Packer not including all dependencies
Date: Mon, 26 Jul 2010 17:34:38 +0300
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hello Again, I find another problem with ScanDeps and SAX this time. could not find ParserDetails.ini in /var/tmp/par-kaloyan/cache-fa2ad227a82ea365009f0bbe980af4658604711a/SAX But the module is there just in different place: find /var/tmp/par-kaloyan/ -name "ParserDetails.ini" /var/tmp/par-kaloyan/cache-fac3907a332b3ee0cc88970a87f7baeaf3c56cfd/inc/lib/XML/SAX/ParserDetails.ini /var/tmp/par-kaloyan/cache-fa2ad227a82ea365009f0bbe980af4658604711a/inc/lib/XML/SAX/ParserDetails.ini /var/tmp/par-kaloyan/cache-fa2ad227a82ea365009f0bbe980af4658604711a/inc/usr/local/lib/perl5/site_perl/5.10.1/XML/SAX/ParserDetails.ini As I am new to PAR could someone point what am i doing wrong. Thanks in advance. Kaloyan
On 2010-07-26 10:34:44, kaloyan@digsys.bg wrote: Show quoted text
> I find another problem with ScanDeps and SAX this time. > /var/tmp/par-kaloyan/cache- >
fa2ad227a82ea365009f0bbe980af4658604711a/inc/usr/local/lib/perl5/site_perl/5.10.1/XML/SAX/ParserDetails.ini That looks awfully wrong. I just checked a trivial example pp -o sax.exe \ -e 'use XML::SAX; use Data::Dumper; print Dumper(XML::SAX->parsers()); ./sax.exe Works here (Linux) for Perl 5.10.1 and 5.12.1. Same goes for your Unicode::UCD example. I'm suspecting there's something wrong with your setup: - Does your machine have several versions of Perl installed? - Did you get Perl from some distribution or build it yourself? For the above example, can you please run unzip -l sax.exe | grep ini and for your previous Unicode::UCD example unzip -l ucd.exe | grep txt Cheers, Roderich
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Tue, 27 Jul 2010 16:04:52 +0300
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hello, Thanks for the reply. Here is what I can give you. If you need any new information just write. [user]$ uname -a FreeBSD xxxxxxxxx.digsys.bg 8.0-STABLE FreeBSD 8.0-STABLE #0: Thu Apr 29 15:45:23 EEST 2010 root@xxxxxxxxxx.digsys.bg:/usr/obj/usr/src/sys/GENERAL amd64 [user]$perl -v This is perl, v5.10.1 (*) built for amd64-freebsd ----------------SAX------------------------- [user]$ pp -o sax.exe -e 'use XML::SAX; use Data::Dumper; print Dumper(XML::SAX->parsers());' [user]$./sax.exe could not find ParserDetails.ini in /var/tmp/par-yavor/cache-c4bc1d6a725f4348ee464a61f018df1e6bf7789b/SAX $VAR1 = []; [user]$ unzip -l sax.exe | grep ini 246 05-11-2010 22:09 lib/XML/SAX/ParserDetails.ini Show quoted text
----------------UNICODE------------------------- [user]$ pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = charinfo(0x42); print $i->{name};" [user]$ ./ucd.exe Unicode::UCD: failed to find UnicodeData.txt in CODE(0xbb3168) CODE(0xa1e2c0) CODE(0xa1e4e8) at script/ppvZbFc.pl line 1 Compilation failed in require at script/ppvZbFc.pl line 1. BEGIN failed--compilation aborted at script/ppvZbFc.pl line 1. [user]$ unzip -l ucd.exe | grep txt 12275 05-11-2010 20:23 lib/unicore/ArabicShaping.txt 24004 05-11-2010 20:23 lib/unicore/BidiMirroring.txt 5857 05-11-2010 20:23 lib/unicore/Blocks.txt 64241 05-11-2010 20:23 lib/unicore/CaseFolding.txt 8086 05-11-2010 20:23 lib/unicore/CompositionExclusions.txt 708738 05-11-2010 20:23 lib/unicore/EastAsianWidth.txt 51026 05-11-2010 20:23 lib/unicore/HangulSyllableType.txt 148121 05-11-2010 20:23 lib/unicore/Index.txt 3208 05-11-2010 20:23 lib/unicore/Jamo.txt 763795 05-11-2010 20:23 lib/unicore/LineBreak.txt 1084 05-11-2010 20:23 lib/unicore/NameAliases.txt 5820 05-11-2010 20:23 lib/unicore/NamedSequences.txt 10879 05-11-2010 20:23 lib/unicore/NamedSqProv.txt 938846 05-11-2010 20:23 lib/unicore/NamesList.txt 2033 05-11-2010 20:23 lib/unicore/NormalizationCorrections.txt 84950 05-11-2010 20:23 lib/unicore/PropList.txt 32063 05-11-2010 20:23 lib/unicore/PropValueAliases.txt 5199 05-11-2010 20:23 lib/unicore/PropertyAliases.txt 435 05-11-2010 20:23 lib/unicore/ReadMe.txt 108760 05-11-2010 20:23 lib/unicore/Scripts.txt 16309 05-11-2010 20:23 lib/unicore/SpecialCasing.txt 7445 05-11-2010 20:23 lib/unicore/StandardizedVariants.txt 1117369 05-11-2010 20:23 lib/unicore/UnicodeData.txt I Test this on perl 5.10 on FreeBSD 8.0 and 7.2. Thanks for the help again. Cheers, Kaloyan
On 2010-07-27 09:04:57, kaloyan@digsys.bg wrote: Show quoted text
> [user]$ unzip -l sax.exe | grep ini > 246 05-11-2010 22:09 lib/XML/SAX/ParserDetails.ini >... > [user]$ unzip -l ucd.exe | grep txt > 1117369 05-11-2010 20:23 lib/unicore/UnicodeData.txt
This is what's to be expected. So the problem is not that we missed stuff when packing, but rather that extracting it fails. Can you try the following: - remove all cached, extracted stuff $ rm -rf /var/tmp/par-kaloyan - run ucd.exe once - post the output of $ find /var/tmp/par-kaloyan Cheers, Roderich
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Wed, 28 Jul 2010 11:41:57 +0300
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hi,
Here are the find results (as attachment).

If you need anything else just write.

Cheers Kaloyan

Roderich Schupp via RT wrote: Show quoted text
<URL: https://rt.cpan.org/Ticket/Display.html?id=59710 >

On 2010-07-27 09:04:57, kaloyan@digsys.bg wrote:
  
[user]$ unzip -l sax.exe | grep ini
      246  05-11-2010 22:09   lib/XML/SAX/ParserDetails.ini
...
[user]$ unzip -l ucd.exe | grep txt
  1117369  05-11-2010 20:23   lib/unicore/UnicodeData.txt
    
This is what's to be expected. So the problem is not that we
missed stuff when packing, but rather that extracting it fails.

Can you try the following: 
- remove all cached, extracted stuff
  $ rm -rf /var/tmp/par-kaloyan
- run ucd.exe once 
- post the output of
  $ find /var/tmp/par-kaloyan

Cheers, Roderich

  

Message body is not shown because it is too large.

On 2010-07-28 04:42:08, kaloyan@digsys.bg wrote: Show quoted text
> /var/tmp/par-kaloyan/ > /var/tmp/par-kaloyan/cache-6626d78c912cc4667f7e02d7cbf95393e2a1f806
This also looks good, very puzzling. What is the output of $ pp -o princ -e 'print "INC = @INC\n";' $ ./princ Also, please provide the output of "perl -V". Did you build PAR::Packer yourself? If yes, did you run "make test" without any failures? Cheers, Roderich
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Thu, 29 Jul 2010 12:32:49 +0300
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Roderich Schupp via RT wrote: Show quoted text
> This also looks good, very puzzling. What is the output of > > $ pp -o princ -e 'print "INC = @INC\n";' > $ ./princ > > Also, please provide the output of "perl -V". > Did you build PAR::Packer yourself? > If yes, did you run "make test" without any failures? > > Cheers, Roderich >
Hello, Here is the info you requested: $ pp -o princ -e 'print "INC = @INC\n";' $ ./princ INC = CODE(0x8028e4420) CODE(0x8028e48a0) $perl -V Summary of my perl5 (revision 5 version 10 subversion 1) configuration: Platform: osname=freebsd, osvers=7.2-stable, archname=amd64-freebsd-thread-multi uname='freebsd xxxx.xxxxxx.xx 7.2-stable freebsd 7.2-stable #0: fri sep 18 15:03:01 eest 2009 root@xxxx.xxxxxx.bg:usrobjusrsrcsysgeneric amd64 ' config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.10.1/mach -Dprivlib=/usr/local/lib/perl5/5.10.1 -Dman3dir=/usr/local/lib/perl5/5.10.1/perl/man/man3 -Dman1dir=/usr/local/man/man1 -Dsitearch=/usr/local/lib/perl5/site_perl/5.10.1/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.10.1 -Dscriptdir=/usr/local/bin -Dsiteman3dir=/usr/local/lib/perl5/5.10.1/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dcc=cc -Duseshrplib -Dinc_version_list=none -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -Doptimize=-g -DDEBUGGING -Ud_dosuid -Ui_gdbm -Dusethreads=y -Dusemymalloc=n -Duse64bitint' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include', optimize='-g', cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.2.1 20070719 [FreeBSD]', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='cc', ldflags ='-pthread -Wl,-E -fstack-protector -L/usr/local/lib' libpth=/usr/lib /usr/local/lib libs=-lgdbm -lm -lcrypt -lutil perllibs=-lm -lcrypt -lutil libc=, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-R/usr/local/lib/perl5/5.10.1/mach/CORE' cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL USE_64_BIT_ALL USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under freebsd Compiled at Jun 22 2010 18:51:56 %ENV: PERL5LIB="/home/kaloyan/libs:/home/kaloyan/libs/CUSTOMER" @INC: /home/kaloyan/libs /home/kaloyan/libs/CUSTOMER /usr/local/lib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach /usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach /usr/local/lib/perl5/5.10.1 About PAR::Packer I build it from FreeBSD ports and there is no 'make test' as far as I can see. Best regards, Kaloyan
On 2010-07-29 05:32:51, kaloyan@digsys.bg wrote: Show quoted text
> $ pp -o princ -e 'print "INC = @INC\n";' > $ ./princ > INC = CODE(0x8028e4420) CODE(0x8028e48a0)
Bad, there should be /tmp/par-USER/SHA1-CHECKSUM/inc in there (or /var/tmp/... instead of /tmp/...) Show quoted text
> -Dscriptdir=/usr/local/bin
Is there another version of Perl installed in /usr/bin? Show quoted text
> About PAR::Packer I build it from FreeBSD ports and there is no 'make > test' as far as I can see.
Can you try to build PAR::Packer yourself from CPAN sources? Note that PAR::Packer is way more sensitive to differences between the environment where it was built and where it is run than a "normal" Perl module. So the best option is always to build it yourself. Moreover, if you have multiple versions of Perl installed it's easy to mix them up when building PAR::Packer resulting in a non-functional installation. I just tried that here (on Linux, but the argument is universal): I have Perl 5.12.1 installed from my distribution (installed in /usr/bin etc). Then I built Perl 5.10.1 locally to install somewhere like /usr/local/perl-5.10.1 - pretty standard. I set my $PATH so that this local perl is found ahead of the "system" one and tried to build PAR::Packer with the standard method: - download tarball from CPAN - unpack it and cd into its top level directory - perl Makefile.PL - make - make test I ended up with a hybrid that had parts from both the local and the system perl - not good. So if you try for yourself, please run it under script or such and post the whole record starting with "perl Makefile.PL" until "make test" has fiinished. Cheers, Roderich
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Thu, 29 Jul 2010 16:12:21 +0300
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hello, About Perl - I don't have two different versions of Perl. []$ ls -l /usr/local/bin/perl -rwxr-xr-x 2 root wheel 40539 22 Юни 18:55 /usr/local/bin/perl []$ ls -l /usr/bin/perl lrwxr-xr-x 1 root wheel 25 22 Юни 18:56 /usr/bin/perl -> /usr/local/bin/perl5.10.1 []$ ls -l /usr/local/bin/perl5* lrwxr-xr-x 1 root wheel 25 22 Юни 18:56 /usr/local/bin/perl5 -> /usr/local/bin/perl5.10.1 -rwxr-xr-x 2 root wheel 40539 22 Юни 18:55 /usr/local/bin/perl5.10.1 []$ /usr/local/bin/perl -v This is perl, v5.10.1 (*) built for amd64-freebsd-thread-multi []$ /usr/local/bin/perl5.10.1 -v This is perl, v5.10.1 (*) built for amd64-freebsd-thread-multi []$ diff /usr/local/bin/perl5.10.1 /usr/local/bin/perl -----------------------------perl Makefile.PL---------------------------------------- [~/Downloads/CPAN/PAR-Packer-1.006]$ perl Makefile.PL *** You have extra Perl library paths set in your environment. Please note that these paths (set with PERL5LIB or PERLLIB) are not honored by perl when running under taint mode, which may lead to problems. This is a limitation (by design) of Perl, not of PAR::Packer; but some of the problems may manifest here during installation. Checking if your kit is complete... Looks good Warning: prerequisite ExtUtils::MakeMaker 6.42 not found. We have unknown version. Writing Makefile for the par program Writing Makefile for PAR::Packer -----------------------------MAKE---------------------------------------- [/home/kaloyan/Downloads/CPAN/PAR-Packer-1.006]# make cp lib/PAR/Packer.pm blib/lib/PAR/Packer.pm cp lib/PAR/StrippedPARL/Base.pm blib/lib/PAR/StrippedPARL/Base.pm cp lib/PAR/Filter/PodStrip.pm blib/lib/PAR/Filter/PodStrip.pm cp lib/PAR/Filter/Obfuscate.pm blib/lib/PAR/Filter/Obfuscate.pm cp lib/App/Packer/PAR.pm blib/lib/App/Packer/PAR.pm cp lib/PAR/Filter.pm blib/lib/PAR/Filter.pm cp lib/PAR/StrippedPARL/Dynamic.pm blib/lib/PAR/StrippedPARL/Dynamic.pm cp lib/PAR/Filter/PatchContent.pm blib/lib/PAR/Filter/PatchContent.pm cp lib/PAR/Filter/Bytecode.pm blib/lib/PAR/Filter/Bytecode.pm cp lib/pp.pm blib/lib/pp.pm cp lib/PAR/Filter/Bleach.pm blib/lib/PAR/Filter/Bleach.pm cp lib/PAR/StrippedPARL/Static.pm blib/lib/PAR/StrippedPARL/Static.pm perl sha1.c.PL sha1.c cc -c -DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/lib/perl5/5.10.1/mach/CORE -DPARL_EXE=\"parl\" -g main.c perl ./file2c.pl ../script/par.pl my_par_pl.c load_my_par_pl 1 cc -c -DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/lib/perl5/5.10.1/mach/CORE -DPARL_EXE=\"parl\" -g my_par_pl.c cc main.o my_par_pl.o -s -Wl,-R/usr/local/lib/perl5/5.10.1/mach/CORE -pthread -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/local/lib/perl5/5.10.1/mach/CORE -lperl -lm -lcrypt -lutil -o ./par perl -e1 perl ./file2c.pl ./par my_par.c load_my_par 1 30000 perl ./file2c.pl /usr/local/lib/perl5/5.10.1/mach/CORE/libperl.so my_libperl.c load_my_libperl 1 30000 cc -c -DAPPLLIB_EXP="/usr/local/lib/perl5/5.10.1/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -I/usr/local/lib/perl5/5.10.1/mach/CORE -DPARL_EXE=\"parl\" -g static.c cc static.o -s -Wl,-R/usr/local/lib/perl5/5.10.1/mach/CORE -pthread -Wl,-E -fstack-protector -L/usr/local/lib -L/usr/local/lib/perl5/5.10.1/mach/CORE -lm -lcrypt -lutil -o ./static perl -e1 perl parlsig.pl ./static ./par 1 30000 perl run_with_inc.pl ./static -I../blib/lib -q -B -O../script/parl perl -e "chmod(oct('0600'), '../blib/lib/PAR/StrippedPARL/Static.pm');" perl encode_append.pl ./static ../blib/lib/PAR/StrippedPARL/Static.pm perl -e "chmod(oct('0444'), '../blib/lib/PAR/StrippedPARL/Static.pm');" perl run_with_inc.pl ./par -I../blib/lib -q -B -O../script/parldyn perl -e "chmod(oct('0600'), '../blib/lib/PAR/StrippedPARL/Dynamic.pm');" perl encode_append.pl ./par ../blib/lib/PAR/StrippedPARL/Dynamic.pm perl -e "chmod(oct('0444'), '../blib/lib/PAR/StrippedPARL/Dynamic.pm');" cp script/parl blib/script/parl /usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/parl cp script/parldyn blib/script/parldyn /usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/parldyn cp script/tkpp blib/script/tkpp /usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/tkpp cp script/pp blib/script/pp /usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/pp cp script/par.pl blib/script/par.pl /usr/bin/perl "-Iinc" -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/par.pl Manifying blib/man1/tkpp.1 Manifying blib/man1/parl.1 Manifying blib/man1/pp.1 Manifying blib/man1/par.pl.1 Manifying blib/man3/App::Packer::PAR.3 Manifying blib/man3/PAR::Filter::Obfuscate.3 Manifying blib/man3/PAR::Filter::PodStrip.3 Manifying blib/man3/PAR::StrippedPARL::Base.3 Manifying blib/man3/PAR::Packer.3 Manifying blib/man3/PAR::Filter.3 Manifying blib/man3/PAR::Filter::PatchContent.3 Manifying blib/man3/PAR::StrippedPARL::Dynamic.3 Manifying blib/man3/PAR::Filter::Bytecode.3 Manifying blib/man3/pp.3 Manifying blib/man3/PAR::Filter::Bleach.3 Manifying blib/man3/PAR::StrippedPARL::Static.3 Show quoted text
-----------------------------MAKE TEST---------------------------------------- [/home/kaloyan/Downloads/CPAN/PAR-Packer-1.006]# make test perl -e "chmod(oct('0600'), '../blib/lib/PAR/StrippedPARL/Static.pm');" perl encode_append.pl ./static ../blib/lib/PAR/StrippedPARL/Static.pm perl -e "chmod(oct('0444'), '../blib/lib/PAR/StrippedPARL/Static.pm');" perl -e "chmod(oct('0600'), '../blib/lib/PAR/StrippedPARL/Dynamic.pm');" perl encode_append.pl ./par ../blib/lib/PAR/StrippedPARL/Dynamic.pm perl -e "chmod(oct('0444'), '../blib/lib/PAR/StrippedPARL/Dynamic.pm');" PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00-pod.t t/10-parl-generation.t t/20-pp.t t/30-current_exec.t t/40-packer_cd_option.t t/00-pod.t ............... skipped: Set environment variable PERL_TEST_POD=1 to test POD t/10-parl-generation.t ... ok t/20-pp.t ................ ok t/30-current_exec.t ...... # Please wait t/30-current_exec.t ...... ok t/40-packer_cd_option.t .. ok All tests successful. Files=5, Tests=71, 582 wallclock secs ( 0.12 usr 0.02 sys + 503.41 cusr 37.09 csys = 540.64 CPU) Result: PASS perl -e1 Best regards, Kaloyan
On 2010-07-29 09:12:23, kaloyan@digsys.bg wrote: Show quoted text
> About Perl - I don't have two different versions of Perl.
OK Show quoted text
> -----------------------------perl > Makefile.PL---------------------------------------- >... > -----------------------------MAKE > TEST---------------------------------------- >... > All tests successful.
Looks verrry promising. Now do $ make install and retry (i.e. re-pack with the newly installed pp and run) our one-liners, princ, ucd, and sax - I'll keep my fingers crossed :) Cheers, Roderich
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Thu, 29 Jul 2010 19:00:12 +0300
To: bug-Module-ScanDeps [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hi, Sorry, but it didn't help. I even try from pp from the build to be sure :-( [root@ /home/kaloyan/Downloads/CPAN/PAR-Packer-1.006]# make install perl -e "chmod(oct('0600'), '../blib/lib/PAR/StrippedPARL/Static.pm');" perl encode_append.pl ./static ../blib/lib/PAR/StrippedPARL/Static.pm perl -e "chmod(oct('0444'), '../blib/lib/PAR/StrippedPARL/Static.pm');" perl -e "chmod(oct('0600'), '../blib/lib/PAR/StrippedPARL/Dynamic.pm');" perl encode_append.pl ./par ../blib/lib/PAR/StrippedPARL/Dynamic.pm perl -e "chmod(oct('0444'), '../blib/lib/PAR/StrippedPARL/Dynamic.pm');" Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/Packer.pm Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/StrippedPARL/Dynamic.pm Installing /usr/local/lib/perl5/site_perl/5.10.1/PAR/StrippedPARL/Static.pm Installing /usr/local/man/man1/tkpp.1 Installing /usr/local/man/man1/parl.1 Installing /usr/local/man/man1/pp.1 Installing /usr/local/man/man1/par.pl.1 Installing /usr/local/lib/perl5/5.10.1/man/man3/App::Packer::PAR.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::Filter::Obfuscate.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::Filter::PodStrip.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::StrippedPARL::Base.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::Packer.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::Filter.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::Filter::PatchContent.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::StrippedPARL::Dynamic.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::Filter::Bytecode.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/pp.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::Filter::Bleach.3 Installing /usr/local/lib/perl5/5.10.1/man/man3/PAR::StrippedPARL::Static.3 Installing /usr/local/bin/parl Installing /usr/local/bin/parldyn FreeBSD: Registering installation in the package database Appending installation info to /usr/local/lib/perl5/5.10.1/mach/perllocal.pod [root@ /home/kaloyan/Downloads/CPAN]# pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = charinfo(0x42); print $i->{name};" [root@ /home/kaloyan/Downloads/CPAN]# ./ucd.exe Unicode::UCD: failed to find UnicodeData.txt in CODE(0x802e083d8) CODE(0x8028e4420) CODE(0x8028e48a0) at script/pplDoJW.pl line 1 Compilation failed in require at script/pplDoJW.pl line 1. BEGIN failed--compilation aborted at script/pplDoJW.pl line 1. [root@ /home/kaloyan/Downloads/CPAN]# whereis pp pp: /usr/local/bin/pp /usr/local/man/man1/pp.1 /usr/ports/devel/p5-PAR-Packer/work/PAR-Packer-1.005/blib/script/pp [root@ /home/kaloyan/Downloads/CPAN]# /usr/ports/devel/p5-PAR-Packer/work/PAR-Packer-1.005/blib/script/pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = charinfo(0x42); print $i->{name};" [root@ /home/kaloyan/Downloads/CPAN]# ./ucd.exe Unicode::UCD: failed to find UnicodeData.txt in CODE(0x802e04c48) CODE(0x8028dcc90) CODE(0x8028ae938) at script/ppKvGX8.pl line 1 Compilation failed in require at script/ppKvGX8.pl line 1. BEGIN failed--compilation aborted at script/ppKvGX8.pl line 1. [root@ /home/kaloyan/Downloads/CPAN]# [root@ /home/kaloyan/Downloads/CPAN]# [root@ /home/kaloyan/Downloads/CPAN]# pp -o princ -e 'print "INC = @INC\n";' [root@ /home/kaloyan/Downloads/CPAN]# ./princ INC = CODE(0x8028e4420) CODE(0x8028e48a0) [root@ /home/kaloyan/Downloads/CPAN]# pp -o sax.exe -e 'use XML::SAX; use Data::Dumper; print Dumper(XML::SAX->parsers());' [root@ /home/kaloyan/Downloads/CPAN]# ./sax.exe could not find ParserDetails.ini in /var/tmp/par-root/cache-e8b626078ed90c8c9795af6820bd19dc793565e6/SAX $VAR1 = []; Any Ideas? Best regards, Kaloyan
On 2010-07-29 12:00:15, kaloyan@digsys.bg wrote: Show quoted text
> Hi, > Sorry, but it didn't help. I even try from pp from the build to be
sure :-( (Note: That doesn't prove much, because pp is a minimalistic script that mostly does "use pp" which means that you get the installed version of pp.pm etc anyway) The build log looks good which means I'm running out of ideas that can explain what's going on. One last shot: can you try (the first command consists of a single long line): $ pp -o princ2.exe -e 'print "INC = @INC\n"; print "PAR::SetupTemp::PARTemp = $PAR::SetupTemp::PARTemp\n"; print "ENV{$_} = $ENV{$_}\n" foreach grep /^PAR_/, keys %ENV;' $ ./princ2.exe If that doesn't clear things up I have to find a way to debug a packed executable. Cheers, Roderich
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Thu, 05 Aug 2010 16:38:40 +0300
To: bug-PAR-Packer [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hi, Here is the exaple: [kaloyan@xxxx ~]$ pp -o princ2.exe -e 'print "INC = @INC\n"; print "PAR::SetupTemp::PARTemp = $PAR::SetupTemp::PARTemp\n"; print "ENV{$_} = $ENV{$_}\n" foreach grep /^PAR_/, keys %ENV;' [kaloyan@xxxx ~]$ ./princ2.exe INC = CODE(0x8028dcc90) CODE(0x8028ae938) PAR::SetupTemp::PARTemp = /var/tmp//par-kaloyan/cache-c4b9f31cf314943cd47178a9bf43d0440f00ef27 ENV{PAR_PROGNAME} = /usr/home/kaloyan/./princ2.exe ENV{PAR_ARGV_0} = ./princ2.exe ENV{PAR_TEMP} = /var/tmp//par-kaloyan/cache-c4b9f31cf314943cd47178a9bf43d0440f00ef27 ENV{PAR_INITIALIZED} = 2 ENV{PAR_0} = /var/tmp/par-kaloyan/cache-c4b9f31cf314943cd47178a9bf43d0440f00ef27/5b09654c.pl ENV{PAR_ARGC} = 1 Cheers, Kaloyan
On 2010-08-05 09:38:50, kaloyan@digsys.bg wrote: Show quoted text
> [kaloyan@xxxx ~]$ ./princ2.exe > INC = CODE(0x8028dcc90) CODE(0x8028ae938) > PAR::SetupTemp::PARTemp = > /var/tmp//par-kaloyan/cache-c4b9f31cf314943cd47178a9bf43d0440f00ef27 > ENV{PAR_PROGNAME} = /usr/home/kaloyan/./princ2.exe > ENV{PAR_ARGV_0} = ./princ2.exe > ENV{PAR_TEMP} = > /var/tmp//par-kaloyan/cache-c4b9f31cf314943cd47178a9bf43d0440f00ef27 > ENV{PAR_INITIALIZED} = 2 > ENV{PAR_0} = > /var/tmp/par-kaloyan/cache- > c4b9f31cf314943cd47178a9bf43d0440f00ef27/5b09654c.pl > ENV{PAR_ARGC} = 1
Puzzled... I'll give it one last shot: can you apply the attached patch to your installed version of PAR/Packer.pm, re-pack the sample ucd.exe from above and post its output? Cheers, Roderich
Subject: puzzled.patch
--- PAR-Packer-1.006/lib/PAR/Packer.pm.orig 2010-08-08 18:01:52.123866041 +0200 +++ PAR-Packer-1.006/lib/PAR/Packer.pm 2010-08-08 18:12:35.889538031 +0200 @@ -1691,12 +1691,15 @@ \&PAR::find_par_last => 1, ); my $par_temp_dir = quotemeta( $ENV{PAR_TEMP} ); +print STDERR "cleaning INC except ^$par_temp_dir\n"; +print STDERR "cleaning INC before = @INC\n"; @INC = grep { exists($keep{$_}) or $_ =~ /^$par_temp_dir/; } @INC; +print STDERR "cleaning INC after = @INC\n"; __CLEAN_INC__ };
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Tue, 24 Aug 2010 13:54:58 +0300
To: bug-PAR-Packer [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hi, Sorry for the late response. I apply the patch and repack ucd.exe. Here is the result: $ pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = charinfo(0x42); print $i->{name};" $./ucd.exe cleaning INC except ^\/var\/tmp\/\/par\-root\/cache\-6ff017174559c9b84c2aa41e0b8cf6a3d998a53c cleaning INC before = /var/tmp/par-root/cache-6ff017174559c9b84c2aa41e0b8cf6a3d998a53c/inc/lib /var/tmp/par-root/cache-6ff017174559c9b84c2aa41e0b8cf6a3d998a53c/inc CODE(0x8028e4240) /usr/local/lib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach /usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach /usr/local/lib/perl5/5.10.1 . CODE(0x8028e46c0) cleaning INC after = CODE(0x8028e4240) CODE(0x8028e46c0) Unicode::UCD: failed to find UnicodeData.txt in CODE(0x802e091f8) CODE(0x8028e4240) CODE(0x8028e46c0) at script/ppBCuh8.pl line 1 Compilation failed in require at script/ppBCuh8.pl line 1. BEGIN failed--compilation aborted at script/ppBCuh8.pl line 1. Cheers, Kaloyan P.S. Here is for the SAX $./sax.exe cleaning INC except ^\/var\/tmp\/\/par\-root\/cache\-0861f2b76dd0c4a09bee5c9e6986c514102456ef cleaning INC before = /var/tmp/par-root/cache-0861f2b76dd0c4a09bee5c9e6986c514102456ef/inc/lib /var/tmp/par-root/cache-0861f2b76dd0c4a09bee5c9e6986c514102456ef/inc CODE(0x8028dcc78) /usr/local/lib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach /usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach /usr/local/lib/perl5/5.10.1 . CODE(0x8028ae920) cleaning INC after = CODE(0x8028dcc78) CODE(0x8028ae920) could not find ParserDetails.ini in /var/tmp/par-root/cache-0861f2b76dd0c4a09bee5c9e6986c514102456ef/SAX $VAR1 = [];
On 2010-08-24 06:55:10, kaloyan@digsys.bg wrote: Show quoted text
> Here is the result: > > $ pp -o ucd.exe -e "use Unicode::UCD qw(charinfo); my $i = > charinfo(0x42); print $i->{name};" > $./ucd.exe > cleaning INC except > ^\/var\/tmp\/\/par\-root\/cache\-6ff017174559c9b84c2aa41e0b8cf6a3d998a53c
Thanks for following up. Just as I suspected: note the double (escaped) slash in /var//tmp/par-root/... This will causes too much (anything but the code refs) to be cleaned from @INC, causing your original problem. I wonder where this double slash came from - just out of curiosity, can you look up how P_tmpdir is #define'd in /usr/include/stdio.h on your machine? Anyway, the fix is in sight! Please change line ~1690 in lib/PAR/Packer.pm from my $par_temp_dir = quotemeta( $ENV{PAR_TEMP} ); to my $par_temp_dir = quotemeta( File::Spec->catdir($ENV{PAR_TEMP}) ); (you may leave in the print statements from the previous patch). That should do the trick. If you really want to know what's happening: - the special Perl interpreter in any packed executable still starts with the standard Perl module search @INC path - during bootstrapping, when stuff gets extracted from the executable somewhere beneath the cache directory, @INC gets augmented with some directories beneath the cache directory and also some code refs - we don't want your original script to execute with anything from the standard Perl module path (if you packed with -B) in @INC: it might pick up modules from the machine where it is running (instead of the packed stuff from the build machine), but these could be different, even incompatible, leading to hard to diagnose strange behaviour - so immediately before your original script is executed, we strip anything "illegitimate" from @INC - "legitimate" are code refs and paths pointing beneath the cache directory (given by $ENV{PAR_TEMP}) - the latter check is done literally, so the double slash in $ENV{PAR_TEMP} makes the match fail (as the output shows, the actual paths in @INC don't contain double slashs) And why is there a double slash in $ENV{PAR_TEMP}, but none in the actual paths since they are computed by appending to $ENV{PAR_TEMP}? Probably because these paths are constructed using File::Spec::catdir which canonicalizes its result. But $ENV{PAR_TEMP} is originally constructed from C code from the environment (e.g. $TMPDIR) or system defaults (e.g. P_tmpdir), so any double slash or trailing slash found there is propagated into $ENV{PAR_TEMP}. Cheers, Roderich
Subject: Re: [rt.cpan.org #59710] Par-Packer not including all dependencies
Date: Wed, 25 Aug 2010 12:07:12 +0300
To: bug-PAR-Packer [...] rt.cpan.org
From: Kaloyan Iliev Iliev <kaloyan [...] digsys.bg>
Hi, Here is how P_tmpdir is defined: #define P_tmpdir "/var/tmp/" Now it starts looking OK for me. Thank you very much and have a nice day. Best regards, Kaloyan
I've commited the fix, will be in the next release of PAR::Packer. Thanks again for your patience in debugging this. Cheers, Roderich