On Wed, 30 Jan 2002, Kevin Mullin wrote:
> I've just installed the latest(?) perl, 5.6.1, onto an OS/390 Mainframe
> system. I already had an older version of it there, and had it
> installed successfully (but now without shedding some blood, and some of
> you out there helped me with it).
>
> But now I've run into another problem. make test reported some
> problems, but none very major, and So I did a make install. Now, during
> the configuration process, I told it to put install things into:
> /local/perl
> and it did. Now, I've got /local/perl/bin and /local/perl/lib, and lots
> of stuff underneath it.
You presumably invoked Configure with something like:
sh Configure -Dprefix=/local/perl -des
make
make test
make install
is that correct? What does
grep prefix config.sh
or
grep config_args config.sh
return?
> But then I checked it out with a little program of my own, and here it
> is:
>
> #!/local/perl/bin/perl
> use strict;
> towers(5, "A", "B", "C")
>
> sub towsers {
> my ($disks,$orig,$dest,$temp) = @_;
> if ($disks = 1) {
You almost certainly meant to write:
> if ($disks == 1) {
didn't you?
> print("Move 1 disk from $orig to $dest.\n");
> } else {
> towers($disks-1, $orig, $temp, $dest);
> print ("Move 1 disk from $orig to $dest.\n");
> towsers($disks-1, $temp, $dest, $orig);
> }
> }
>
> and try to run it. By the way, this code worked with my previous
> install of Perl.
>
> But now, when I attempt to run it, I get:
> Can't locate strict.pm in @INC (@INC contains:
> /local/apps/perl5.6/lib/5.6.1/os390 /local/apps/perl5.6/lib/5.6.1
This is by far one of the weirder @INC troubles I have seen reported.
Some simple things to run include:
whence perl
perl -e 'print join("\n",@INC,"")'
uname -r -v
ls -l `whence perl`
ls -l /local/perl/bin/perl
Are you running a late enough release of OS/390 or z/OS such that:
> #!/local/perl/bin/perl
will work?
> So, my question is, where is perl finding it? I understand what it
> wants to do, and that I can tell it where to find what it needs with an
> environmental variable, but I shouldn't have to do that, and I don't
> want to do that. Where is it getting @INC from, and how can I change
> it?
Someone needs to ensure that
cd /local/apps
rm -rf perl5.6
get run by someone authorized to do so. It does sound however like that
was already done in your case. Might there be some trickiness with HFS
systems such as /local or /local/apps being mounted/umounted at times
other than at IPL?
Peter Prymmer