On Fri, Nov 20, 2009 at 9:18 AM, Steffen Mueller <nj88ud...@sneakemail.com> wrote: >> To fix: either add PAR (and possibly others) to "config_requires" >> or generate the parameters for myldr/static dynamically at make time.
Looks like I was ultimately responsible for this problem, because I made packed executables ignore PERL5LIB, PERL5OPT etc and myldr/par and myldr/static are just the prototypical packed executables. > This sounds quite likely. I think adding PAR and friends to > configure_requires would be an acceptable workaround. Or try the following patch, which defers adding -I options corresponding to @INC to the invocation of myldr/static (and myldr/par) from "perl Makefile.PL" time to "make" time. I had to add the two line script myldr/run_with_inc.pl because inlining it ("perl -e ...") led to all kinds of quoting problems. If you apply this patch: is there a deeper reason that (in the original myldr/Makefile.PL) $lib_path comes _before_ "-I../myldr/.. -I../blib/lib" in the command "$par ...", but _after_ in the command "$par_exe ..."? My patch treats both as in the "before" case. Cheers, Roderich
diff -ubrN PAR-Packer-0.992_05/myldr/Makefile.PL ./myldr/Makefile.PL --- PAR-Packer-0.992_05/myldr/Makefile.PL 2009-11-13 09:35:32.000000000 +0100 +++ ./myldr/Makefile.PL 2009-11-20 10:53:58.000000000 +0100 @@ -262,7 +262,7 @@ \$(PERL) $f2c $par_pl \$@ load_me_2 $long_literal $parl_exe: $par - $par $lib_path -I../myldr/.. -I../blib/lib -q -B -O\$@ + \$(PERL) run_with_inc.pl $par -I../myldr/.. -I../blib/lib -q -B -O\$@ disttest: -\$(NOOP) @@ -283,7 +283,7 @@ print OUT << "EOT" if $dynperl; $parldyn_exe: $par_exe - $par_exe -I../myldr/.. -I../blib/lib $lib_path -q -B -O\$@ + \$(PERL) run_with_inc.pl $par_exe -I./myldr/.. -I../blib/lib -q -B -O\$@ static$o: my_perl.c my_par.c mktmpdir.c diff -ubrN PAR-Packer-0.992_05/myldr/run_with_inc.pl ./myldr/run_with_inc.pl --- PAR-Packer-0.992_05/myldr/run_with_inc.pl 1970-01-01 01:00:00.000000000 +0100 +++ ./myldr/run_with_inc.pl 2009-11-20 10:53:20.000000000 +0100 @@ -0,0 +1,5 @@ +#!perl +# add -I options corresponding to @INC after the first element of @ARGV, +# then execute it +splice @ARGV, 1, 0, map { "-I$_" } @INC; +exec @ARGV;