From xjqian at gmail.com  Fri Dec  7 06:41:06 2007
From: xjqian at gmail.com (Junqian Gordon Xu)
Date: Thu, 06 Dec 2007 23:41:06 -0600
Subject: [Rd]  Cross Compiling for ARM
In-Reply-To: <59d7961d0712062108k1f2daff4yca96fb6dab8d5a84@mail.gmail.com>
References: <Pine.LNX.4.64.0712060752060.17952@gannet.stats.ox.ac.uk>	<eb555e660712060032v46ce904clf1e454394b59e943@mail.gmail.com>	<1196958126.2955.19.camel@Bellerophon.localdomain>
	<59d7961d0712062108k1f2daff4yca96fb6dab8d5a84@mail.gmail.com>
Message-ID: <4758DCF2.3050308@gmail.com>

I am trying to cross compile R-2.6.0 for ARM. I have my cross compiling 
tool chain set up already.

I've read the cross compiling guide for WIN
# http://cran.r-project.org/doc/contrib/cross-build.pdf
# http://cran.r-project.org/doc/contrib/Makefile-rcb

Following the same approach, I compiled the native R-2.6.0 version 
first. Then passed R=R-2.6.0 to ./configure. After that, I hacked 
makefiles to set R_EXE to the native R binary.

I was able to compile through until R packages in /src/library, where 
the following command was issued

$R_EXE --vanilla --slave -f /src/library/base/makebasedb.R

| Error in eval(expr, envir, enclos) :
| may already be using lazy loading on base
| Calls: local -> eval.parent -> eval -> eval -> eval -> eval
| Execution halted

Seems the error was caused by lazy loading mechanism of the native R 
binary on the host. AFAIK --vanilla should suppress loading any package 
upon startup, however, seems there is no way to get around lazy loading.

My questions are why cross compiling for WIN don't hit this error (maybe 
some special setting I'm not aware of was set in the makefile for WIN). 
Second, how could I get around this lazy loading issue, if my approach 
is not completely off?

Thanks
Gordon



[Rd] Cross Compiling for ARM
Junqian Gordon Xu