Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Installing WWW::Mechanize on AIX - The battle

by Tanktalus (Canon)
on Jul 06, 2012 at 16:59 UTC ( #980326=note: print w/ replies, xml ) Need Help??


in reply to Installing WWW::Mechanize on AIX - The battle

Perl 5.8.3 is severely old. The system perl (/usr/bin/perl) is probably newer than that. (5.8.8 IIRC, but I don't have an AIX 5 box anymore to check with.) Do you have to use the perl that is inside Oracle for this? I would suggest installing your own perl and using that. I've been regularly building 5.16.0 and 5.17.* ("blead") on AIX 6 and 7 (7 has a minor issue, but I think IBM has fixed it, just waiting to get the fix applied to the system to be sure). Tux has been building on 5.2 and 5.3 fairly regularly as well. This would resolve your first issue. Failing that, you may be able to "install ExtUtils::MakeMaker" - I'm not sure if that will eventually drag in a newer version of perl and then you're back to installing a private perl again anyway as I wouldn't suggest upgrading the perl included with Oracle.

It also looks like you're mixing 32-bit and 64-bit objects. Or at least 32-bit objects when perl might be compiled for 64-bit (which would make sense since the perl that comes with AIX is 32-bit). Again, a recommendation for a private perl: I've had this issue when compiling against the system perl, but never with a private perl.

I'd also be tempted to ask Oracle if they support you installing additional modules to their private perl. I'd somewhat expect a response like "Um, er... what?" which might also give you impetus to use your own perl. I do expect, however, that there should be no problem connecting to Oracle from your own private perl. You shouldn't require Oracle's perl to connect to their db.


Comment on Re: Installing WWW::Mechanize on AIX - The battle
Re^2: Installing WWW::Mechanize on AIX - The battle
by perl_monster (Novice) on Jul 06, 2012 at 18:12 UTC

    Yes Perl 5.3 is severely old, and yes it is Oracle's private perl in AIX. I am sure they won't support external PMs (except DBD and DBI, or maybe not). I was able to successfully install a couple of external modules like XML::XPath and Net::Stomp to Oracle perl but WWW::Mechanize seems to have a whole lot of dependencies. I can use AIX's perl installation to get Mechanize in, but the problem is the job scheduler we use, uses Perl profile set for Oracle Perl only, so in order to be able to run a program using AIX perl we will end up creating a new profile.

      5.8.3, not 5.3 :-) I'm guessing it already comes with DBI and DBD::Oracle.

      Now you're running into a few other issues that take a bit more to resolve. Again, I'll reiterate: install a private perl. And then we can more or less resolve the rest of the issues.

      Let's say you install perl 5.16.0. Depending on how your environment is set by the job scheduler, different solutions may present themselves. If, for example, it simply puts Oracle's perl first in the PATH, you can just put your first line to be:

      #!/opt/myperl/5.16.0/bin/perl
      and everything is fine after that. However, if your code is actually being run directly by a hardcoded-in-the-scheduler perl, that is it's running /u01/oracle/product/10.2.0/perl/bin/perl $yourscript directly, it's a bit more convoluted. My suggestion would be to write a wrapper (in perl 5.8.3 syntax). Roughly something like this:
      #! perl # delete $ENV{...} to clean up the environment if needed exec {$0} "$0-wrapped", @ARGV;
      And then have a -wrapped version of the file with your real code in it that starts with the appropriate line above in it. This will have the job scheduler launching the Oracle perl which then reads this file, and it will then tell the kernel (AIX) to execute another program in its place. The kernel will read the magic number from the new program ("#!") and interpret it as a script that needs interpretation, read the rest of the line for the interpreter, and then run that. So it's a bit of an annoyance, but it should all run quick enough not to be noticed.

      And, as a bonus, you'll be able to use the new features in newer perls. Like 5.8.8. :-P

        Sorry that was a typo... I meant 5.8.3. Having another Perl installation will sure solve the problem but its a long shot to get a new version of Perl installed in the live production system, especially just for one program. The Sysadmins are suggesting that we use the existing perl Installations. The job scheduler is very flexible so I am not so concerned about running a program with new settings on it, but the only thing that is pressing is the perl Installation. I guess I will give the AIX perl installation a shot.. Thanks for your help!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980326]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2014-07-31 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (245 votes), past polls