jc0517 has asked for the wisdom of the Perl Monks concerning the following question:

Perl novice here so bear with me.

Recently we upgraded our development server from AIX 5.2 ML 8 to AIX 5.2 ML 10, which was supposed to leave perl untouched. This morning one of my team members recieved these errors running a script.

Here are the errors I am receiving:
MIME::Base64 object version 2.12 does not match bootstrap parameter 3.07 at /usr/opt/perl5/lib/5.8.0 /aix-thread-multi/XSLoader.pm line 106.

Compilation failed in require at /usr/opt/perl5/lib/site_perl/5.8.0/MIME/Words.pm line 85. BEGIN failed--compilation aborted at /usr/opt/perl5/lib/site_perl/5.8.0/MIME/Words.pm line 85.

Compilation failed in require at /usr/opt/perl5/lib/site_perl/5.8.0/MIME/Head.pm line 123. BEGIN failed--compilation aborted at /usr/opt/perl5/lib/site_perl/5.8.0/MIME/Head.pm line 123.

Compilation failed in require at /usr/opt/perl5/lib/site_perl/5.8.0/MIME/Entity.pm line 235. BEGIN failed--compilation aborted at /usr/opt/perl5/lib/site_perl/5.8.0/MIME/Entity.pm line 235.

Compilation failed in require at /tledevl/scripts/perl/hms_send_email_attachment.pl line 18. BEGIN failed--compilation aborted at /tledevl/scripts/perl/hms_send_email_attachment.pl line 18.

The same script was run on our test server which is still at ML 8 and it worked.

I looked at the perl files and the script and did compares between the development and test versions, and i got no differences, so they did not change.

It looks like the failures are occurring on statements like the following

+18 use MIME::Entity;

above is the line from our script that is failing; the ones in the .pm files are failing on similar lines where a use MIME is happening.

Any idea what is going on here?

Replies are listed 'Best First'.
Re: AIX upgrade MIME problem
by almut (Canon) on Feb 13, 2009 at 16:34 UTC
    ...which was supposed to leave perl untouched.

    Apparently, that's not true, as

    MIME::Base64 object version 2.12 does not match bootstrap parameter +3.07 at ...

    means that the associated shared object file (XS part, presumably /usr/opt/perl5/lib/5.8.0/aix-thread-multi/auto/MIME/Base64/Base64.so) of the module MIME::Base64 does no longer match the version requested in the MIME/Base64.pm file... (3.07 requested, 2.12 found)

    You might want to check whether you have any unwanted search paths in @INC:

    $ perl -V
Re: AIX upgrade MIME problem
by jc0517 (Novice) on Feb 13, 2009 at 16:52 UTC
    here is what I found under @INC in perl -V

    /usr/opt/perl5/lib/5.8.0/aix-thread-multi
    /usr/opt/perl5/lib/5.8.0
    /usr/opt/perl5/lib/site_perl/5.8.0/aix-thread-multi
    /usr/opt/perl5/lib/site_perl/5.8.0
    /usr/opt/perl5/lib/site_perl

    is there a reason why the aix-thread-multi is in there twice?
      is there a reason why the aix-thread-multi is in there twice?

      That's normal.

      You could try something like

      $ truss /usr/bin/perl -MMIME::Base64 -e1 2>&1 | grep Base64

      to see which paths are actually being visited while searching, and compare the output against the system where your script works. 

      For instance, on an AIX 5.3 machine (the closest I currently have available to your setup) I do get (which is working fine):

      statx("/usr/opt/perl5/lib/5.8.2/aix-thread-multi/MIME/Base64.pmc", 0x2 +FF21CA0, 128, 010) Err#2 ENOENT open("/usr/opt/perl5/lib/5.8.2/aix-thread-multi/MIME/Base64.pm", O_RDO +NLY|O_LARGEFILE) = 4 statx("/usr/opt/perl5/lib/5.8.2/aix-thread-multi/auto/MIME/Base64", 0x +30008738, 128, 010) = 0 statx("/usr/opt/perl5/lib/5.8.2/aix-thread-multi/auto/MIME/Base64/Base +64.so", 0x30008738, 128, 010) = 0 statx("/usr/opt/perl5/lib/5.8.2/aix-thread-multi/auto/MIME/Base64/Base +64.bs", 0x30008738, 128, 010) = 0

      Then, compare the .pm-version to the .so-version (with the respective paths as revealed by truss):

      $ grep VERSION /usr/opt/perl5/lib/5.8.2/aix-thread-multi/MIME/Base64.p +m use vars qw(@ISA @EXPORT $VERSION $OLD_CODE); $VERSION = '2.21'; eval { bootstrap MIME::Base64 $VERSION; }; $ strings /usr/opt/perl5/lib/5.8.2/aix-thread-multi/auto/MIME/Base64/B +ase64.so | grep ^[0-9] 2.21 2.21

      (the version numbers should be the same)

      I looked at our test server and it has the same @INC paths.

      however we do have some significant differences in other areas of our perl -V output. I am going to run it by our admins.
Re: AIX upgrade MIME problem
by jc0517 (Novice) on Feb 16, 2009 at 14:02 UTC
    I tried the truss and the output clearly shows that there is an error on the command on our development server but not on our test server. The sys admins are telling me that Perl may need to be recompiled due to the Maintenance level upgrade, but the libraries did not change... does that sound reasonable?
      but the libraries did not change... does that sound reasonable?

      Well, MIME::Base64 has definitely changed - and the change has been only half-implemented. From perl-5.8.0 onwards (I think), MIME::Base64 has been part of core perl so re-compiling perl, as suggested by the admins, would fix the problem.

      Another way to fix this particular problem would be to simply rebuild and reinstall MIME::Base64 (from CPAN source). But if there are a large number of other core perl modules that have been similarly affected then rebuilding perl might be the better option.

      Cheers,
      Rob
        how would i check to see what other modules have changed? not a sys admin or a perl person so i am trying to feel my way here.