Discussion:
[R] RSQLite install R x86_64 fail
David Ruau
2010-07-11 19:27:37 UTC
Permalink
Hi,

On a fresh install of R on mac os x 10.6.4 (snow leopard) RSQLite did not install while running biocLite()
$ R
R version 2.11.1 (2010-05-31)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

[...]
Loading required package: utils
BioC_mirror = http://www.bioconductor.org
Change using chooseBioCmirror().
[Previously saved workspace restored]
biocLite("RSQLite")
Using R version 2.11.1, biocinstall version 2.6.7.
Installing Bioconductor version 2.6 packages:
[1] "RSQLite"
Please wait...

Warning in install.packages(pkgs = pkgs, repos = repos, ...) :
argument 'lib' is missing: using '/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11'
trying URL 'http://cran.fhcrc.org/src/contrib/RSQLite_0.9-1.tar.gz'
Content type 'application/x-gzip' length 1402602 bytes (1.3 Mb)
opened URL
==================================================
downloaded 1.3 Mb

* installing *source* package ?RSQLite? ...
checking for gcc... /opt/local/bin/gcc-mp-4.4 -std=gnu99
checking for C compiler default output file name... rm: a.out.dSYM: is a directory
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 /opt/local/bin/gcc-mp-4.4 -std=gnu99 accepts -g... yes
checking for /opt/local/bin/gcc-mp-4.4 -std=gnu99 option to accept ISO C89... none needed
checking how to run the C preprocessor... /opt/local/bin/gcc-mp-4.4 -std=gnu99 -E
checking for gcc... (cached) /opt/local/bin/gcc-mp-4.4 -std=gnu99
checking whether we are using the GNU C compiler... (cached) yes
checking whether /opt/local/bin/gcc-mp-4.4 -std=gnu99 accepts -g... (cached) yes
checking for /opt/local/bin/gcc-mp-4.4 -std=gnu99 option to accept ISO C89... (cached) none needed
configure: creating ./config.status
config.status: creating src/Makevars
** libs
/opt/local/bin/gcc-mp-4.4 -std=gnu99 -I/opt/local/lib/R/include -I/usr/local/mysql/include -DTHREADSAFE=0 -I/opt/local/include -fPIC -pipe -O2 -m64 -c RS-DBI.c -o RS-DBI.o
/opt/local/bin/gcc-mp-4.4 -std=gnu99 -I/opt/local/lib/R/include -I/usr/local/mysql/include -DTHREADSAFE=0 -I/opt/local/include -fPIC -pipe -O2 -m64 -c RS-SQLite.c -o RS-SQLite.o
/opt/local/bin/gcc-mp-4.4 -std=gnu99 -I/opt/local/lib/R/include -I/usr/local/mysql/include -DTHREADSAFE=0 -I/opt/local/include -fPIC -pipe -O2 -m64 -c param_binding.c -o param_binding.o
/opt/local/bin/gcc-mp-4.4 -std=gnu99 -I/opt/local/lib/R/include -I/usr/local/mysql/include -DTHREADSAFE=0 -I/opt/local/include -fPIC -pipe -O2 -m64 -c sqlite-all.c -o sqlite-all.o
sqlite-all.c:1:35: warning: extra tokens at end of #ifdef directive
mkdir -p ../inst/include
cp sqlite/sqlite3.h ../inst/include
cp sqlite/sqlite3ext.h ../inst/include
/opt/local/bin/gcc-mp-4.4 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/opt/local/lib -o RSQLite.so RS-DBI.o RS-SQLite.o param_binding.o sqlite-all.o -L/usr/local/mysql/lib -lmysqlclient -L/opt/local/lib/R/lib -lR
installing to /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared library '/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so':
dlopen(/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so, 6): Symbol not found: _sqlite3_backup_finish
Referenced from: /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
Expected in: flat namespace
in /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
ERROR: loading failed
* removing ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?
* restoring previous ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?

The downloaded packages are in
?/private/var/folders/e9/e9-5zLVqFgGBR2S8qU74+U+++TM/-Tmp-/RtmpBgST91/downloaded_packages?
Warning message:
In install.packages(pkgs = pkgs, repos = repos, ...) :
installation of package 'RSQLite' had non-zero exit status

#############
#############

The binary install work with install.packages("RSQLite", type='mac.binary') or 'mac.binary.leopard' but the package does not load properly.
library('RSQLite')
Error: package 'RSQLite' was built for universal-apple-darwin9.8.0


The RSQLite.so file is not in libs/RSQLite.so but in libs/x86_64/RSQLite.so
sessionInfo()
R version 2.11.1 (2010-05-31)
x86_64-apple-darwin10.4.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/C

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

loaded via a namespace (and not attached):
[1] tools_2.11.1

Thanks,
David
Seth Falcon
2010-07-11 23:09:09 UTC
Permalink
Hi David,
Post by David Ruau
On a fresh install of R on mac os x 10.6.4 (snow leopard) RSQLite
did not install while running biocLite()
How did you install R?
Post by David Ruau
$ R
biocLite("RSQLite")
Using R version 2.11.1, biocinstall version 2.6.7.
[1] "RSQLite"
Please wait...
?dlopen(/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so, 6): Symbol not found: _sqlite3_backup_finish
?Referenced from: /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
?Expected in: flat namespace
?in /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
ERROR: loading failed
* removing ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?
* restoring previous ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?
What version of XCode do you have? I have 3.2.1 and can build RSQLite
from source from an R that I have compiled from source. If you have
an earlier version, please try upgrading and repeating the install.
Post by David Ruau
The binary install work with install.packages("RSQLite", type='mac.binary') or 'mac.binary.leopard' but the package does not load properly.
library('RSQLite')
Error: package 'RSQLite' was built for universal-apple-darwin9.8.0
The mac binary package is intended to work with the R binary installer
for OS X. So if you want to use it, you need to install R that way.

Hope that helps some.

+ seth
--
Seth Falcon | @sfalcon | http://userprimary.net/
David Ruau
2010-07-11 23:25:54 UTC
Permalink
Hi Seth,

Thanks for the answer.
I have install R using macport (since many years now). It compile R from source using gcc 4.4 by default. But I don't think this is the problem because I manage to install many other package that do not need RSQLite.
The configure options for the macport port are at:
http://trac.macports.org/browser/trunk/dports/math/R/Portfile

I have Xcode 3.2.3 downloaded yesterday.

The thing is that it compile correctly but the RSQLite.so is not at the place specified.
Instead of being at
~/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/
it is in a subfolder
~/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/x86_64/

I could create a symbolic link only if biocLite would not erase the folder at the end of the failed install.

David
Post by Seth Falcon
Hi David,
Post by David Ruau
On a fresh install of R on mac os x 10.6.4 (snow leopard) RSQLite
did not install while running biocLite()
How did you install R?
Post by David Ruau
$ R
biocLite("RSQLite")
Using R version 2.11.1, biocinstall version 2.6.7.
[1] "RSQLite"
Please wait...
dlopen(/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so, 6): Symbol not found: _sqlite3_backup_finish
Referenced from: /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
Expected in: flat namespace
in /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
ERROR: loading failed
* removing ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?
* restoring previous ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?
What version of XCode do you have? I have 3.2.1 and can build RSQLite
from source from an R that I have compiled from source. If you have
an earlier version, please try upgrading and repeating the install.
Post by David Ruau
The binary install work with install.packages("RSQLite", type='mac.binary') or 'mac.binary.leopard' but the package does not load properly.
library('RSQLite')
Error: package 'RSQLite' was built for universal-apple-darwin9.8.0
The mac binary package is intended to work with the R binary installer
for OS X. So if you want to use it, you need to install R that way.
Hope that helps some.
+ seth
--
Seth Falcon
2010-07-12 04:41:07 UTC
Permalink
Post by David Ruau
Hi Seth,
Thanks for the answer.
I have install R using macport (since many years now). It compile R from source using gcc 4.4 by default. But I don't think this is the problem because I manage to install many other package that do not need RSQLite.
http://trac.macports.org/browser/trunk/dports/math/R/Portfile
I have Xcode 3.2.3 downloaded yesterday.
The thing is that it compile correctly but the RSQLite.so is not at the place specified.
Instead of being at
~/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/
it is in a subfolder
~/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/x86_64/
I could create a symbolic link only if biocLite would not erase the folder at the end of the failed install.
I don't use macports so I'm afraid I can't be of much help. I suspect
that something isn't getting configured properly for 64bit R in
macports.

When I build R from source on OS X and install RSQLite, I see the
package in .../libs/x86_64 and this works.
Maybe it will be useful to review the advice here:
http://r.research.att.com/building.html

+ seth
Post by David Ruau
David
Post by Seth Falcon
Hi David,
Post by David Ruau
On a fresh install of R on mac os x 10.6.4 (snow leopard) RSQLite
did not install while running biocLite()
How did you install R?
Post by David Ruau
$ R
biocLite("RSQLite")
Using R version 2.11.1, biocinstall version 2.6.7.
[1] "RSQLite"
Please wait...
?dlopen(/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so, 6): Symbol not found: _sqlite3_backup_finish
?Referenced from: /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
?Expected in: flat namespace
?in /Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite/libs/RSQLite.so
ERROR: loading failed
* removing ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?
* restoring previous ?/Users/druau/R/x86_64-apple-darwin10.4.0-library/2.11/RSQLite?
What version of XCode do you have? ?I have 3.2.1 and can build RSQLite
from source from an R that I have compiled from source. ?If you have
an earlier version, please try upgrading and repeating the install.
Post by David Ruau
The binary install work with install.packages("RSQLite", type='mac.binary') or 'mac.binary.leopard' but the package does not load properly.
library('RSQLite')
Error: package 'RSQLite' was built for universal-apple-darwin9.8.0
The mac binary package is intended to work with the R binary installer
for OS X. ?So if you want to use it, you need to install R that way.
Hope that helps some.
+ seth
--
--
Seth Falcon | @sfalcon | http://userprimary.net/
Loading...