[R-SIG-Mac] Problem loading RSQLite

Simon Urbanek simon.urbanek at r-project.org
Wed Jan 17 17:34:20 CET 2007


I have found the problem - it's a bug in the RSQLite package. The  
RSQLite package package provides its own SQLite version, but it uses  
the wrong compiler to compile it and therefore it compiles the wrong  
architecture (the result will be i386 binary of SQLite despite R  
being configured for ppc). In fact the configure script uses the  
wrong compiler as well. The fix is really easy - it's just the  
sequence of setting CC and failure to export it:

--- RSQLite/configure.in        2006-09-29 13:00:34.000000000 -0400
+++ RSQLite/configure.in1       2007-01-17 11:24:34.000000000 -0500
@@ -42,9 +42,6 @@
# As suggested by BDR, I may need to use CFLAGS to compile under 64-bit
# (I can't test this), but see "Writing R Extensions"
@@ -55,6 +52,9 @@
CC=`"${R_HOME}/bin/R" CMD config CC`
CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS`
@@ -193,6 +193,7 @@
     echo "(the file /tmp/sqlite$$ stores compiler messages)"
     echo ""
     export SQLITE_TDIR
+   export CC
     ( ./configure --silent --prefix=${SQLITE_TDIR}    \
                   --disable-tcl \
                   --enable-shared=${SQLITE_SHARED} --with-pic && \

There is one more issue: when the internal SQLite is used, RSQLite  
will put it in inst/sqlite. This is inherently unsafe, because it  
overwrites all previous architectures and thus it won't work for any  
but the first (or last) installed architecture. It would be a good  
idea to use ${R_ARCH} in the path (at least for lib) to avoid this  
problem. It's not a fatal problem, because I don't think anyone  
really uses the installed sqlite, but it limits its usefulness.


On Jan 17, 2007, at 10:58 AM, Simon Urbanek wrote:

> Seth,
> indeed - sorry, I must have missed that e-mail. R doesn't provide a  
> way of testing multiple architectures, so we run make check only  
> for the i386 version and thus it missed the ppc-specific issue.  
> I'll look into that...
> Cheers,
> Simon
> On Jan 17, 2007, at 10:00 AM, Seth Falcon wrote:
>> Hi Giovanni,
>> Giovanni Coppola <gcoppola at ucla.edu> writes:
>>> Hello Seth and Allan,
>>> Do you have any news on this? I still have the same problem with
>>> R 2.4.1 ppc
>>> OS X 10.4.8
>>> DBI 0.1-12
>>> RSQLite 0.4-18
>> I don't have much news for you.  I suspect that the binaries  
>> hosted on
>> CRAN simply do not work on PPC (well, at least they do not work for
>> the three of us).
>> Simon, can you tell us anything about how the RSQLite binary is being
>> built?  Have you tested it on ppc and does it work for you?
>> I installed RSQLite from source using R 2.4.0 and have posted the
>> resulting binary here (the .tgz):
>>     http://www.bioconductor.org/packages/misc/
>> It would be interesting to know if that works for you.
>> Best,
>> + seth
>> _______________________________________________
>> R-SIG-Mac mailing list
>> R-SIG-Mac at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

More information about the R-SIG-Mac mailing list