[R-SIG-Mac]ROracle and OS X, more details

Don MacQueen macq@llnl.gov
Fri, 7 Feb 2003 12:06:49 -0800


Sefano, here is a better description of what I had to do to get 
ROracle to install.

David, I posted a note on r-sig-mac that I had done this, and Stefano 
asked for more information. So here it is.

-Don

------- ROracle ------
In the Makefile.in in ROracle/src, change
   PARSE = FULL
to
   PARSE = PARTIAL
This is a directive to proc, the Oracle ProC/C++ precompiler

Thanks to David James, ROracle's maintainer (and one of the authors) 
for this information.

------- Oracle -------
I downloaded the "Oracle9i Database Developer's Release for Apple Mac 
OS X Version 10.2 (Jaguar)" from Oracle's "Oracle Technology 
Network." It's a little hard to find, have to look under "Oracle9i 
JDeveloper Download".

Install according to instructions from Oracle. This puts it in 
/Users/oracle/9iR2/orahome.

Create appropriate tnsnames.ora and listener.ora files in 
$ORACLE_HOME/network/admin.

The first work around is this:

cp  $ORACLE_HOME/rdbms/lib/libclntst9.a $ORACLE_HOME/lib
cd $ORACLE_HOME/lib
ranlib -s libclntst9.a

(look in the file $ORACLE_HOME/precomp/lib/env_precomp.mk for 
references to libclntst9.a)

The absence of libclntst9.a in $ORACLE_HOME/lib may represent an 
error in the Oracle distribution, or it may represent a lack of 
understanding on my part.

The second work around is truly puzzling. It may be due to something 
I did without realizing the side effect, so don't assume this work 
around will be necessary.

I installed Oracle here:
    [662]% echo $ORACLE_HOME
    /Users/oracle/9iR2/orahome
but for some unknown reason Oracle's proc behaved as if ORACLE_HOME is here:
    /Users/oracle/Source/9iR2

I worked around this by first creating the directory 
/Users/oracle/Source and then making a soft link:
   [663]% cd /Users/oracle/Source
   [664]% ls -l
   total 8
   drwxr-xr-x   3 macq    ora  102 Feb  6 16:16 ./
   drwxrwxr-x  19 oracle  ora  646 Feb  6 16:11 ../
   lrwxr-xr-x   1 macq    ora   15 Feb  6 16:16 9iR2@ -> ../9iR2/orahome

----- Environment variables -----
Then, before attempting to install ROracle, set some environment 
variables. Here is the script I use (csh syntax). The value of 
ORACLE_SID is probably wrong, but I haven't seen any problems from it 
yet.

-----------------------------
# This is your ORACLE_HOME
setenv S /Users/oracle/9iR2/orahome

# Root of All Oracle installation.
setenv ORACLE_HOME $S
# Same as ORACLE_HOME
setenv SRCHOME $S
# Add Oracle binaries to path.
setenv PATH $S/bin:$PATH
# Oracle SID
setenv ORACLE_SID ab
# setenv CDEBUG "-g -O0"
# Required to find dynamic libraries.
if ( $?DYLD_LIBRARY_PATH ) then
     setenv DYLD_LIBRARY_PATH $S/lib:$S/rdbms/lib:$DYLD_LIBRARY_PATH
else
     setenv DYLD_LIBRARY_PATH $S/lib:$S/rdbms/lib
endif

# Required for the database application.
if ($?CLASSPATH) then
     setenv CLASSPATH $S/DBCreate/oradev/classes/orapts.jar:$CLASSPATH
else
     setenv CLASSPATH $S/DBCreate/oradev/classes/orapts.jar
endif

# Required for JDBC connection
setenv CLASSPATH $S/jdbc/lib/classes12.zip:$CLASSPATH

-- 
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
--------------------------------------