[R] Lazy-loading db setup in the R build process

Simon Pickering S.G.Pickering at bath.ac.uk
Thu Dec 16 12:54:39 CET 2004

Hi All,

I have read the article on lazy-loading in the September R news letter, and
think I have at least a vague grasp on what is happening.

Am I right in thinking that, assuming I were using the same packages, I
could copy the .rdb & .rdx files from one installation of R (2.0.0) to

I ask this as I'm trying to cross-compile R (for ARM), and need to use R
itself to perform the lazy-loading db setup (and probably other things) as
part of the build process. Therefore I build a native version of R (x86) and
pass the path of the native R binary as R_EXE in the arm cross-build
Makefiles (in src/library and its sub-directories).

This fails with the following error:

| make[3]: Entering directory
| building package 'base'
| mkdir -p -- ../../../library/base/demo mkdir -p -- 
| ../../../library/base/man Error in eval(expr, envir, enclos) : may 
| already be using lazy loading on base Execution halted
| make[3]: *** [all] Error 1
| make[3]: Leaving directory
| make[2]: *** [R] Error 1
| make[2]: Leaving directory
| make[1]: *** [R] Error 1
| make[1]: Leaving directory
| make: *** [R] Error 1

My guess is that as the native version has already been built (and enabled
lazy-loading, etc.), it's not happy that I'm trying to enable it again.
Might this be the case?

If so I can see a couple of possible options and I wonder if someone could
comment on what may or may not be possible to remedy the problem:

* Run the native binary without loading its various database files (is this
is possible)

* Delete the native database files so they can't be used and will be rebuilt
for the arm version without complaint

* Simply copy the database files from the native build to the appropriate
locations in the cross-build (after patching the Makefiles to remove the
references to R_EXE), assuming that they should be portable across

Many thanks,


Simon Pickering MEng
Research Officer
Materials Research Centre
Faculty of Engineering & Design
University of Bath
Bath, BA2 7AY, UK

Tel: +44 (0)1225 384802
Fax: +44 (0)1225 386928

More information about the R-help mailing list