Dear list,

I have one or several problems with compiling ROracle under OS X  
10.4.7 (ppc) and R 2.3.1, using the Oracle client v. 10g:

1) The default build process produces an empty dll: When running R  
CMD INSTALL, for some reason gcc is invoked with -arch i386 for  
compiling RS-DBI.c and RS-Oracle.c, but with -arch pcc for building  
the library. Not surprisingly, the build is not successful, though it  
does not crash, but only warns:

R CMD SHLIB -o ROracle.so RS-DBI.o RS-Oracle.o
gcc-4.0 -arch ppc -flat_namespace -bundle -undefined suppress -L/usr/ 
local/lib -o ROracle.so RS-DBI.o RS-Oracle.o -L/opt/oracle/product/ 
10g/client/lib -L/opt/oracle/product/10g/client/network/lib - 
lclntst10 -lnbeq10 -lnhost10 -lnus10 -lnldap10 -lldapclnt10 -lnsslb10  
-lntcp10 -lntcps10 -lnsslb10 -lntcp10 -lntns10 -ldl -lpoll -lm - 
lpthread -L/opt/oracle/product/10g/client/lib -lm   -L/Library/ 
Frameworks/R.framework/Resources/lib/ppc -lR
/usr/bin/ld: warning RS-DBI.o cputype (7, architecture i386) does not  
match cputype (18) for specified -arch flag: ppc (file not loaded)
/usr/bin/ld: warning RS-Oracle.o cputype (7, architecture i386) does  
not match cputype (18) for specified -arch flag: ppc (file not loaded)

The library installs fine, but when I call Oracle(), bad things happen:

ibrary(ROracle)
ora = Oracle()
Error in .Call("RS_Ora_init", config.params, reload, PACKAGE  
= .OraPkgName) :
	C entry point "RS_Ora_init" not in DLL for package "ROracle"

which is not surprising, as the .o file were never included in the  
library.

Any suggestion how this can happen? And possibly be avoided?

2) Fine, so I have hand-compiled by setting -arch ppc and removing  
the arguments '-march=pentium-m -mtune=prescott', and built the  
library without getting the error message. Then I copy the ROracle.so  
in the libs/ppc directory of the previous installation, but hsi does  
not work either:

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): Symbol not found: _sqlcxt
   Referenced from: /Users/aleplo/Library/R/library/ROracle/libs/ppc/ 
ROracle.so
   Expected in: flat namespace
Error in library(ROracle) : .First.lib failed for 'ROracle'

The README file suggests to 1) set the LD_LIBRARY_PATH to the Oracle  
lib directory or 2) to build a static library, however, both of these  
procude the same error.

Any suggestions here?

Thanks for your time,

alexander


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]]

