DBD-Oracle

 view release on metacpan or  search on metacpan

lib/DBD/Oracle/Troubleshooting/Macos.pod  view on Meta::CPAN

means any dependencies will be downloaded and it retrieves the module
for us

sudo perl -MCPAN -e shell
install DBD::Oracle

When this fails exit CPAN and head to your .cpan/build dir - if you
used automatic config of CPAN it'll be

cd ~/.cpan/build

if you didn't auto configure you can find your build directory with
the following command in CPAN

o conf build_dir

Once in the build dir look for the DBD::Oracle dir which has just been
created (it'll be called something like DBD-Oracle-1.28-?) and cd into
it.

Now we need to switch to the root user. Root isn't enabled as default
in osx - for details on enabling see this post on the apple website

Once logged in as root we need to set the above environment variables for root:

export ORACLE_HOME=/usr/oracle_instantClient64
export DYLD_LIBRARY_PATH=/usr/oracle_instantClient64

Now while still logged in as root we need to run the makefile for the
module, then make, then install

perl Makefile.pl
make
install

Assuming that all worked without error log out of root: we're DBD'd
up! If this didn't work it's time to bust out google on whatever
errors you're seeing

Now just to install the DBI module

sudo perl -MCPAN -e shell
install DBI

Now you're all set - enjoy your perly oracley new life

=head1 Instructions for 10.2.x (Jaguar)

1) Install Oracle exactly per Oracle documentation. If you change
install locations, then you'll need to modify paths accordingly.

2) There are two ways to remedy the symbol clash. Either edit the
symbol table of the Oracle client library
$ORACLE_HOME/lib/libclntsh.dylib.9.0 such that the symbol _poll is no
longer exported. Alternatively, download, patch, and re-install the
perl IO modules. I could not successfully repeat the report for the
former, but I did succeed by doing the latter. Instructions for both
follow nonetheless.

  2a) SKIP IF YOU WANT TO OR HAVE SUCCESSFULLY TRIED 2b).  Make a
    backup copy of the $ORACLE_HOME/lib/libclntsh.dylib.9.0 file, or
    the file this name points to, since we're about to modify that
    library.  Note that the ".9.0" suffix of the file name is version
    dependent, and that you want to work with the file pointed to
    through one or a series of symbolic links rather than any of the
    symbolic links (e.g., one will be called libclntsh.dylib).

    As user 'oracle' execute the following command to fix namespace
    collisions in Oracle's dynamic libraries.

    nmedit -R ./hints/macos_lib.syms $ORACLE_HOME/lib/libclntsh.dylib.9.0

    *** Recall the above caveats regarding the file name.

    The problem with this is that the version of nm that comes with
    Jaguar doesn't support the -R flag. I'd be grateful to anyone who
    can suggest how to edit the symbol table of libraries on MacOS X.

  2b) SKIP IF YOU WANT TO OR HAVE SUCCESSFULLY TRIED 2a). In this
    variant, we will patch the Perl IO modules to change the name of
    the poll() function, as that is where it is defined. In this case,
    we do not need to do anything with the Oracle libraries. Follow
    these steps:

    - Download the module IO (IO.pm) from CPAN and unpack it. Check
      the documentation as to whether the version is compatible with
      your version of Perl; I used v1.20 with Perl 5.6.0 and had
      success.

    - The files IO.xs, poll.c, and poll.h need to be patched. Apply
      the following patches, e.g., by cutting and pasting the marked
      section into a file perlio.patch and using that file as input
      for patch:

      $ patch -p0 < perlio.patch

      The patch will basically rename the C implementation of poll()
      to io_poll(). The other patches were necessary to make v1.20
      compile with Perl 5.6.0; they may not be necessary with other
      versions of IO and Perl, respectively.

        +=+=+=+=+=+=+= Cut after this line
        diff -c ../IO-orig/IO-1.20/IO.xs ./IO.xs
        *** ../IO-orig/IO-1.20/IO.xs	Mon Jul 13 23:36:24 1998
        --- ./IO.xs	Sat May 10 15:20:02 2003
        ***************
        *** 205,211 ****
                ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t)));
            }
            else {
        ! 	    ST(0) = &sv_undef;
                errno = EINVAL;
            }

        --- 205,211 ----
                ST(0) = sv_2mortal(newSVpv((char*)&pos, sizeof(Fpos_t)));
            }
            else {
        ! 	    ST(0) = &PL_sv_undef;
                errno = EINVAL;
            }



( run in 1.106 second using v1.01-cache-2.11-cpan-63c85eba8c4 )