[prev in list] [next in list] [prev in thread] [next in thread]
List: r-sig-mac
Subject: [R-SIG-Mac] Summary: Compiling ROracle on OSX 10.4.7/R 2.3.1
From: Alexander Ploner <Alexander.Ploner () meb ! ki ! se>
Date: 2006-08-15 16:01:23
Message-ID: 155779D1-5F1C-4910-9573-B55665D0019D () meb ! ki ! se
[Download RAW message or body]
Recently, I have asked the list for advice with problems when
compiling ROracle 0.5.7 on OSX 10.4.7/R.2.3.1 Thanks to Simon
Urbanek's response, and with the support from Johan Söderberg at our
department, I have manged to compile & load ROracle, and to actually
connect to our Oracle server. Below, I have summarized the crucial
points, hoping that it may be useful for people with similar tsuris.
1) Setting up the Oracle client: Johan installed the full
Adminstrator client (Oracle 10g) on my machine. He notes two
important things:
1.1) Our Oracle realease (10.1.0.3.0) doesn't work with gcc version
4, so he needed to switch back to gcc version 3.3. You can do that by
su:ing to root and using the gcc_select command, i.e.
gcc_select 3.3
1.2) The default installation process created an empty library
libclntst10.a This can be solved by regenerating it:
$ cd $ORACLE_HOME/bin
$ ./genclntst
where $RORACLE_HOME is the home directory for your Oracle
installation (e.g. /opt/oracle/product/10g/client)
2) Compiling ROracle: Again, two crucial things:
2.1) Make sure that you have a patched or development version of R
2.3.1, or, as Simon instructed edit the file Library/Frameworks/
R.framework/Resources/bin/COMPILE by changing line 31 from
makefiles="-f \"${R_HOME}/etc/Makeconf\""
to
makefiles="-f \"${R_HOME}/etc${R_ARCH}/Makeconf\""
2.2) I included the option --configure-args='--enable-extralibs' when
compiling, otherwise R reported it did not find the symbol _sqlcxt.
In other words, for a local installation, I run
R CMD INSTALL --configure-args='--enable-extralibs' --library=~/
Library/R/library/ ROracle_0.5-7.tar.gz
3) Loading ROracle: You need DBI installed for that, but that never
was a problem to build or install; this is the weird part: you have
to load ROracle TWICE!! On my machine:
> require(ROracle)
Loading required package: ROracle
Loading required package: DBI
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library '/Users/aleplo/Library/R/library/
ROracle/libs/ppc/ROracle.so':
dlopen(/Users/aleplo/Library/R/library/ROracle/libs/ppc/
ROracle.so, 6): Library not loaded: /opt/oracle/product/10g/client/
lib/libnnz10.dylib
Referenced from: /opt/oracle/product/10g/client/lib/libsqlplus.dylib
Reason: image not found
[1] FALSE
> require(ROracle)
Loading required package: ROracle
[1] TRUE
4) Using ROracle: from that point on, no problem - I could do the
example in ?Oracle.
Configuration:
===========
R:
platform powerpc-apple-darwin8.6.0
arch powerpc
os darwin8.6.0
system powerpc, darwin8.6.0
status
major 2
minor 3.1
year 2006
month 06
day 01
svn rev 38247
language R
version.string Version 2.3.1 (2006-06-01)
ROracle: 0.5-7
Mac OS X:
ProductVersion: 10.4.7
BuildVersion: 8J135
Architecture: PPC
Oracle 10g: Release 10.1.0.3.0
Alexander.Ploner@ki.se
Medical Epidemiology & Biostatistics
Karolinska Institutet, Stockholm
Tel: ++46-8-524-82329
Fax: ++46-8-31 49 75
[[alternative HTML version deleted]]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic