Malcolm Nooning wrote:


Hello,

First, I have a new email address. I used to write in as "[EMAIL PROTECTED]". I am now "[EMAIL PROTECTED]".

I installed Slackware 10.1 and installed PAR on it. I have done the same in the past with a number of machines, including a Linux Mandrake machine, which I still have. I am having problems on Slackware that I believe would not show up unless the perl installation had it's libraries at
/usr/lib/perl5/5.8.6/i486-linux
/usr/lib/perl5/5.8.6
/usr/lib/perl5/site_perl/5.8.6/i486-linux
/usr/lib/perl5/site_perl/5.8.6
/usr/lib/perl5/site_perl
which is where Slackware has them. This is as opposed to Mandrake, and I suspect all other Red Hat based machines, which have their perl libraries at
/usr/local/lib/perl5/5.8.6/i686-linux
/usr/local/lib/perl5/5.8.6
/usr/local/lib/perl5/site_perl/5.8.6/i686-linux
/usr/local/lib/perl5/site_perl/5.8.6
/usr/local/lib/perl5/site_perl
I state this because, after some triage, I found that the parl binary has it's @INC at
/usr/local/lib/perl5/5.8.6
/usr/local/lib/perl5/site_perl/5.8.6/i686-linux
/usr/local/lib/perl5/site_perl/5.8.6
/usr/local/lib/perl5/site_perl
which is of course the same as Mandrake's.


Here is how I can duplicate the problem. Create a file called test_perl_lib.pl like this:
#!/usr/bin/perl -w
use strict;


my $item;
print "The INC array holds:\n";
foreach $item (@INC) {
print "\t$item\n";
}
#--------------- end of test_perl_lib.pl
Naturally, running it yeilds a print out of the @INC array. Now if I attempt to
pp -o test_it test_perl_lib.pl
on Mandrake everything works just fine. However, on Slackware, I get


[EMAIL PROTECTED]:/home/webdownload# pp -o show_inc test_perl_lib.pl
Can't locate Cwd.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.6/i686-linux /usr/local/lib/perl5/5.8.6 /usr/local/lib/perl5/site_perl/5.8.6/i686-linux /usr/local/lib/perl5/site_perl/5.8.6 /usr/local/lib/perl5/site_perl .) at /usr/local/lib/perl5/5.8.6/File/Spec/Unix.pm line 458.
BEGIN failed--compilation aborted at -e line 835.
[EMAIL PROTECTED]:/home/webdownload# Doing grep on the Makefile shows that Makefile is correctly picking up real Slackware perl and it's libraries. After doing further grepping, I have found that only the binary file PAR-0.87/script/parl matches for "/usr/local/lib/perl5"


The explaination of parl is:
* Freestanding version of par.pl, with a built-in Perl interpreter!
* Ideal for deployment on machines without an existing Perl installation
* Runs PAR files as well as Perl programs


I am guessing that pp is errently invoking parl instead of the machine's installed interpreter. Thanks




I should add that I am aware of these postings:

PAR 0.86 - solution to "Can't locate Cwd.pm in @INC" on Win32
      12/29/2004 10:39 AM by Blair Sutton <[EMAIL PROTECTED]>
Re: PAR 0.86 - solution to "Can't locate Cwd.pm in  <at> INC" on Win32
      1/25/2005 5:18 AM
Build Problem Win32 cwd.pm
      12/22/2004 12:23 PM
HPUX Par execution: Can't locate Cwd.pm in @INC
      1/6/2005 2:36 PM

The one by Blair Sutton seems to be the accepted one, so I will paste his proposed solution here:

--------------paste
I've traced this down to parl.exe not being passed @INC in Packer.pm.

A solution is to hand edit site/lib/PAR/Packer.pm and add this line: -

foreach my $d (@INC) { unshift @args, "-I$d" };

after "my @args = ('-B', "-O$output", $par_file);" on line 1221 in _generate_output subroutine.

This just appends your current @INC path to parl.exe's command line arguments.
----------------end paste


Yes, adding to the @INC array will allow pp to pick up the modules that parl does not already have. This may well be a solution if the libraries paths you add to @INC are different from the parl library, which would be the case for Slackware. If this is a true solution, will it be incorporated into the next version of PAR?

I have a concern in general about this solution on a Mandrake/RedHat based installation. If there are modules in your machine's library that you have changed, and they (most likely) have the same name as the one(s) in the parl libraries, then won't the ones in the parl libraries be used by mistake? Can we know for fact that this will not be the case?

Another concern about the Mandrake/RedHat based installations. If you have modules that are not in the parl libraries, then pp will not know about them, right? They will not be packaged, right? The end result is that you will have to use -M for each of the missing modules, right? I have found on Mandrake that I need a lot of -M switches. I am now guessing that this is why.

Thanks





Reply via email to