Hi [email protected],

received a bug report for PAR::Packer in a case where there is a perl at /usr/bin/perl but the perl used to run Makefile.PL was a different one. I suppose that's not too uncommon. Here's the report:

===========================================================

Subject: PAR::Packer fails for me
From: mail-address (Randal L. Schwartz)

Somewhere, you're invoking /usr/bin/perl in part of your code
vs using the Perl that invoked the Makefile.PL.  On my system, those
are different Perls, resulting in this:

./static -I"/Volumes/UFS/opt/perl/cpan/build/PAR-Packer-0.975-u9kvda/inc" -I"/Volumes/UFS/opt/perl/snap/lib/5.8.8/darwin" -I"/Volumes/UFS/opt/perl/snap/lib/5.8.8" -I"/Volumes/UFS/opt/perl/snap/lib/site_perl/5.8.8/darwin" -I"/Volumes/UFS/opt/perl/snap/lib/site_perl/5.8.8" -I"/Volumes/UFS/opt/perl/cpan/build/PAR-Packer-0.975-u9kvda" -I"." -I../myldr/.. -I../blib/lib -q -B -O../script/parl Errno architecture (darwin-8.8.2) does not match executable architecture (darwin-8.9.1) at /Volumes/UFS/opt/perl/snap/lib/site_perl/5.8.8/Errno.pm line 11. Compilation failed in require at /Volumes/UFS/opt/perl/snap/lib/5.8.8/File/Temp.pm line 144. BEGIN failed--compilation aborted at /Volumes/UFS/opt/perl/snap/lib/5.8.8/File/Temp.pm line 144. Compilation failed in require at /Volumes/UFS/opt/perl/snap/lib/site_perl/5.8.8/Archive/Zip.pm line 26. BEGIN failed--compilation aborted at /Volumes/UFS/opt/perl/snap/lib/site_perl/5.8.8/Archive/Zip.pm line 26.
  Compilation failed in require at -e line 406.
  make[1]: *** [../script/parl] Error 255
  make: *** [subdirs] Error 2

===========================================================

Grepping through the PAR::Packer sources yields various occurrances of shebang lines with /usr/bin/perl hardcoded. (See http://search.cpan.org/grep?release=PAR-Packer-0.975&string=%2Fusr%2Fbin%2Fperl&i=1&n=1 )

Question remains: What's the correct way to fix this? We want to use the perl that was used to execute Makefile.PL. Additional points for figuring out how to deal with command line switches.

Ideas?

Steffen

Reply via email to