Roderich,
Thanks for the quick response. Follow-up responses below:
- Angan
-----Original Message-----
From: Roderich Schupp via RT [mailto:bug-PAR-Packer@rt.cpan.org]
Sent: Wednesday, May 07, 2014 6:37 AM
To: Das, Angan
Subject: [rt.cpan.org #95417] Perl pp error: Seeking some info
<URL:
https://rt.cpan.org/Ticket/Display.html?id=95417 >
On 2014-05-07 08:21:31, angan.das@intel.com<mailto:angan.das@intel.com> wrote:
> /usr/bin/perl -v
> This is perl, v5.8.8 built for x86_64-linux-thread-multi
...
> our environment by the env-team. And so what it implies is its already
> installed property and tested.
> /usr/intel/pkgs/perl/5.14.1/bin/pp
Then the above Perl version is irrelevant (that's the distro's Perl), this PAR::Packer (including the pp Perl script) were most likely built against a local (though pre-packaged) Perl installation (guessing from the filename, Perl 5.14.1). Could you please provide the output of "/usr/intel/pkgs/perl/5.14.1/bin/perl -v" and "/usr/intel/pkgs/perl/5.14.1/bin/perl -V".
> /usr/intel/pkgs/perl/5.14.1/bin/perl -v
This is perl 5, version 14, subversion 1 (v5.14.1) built for x86_64-linux
> /usr/intel/pkgs/perl/5.14.1/bin/perl -V
Summary of my perl5 (revision 5 version 14 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.16.60-0.58.1.1290.1.ptf.600981-smp, archname=x86_64-linux
uname='linux plxc4090 2.6.16.60-0.58.1.1290.1.ptf.600981-smp #1 smp wed dec 2 12:27:56 utc 2009 x86_64 x86_64 x86_64 gnulinux '
config_args='-ds -e -Dprefix=/usr/intel/pkgs/perl/5.14.1 -Dprivlib=/usr/intel/pkgs/perl/5.14.1/lib64/5.14.1 -Dsitelib=/usr/intel/pkgs/perl/5.14.1/lib64/site_perl -Dotherlibdirs=/usr/intel/pkgs/perl/5.14.1/lib64/module/default -Dlibs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -Dfull_csh=/usr/intel/bin/tcsh -Dfull_sed=/usr/intel/bin/gsed -Dlocincpth=/include /include -Dloclibpth= -Duseshrplib -Dcc=/usr/intel/pkgs/gcc/4.5.2/bin/gcc -Dccflags= -O2 -fPIC -I/usr/intel/pkgs/perl/5.14.1/include -L/usr/intel/pkgs/perl/5.14.1/lib64 -Wl,-rpath=/usr/intel/pkgs/perl/5.14.1/lib64 -Dldflags= -L/usr/intel/pkgs/perl/5.14.1/lib64 -Wl,-rpath=/usr/intel/pkgs/perl/5.14.1/lib64'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
…….
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
PERL_PRESERVE_IVUV USE_64_BIT_ALL USE_64_BIT_INT
USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
Built under linux
Compiled at Nov 10 2011 08:25:50
%ENV:
PERL5LIB="/p/foundry/eda/em64t_SLES10/oascript/v1.0-2011.10.19/perl5:/p/foundry/env/lib/perl/1.11/em64t_SLES10/lib:/p/foundry/env/lib/perl/1.11/em64t_SLES10/lib/site_perl:/p/foundry/env/proj_utils/lib/perl"
@INC:
/p/foundry/eda/em64t_SLES10/oascript/v1.0-2011.10.19/perl5
/p/foundry/env/lib/perl/1.11/em64t_SLES10/lib/5.14.1
/p/foundry/env/lib/perl/1.11/em64t_SLES10/lib
/p/foundry/env/lib/perl/1.11/em64t_SLES10/lib/site_perl/5.14.1
/p/foundry/env/lib/perl/1.11/em64t_SLES10/lib/site_perl/x86_64-linux
/p/foundry/env/lib/perl/1.11/em64t_SLES10/lib/site_perl
/p/foundry/env/proj_utils/lib/perl
/usr/intel/pkgs/perl/5.14.1/lib64/site_perl/x86_64-linux
/usr/intel/pkgs/perl/5.14.1/lib64/site_perl
/usr/intel/pkgs/perl/5.14.1/lib64/5.14.1/x86_64-linux
/usr/intel/pkgs/perl/5.14.1/lib64/5.14.1
/usr/intel/pkgs/perl/5.14.1/lib64/module/default/x86_64-linux
/usr/intel/pkgs/perl/5.14.1/lib64/module/default
Also check that the first line of /usr/intel/pkgs/perl/5.14.1/bin/pp is
#!/usr/intel/pkgs/perl/5.14.1/bin/perl
YES, it is so. All packages as per directory name are as per the Perl version.
I'm pretty confident that PAR::Packer builds (and works) correctly for the distro Perl of any major Linux distro (Redhat, Suse, Debian etc - some might even package PAR::Packer), but locally built Perl installations might be broken in subtle ways. This might not show with most Perl modules, but PAR::Packer is very peculiar and unlike any other Perl module.
That's why I asked for the "hello world" example. If this doesn't run in any scenario, you're PAR::Packer installation is definitely broken.
As I said earlier, it does work.
> - does the problem happen with a trivial script, e.g.
>
> $ pp -o hello.exe -e 'print "hello, world\n"'
> $ ./hello.exe
> Yes and no both. I tried running it on a different setup (basically
> some shell variables set) and it ran fine. I tried running it on a
> fresh xterm and it ran fine. However, its failing in some particular
> xterm in some particular setup.
When it fails - what's the error message?
As per my earlier email,
$ <output>.exe --help
Attempt to reload Scalar/Util.pm aborted.
Compilation failed in require at /usr/intel/pkgs/perl/5.14.1/lib64/5.14.1/Compress/Zlib.pm line 8.
BEGIN failed--compilation aborted at /usr/intel/pkgs/perl/5.14.1/lib64/5.14.1/Compress/Zlib.pm line 8.
Compilation failed in require at -e line 358.
Things to look out for are environment variables PERL5LIB (generally anything starting with PERL), PATH, LD_LIBRARY_PATH. Though - at least in theory - the resulting executable should be immune to these.
> Also, once compiled on Suse-64, will it run fine across all other OS-
> es – Redhat, Ubuntu, etc.
Yes. It's as portable to any other 64-bit Linux on the same hardware architecture as any executable that you built by compiling and linking a, say, C program. BTW, pp is not *compiling* your script in any way - it packs up the perl executable and all modules used (recursively) by your script into a zip and prepends the zip with a small program that will extract the stuff into a temp directory and run it from there.
Could you give a pointer to the temp file/directory created?
Cheers, Roderich