[R-SIG-Mac] ROracle and R 2.4.1; require(ROracle) fails

Don MacQueen macq at llnl.gov
Mon Feb 5 21:37:26 CET 2007

I have so far been unable to successfully install ROracle 0.5-8 with 
R 2.4.1, and would appreciate any suggestions.

ROracle appears to install (using type='source'). That is, 
installation finishes without any fatal errors. There is one warning 
message. Full log is included at the end.

However loading the package fails:

>  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 
6): Symbol not found: _sqlcxt
   Referenced from: 
   Expected in: dynamic lookup

R is the binary version, downloaded today from CRAN (from the UCB 
mirror), where it was labeled "latest". I installed all of the 
optional installs, including gcc403.pkg.

I have ROracle 0.5-7 working with R 2.3.1, and in this case both R 
and ROracle were installed from source, using gcc 3.something.

I have checked as many things as I can think of to check...

I have verified that R2.4.1 is actually using gcc4.0.3 while building ROracle.
I have XCode 2.4 installed.
I'm installing on a G5 (ppc) machine.
OS X is 10.4.8
The DBI package was freshly installed today also, and is working 
(based on testing with RMySQL).

I've compared the output of "nm ROracle.so" for versions. Shown here:

###  ROracle 0.5-8 in R 2.4.1
pkgs[19]% nm 
| grep cxt
          U _sqlcxt

### ROracle 0.5-7 in R 2.3.1
R-2.3.1[21]% nm builddir/library/ROracle/libs/ROracle.so | grep cxt
          U _sqlcxt

The Oracle itself is Oracle 10.1.0, installed using Oracle's 
installer. This means, probably, that it's a binary install. I don't 
know what compiler version Oracle would have built the libraries 
with, but I would guess that if it's gcc, it's earlier than v4. This 
seems to me to be the most likely cause of the problem; a version 
compatibility problem, but I don't know how to verify that, or if so, 
what to do about it.

------------------- more information -------------------

------------ R session info for the two versions of R, respectively -----------
>  sessionInfo()
R version 2.4.1 (2006-12-18)


attached base packages:
[1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods" 
[7] "base"    

other attached packages:

>  sessionInfo()
Version 2.3.1 Patched (2006-08-19 r38935)

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils" 
"datasets"  "base"

other attached packages:
  ROracle      DBI    rmacq
  "0.5-7" "0.1-10"    "1.0"

 From the installation of ROracle 0.5-8:

opened URL
downloaded 152Kb

* Installing *source* package 'ROracle' ...
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
configure: creating ./config.status
config.status: creating src/Makevars
config.status: creating src/Makefile
** libs
** arch - ppc
gcc-4.0 -arch ppc -std=gnu99 
-DRS_ORA_SQLGLS_WORKAROUND -I/usr/local/include    -fPIC  -g -O2 -c
  RS-DBI.c -o RS-DBI.o
INCLUDE=/Library/Frameworks/R.framework/Resources/include \
                 PARSE=NONE LINES=false PREFETCH=1 RS-Oracle.pc

Pro*C/C++: Release - Production on Mon Feb 5 10:05:22 2007

Copyright (c) 1982, 2004, Oracle.  All rights reserved.

System default option values taken from: 

gcc-4.0 -arch ppc -std=gnu99 
-DRS_ORA_SQLGLS_WORKAROUND -I/usr/local/include    -fPIC  -g -O2 -c 
RS-Oracle.c -o RS-Oracle.o
RS-Oracle.c: In function 'RS_Ora_varCharCpy':
RS-Oracle.c:6387: warning: pointer targets in passing argument 1 of 
'strcpy' differ in signedness
R CMD SHLIB -o ROracle.so RS-DBI.o RS-Oracle.o
gcc-4.0 -arch ppc -std=gnu99 -dynamiclib -Wl,-macosx_version_min 
-Wl,10.3 -undefined dynamic_lookup -single_module -multiply_defined 
suppress -L/usr/local/lib -o ROracle.so RS-DBI.o RS-Oracle.o 
-L/Users/oracle/product/10.1.0/db_2/network/lib -lclntst10 -lnbeq10 
-lnhost10 -lnus10 -lnldap10 -lldapclnt10 -lnsslb10 -lntcp10 -lntcps10 
-lnsslb10 -lntcp10 -lntns10 -ldl -lpoll -lm -lpthread 
-L/Users/oracle/product/10.1.0/db_2/lib -lm 
-L/Library/Frameworks/R.framework/Resources/lib/ppc -lR -dylib_file 

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

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

More information about the R-SIG-Mac mailing list