[Rd] ARM v7/Linux Port/cross-compile?

Simon Urbanek simon.urbanek at r-project.org
Fri Aug 28 17:55:51 CEST 2009


On Aug 28, 2009, at 11:18 , Andrew Piskorski wrote:

> On Thu, Aug 27, 2009 at 06:36:38PM -0400, Simon Urbanek wrote:
>
>> It was fairly straight-forward to build R (like any other cross-
>> compilation). The tricky part is to install packages (if you are  
>> truly
>> cross-compiling on another architecture) which I solved by using  
>> multi-
>> arch R (which contains both arm and the host architecture) and cross-
>> compiling only the binaries (i.e. only packages with native code).
>
> Simon, could you provide any links to more detailed info on how you  
> did that, please?  E.g., how did you detect whether a package  
> contains binaries (native code) or not?  What exactly is a multi- 
> arch R and how did you build it?
>

See "R Installation and Administration" (R-admin) section 2.5 Sub- 
architectures.

You can build R that has binaries for both 32-bit and 64-bit simply by  
setting r_arch (we use that for quite a while on OS X to build for  
PPC, Intel - both 32 and 64-bit). Subsequently all packages will be  
build for all architectures by default, so there is nothing you have  
to do (except if the packages uses configure script in which case you  
have to install it subsequently with --libs-only for additional  
architectures - see R-admin 2.5 again. This is easy to spot since the  
installed package will have only one directory in "libs").


> I often need to build R packages for both x86 32 and 64 bit.  
> Currently, I build both R and all the packages twice in two entirely  
> separate directory trees, which is both annoying, and overkill for  
> all the R-code-only packages.  It sounds like you know a better way...
>

Yes, the above :).

Cheers,
Simon



More information about the R-devel mailing list