Upgraded XPP from 9.2.2 to 9.4.0 and now a perl program can not find strict.pm

We upgraded our XPP from 9.2.2 to 9.4.0 and a perl program that has been working for at least the last 7 years is complaining about finding strict.pm.

The program works if I compile it and run it with the XPP perl.

But when background process runs it - there is an error

Can't locate strict.pm:   /root/perl5/lib/perl5/warnings.pm: Permission denied at /opt/xyvision/xz/procs/site/APT.pl line 105.

Can't locate warnings.pm:   /root/perl5/lib/perl5/warnings.pm: Permission denied at /opt/xyvision/xz/procs/site/APT.pl line 106.

Is there something wrong with our global variables?

Is there something wrong with our @INC for XPP.

I do see the PM files in XPP perl....

find /opt/xyvision/xz/etcxyvision -name "strict.pm"
/opt/xyvision/xz/etcxyvision/common/perl/lib/5.28.1/strict.pm

find /opt/xyvision/xz/etcxyvision -name "warnings.pm"
/opt/xyvision/xz/etcxyvision/common/perl/lib/5.28.1/encoding/warnings.pm
/opt/xyvision/xz/etcxyvision/common/perl/lib/5.28.1/warnings.pm

Parents
  • Bill,

    If this apt.pl thing is started through auto proc, the first thing to check is the entry in the autoprocessing spec.
    Is the entry a fully specified path to the perl executable?
    If so it should normally point to /etc/xyvision/common/perl/bin/perl which is the perl delivered with the xpp system (unless somebody in your company has a very good reason to run a different version of perl - I would seriously doubt whatever reason somebody might have to do so- but that is a totally other thing)

    If the entry in the autoproc spec, just says apt.pl, then the next thing to do is to verify the magic line (the !# line)  at the top of the APT.pl script to see what 'perl' you are running.
    If should be something like

    #!/etc/xyvision/common/perl/bin/perl 


    If that is the case, the better way to check if Perl can find a certain module would be in that case:

    >/etc/xyvision/common/perl/bin/perl -Mstrict -e 

    You will get nothing back if the module can be loaded successfully. And an overview of the content of @INC if things go wrong.

    Also check that the /etc/xyvision/common/perl is still linked to the xpp delivered version of perl

    But from the error messages you are getting back either the autoproc entry is using the 'wrong' version of perl (remember that a linux system might come with loads of different perl installations) or the magic line on apt.pl is either missing or pointing to the wrong perl installation.

  • So the APT.pl is running in autoproc and is fully qualified /opt/xyvision/xz/procs/site/APT.pl.  Next, we do have XPP Perl 5.28 and Native Perl 5.16. 

    The shabang line in APT.pl  is #!/etc/xyvision/common/perl/bin/perl. 

    We do have a symbolic link for /etc/xyvision to  /opt/xyvision/xz/etcxyvision.   

    I created a perl program to check the contents of @INC.   

    When I run my test program - there is an extra directory 

    <inc>
    /root/perl5/lib/perl5
    /etc/xyvision/common/perl/lib/site_perl/5.28.1/x86_64-linux-thread-multi
    /etc/xyvision/common/perl/lib/site_perl/5.28.1
    /etc/xyvision/common/perl/lib/5.28.1/x86_64-linux-thread-multi
    /etc/xyvision/common/perl/lib/5.28.1
    </inc>

    But when I run my test program interactively - that line /root/perl5/lib/perl5 is not there.

    So, we are running the correct Perl version - but something is adding that directory.

    I checked PERL5LIB and PERLLIB environment variables - but did NOT find any.

    So does that leave the account that is assigned autoproc system - root?

  • Bill,

    Maybe you need to 'extend' your test program a bit and try to print out the complete environment:

    foreach my $key (keys %ENV) {
      print "\t$key = $ENV{$key}\n";
    }

    Like that you will at least find the account that is running your autoproc programs.

    And you might also find the PERL5LIB or PERLLIB setting....

  • Yes your are correct - I added your code to my test program and it outputted this..

    PERL5LIB = /root/perl5/lib/perl5

    PERL_LOCAL_LIB_ROOT = /root/perl5
    PERL_MB_OPT = --install_base "/root/perl5"

    SHELL = /bin/bash   

    USER = root

    We normally use csh  

    This is our DEV server which had the 9.4 upgrade and was rebooted.

    I am going to run it on TEST server which had the 9.4 upgrade but was not rebooted

    And on our PROD server which has 9.2.2 XPP version.

    Do you want to see the actual file outputs?

Reply Children