Mac Stuff


10
Dec 09

Installing DBD::Oracle on Mac OS X, redux

After upgrading to Snow Leopard, I had to redo the installation of DBD::Oracle. This time I used DBD::Oracle 1.23. The good news is that the majority of my previous instructions no longer appear to be necessary. A normal build of DBD::Oracle looks ugly, but completes.

HOWEVER, I did discover that if you are running a 64-bit perl, which you probably are, you need to get the 64-bit Oracle instantclient release. If you build DBD::Oracle and then cannot load the module because of missing symbols (e.g., _OCIAttrGet), then what is happening is that you linked against 32-bit libraries which cannot load from the 64-bit perl instance.


12
Nov 08

How to install DBD::Oracle on Mac OS X

Today, I figured out how to get DBD::Oracle to work on Mac OS X Leopard (intel). Since it isn’t (yet) entirely straightforward, I thought I’d describe the process here:

  1. Install instantclient. You will need the basic and sdk modules. I suggest also getting the sqlplus module while you are at it. I put this in /usr/local/instantclient_10_2.

  2. Modify your .bashrc (or whatever) to set ORACLE_HOME and DYLIB_LIBRARY_PATH to /usr/local/instanclient_10_2.

  3. Get DBD::Oracle from CPAN. (I got 1.22). Here is where it gets tricky: In Terminal:

% perl Makefile.PL

This generates Makefile.

  1. Edit Makefile, changing: NMEDIT=nmedit to NMEDIT=echo

  2. Edit dbimp.c, removing all code that references dump_env_to_trace(). I found a patch at macosxhints.com, but this is tied to a particular release of DBD::Oracle. I decided to use my mad programming skillz to logically do what was needed. Hopefully this will be fixed in some future version of DBD::Oracle.

  3. Again, in Terminal:

% make && sudo make install

And that should do it.