Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

To debug an issue, I need to install an older DBI and DBD::Oracle.

I thought I'd done everything correctly (using PREFIX after the perl MakeFile.PL call, but when I try to run the app that is using the new libraries (using a BEGIN block to add the custom lib dirs), I get this error:

DBD::Oracle object version 1.74 does not match bootstrap parameter 1.64 at .../ line 223

Dumping @INC in DynaLoader, I see that the custom lib dirs aren't in it. A quick scan of similar reports on Google finds me an explanation of how to reinstall a single DBD::Oracle, but how do I fix this so that I can test my app with the old version of DBD::Oracle while leaving the current in place?

Edit: more info...

I installed v1.64 of DBD::Oracle from a tar.gz download from CPAN:

#> perl MakeFile.PL PREFIX=/path/to/local/lib #>make && make test

There were test errors. On closer examination, they appeared to just be miscounts of number of tests, so I installed the module:

make install

In looking in the local lib dir, I see that the DBD::Oracle code is there - both and DBD/Oracle/

I wrote this test script:

#!/usr/bin/perl BEGIN { use lib '/path/to/local/lib/lib64/perl5'; } use strict; use warnings; use v5.010; use Data::Dumper 'Dumper'; use DBI; say Dumper(\@INC,\%INC); require DBD::Oracle;

(the use/require DBI/DBD are copied from the app I'm debugging. The output I got was:

$VAR1 = [ '/path/to/local/lib/perl5lib/lib64/perl5', '/usr/local/lib64/perl5', '/usr/local/share/perl5', '/usr/lib64/perl5/vendor_perl', '/usr/share/perl5/vendor_perl', '/usr/lib64/perl5', '/usr/share/perl5', '.' ]; $VAR2 = { 'warnings/' => '/usr/share/perl5/warnings/registe', '' => '/usr/lib64/perl5/', 'List/' => '/usr/lib64/perl5/List/', '' => '/usr/share/perl5/', '' => '/usr/lib64/perl5/', '' => '/path/to/local/lib/perl5/', '' => '/usr/lib64/perl5/', '' => '/usr/share/perl5/', '' => '/usr/share/perl5/', 'Scalar/' => '/usr/lib64/perl5/Scalar/', 'Exporter/' => '/usr/share/perl5/Exporter/', '' => '/usr/share/perl5/', '' => '/usr/share/perl5/', '' => '/usr/share/perl5/', '' => '/usr/share/perl5/', '' => '/usr/lib64/perl5/', '' => '/usr/share/perl5/', '' => '/usr/share/perl5/', '' => '/usr/lib64/perl5/', '' => '/usr/lib64/perl5/', 'Data/' => '/usr/lib64/perl5/Data/', '' => '/usr/share/perl5/' }; DBD::Oracle object version 1.74 does not match bootstrap parameter 1.6 +4 at /usr/lib64/perl5/ line 223. Compilation failed in require at line 14.

So, that use lib statement doesn't appear to be being honored by DynaLoader.

Edit 2:

I tried INSTALL_BASE instead of PREFIX and it appears to have worked! Anyone know a deep reason why that should be? The MakeMaker docs don't appear to clarify.

In reply to Trouble getting a local DBD::Oracle to work (Dynaloader!) by cLive ;-)

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2023-12-06 21:42 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (32 votes). Check out past polls.