Hi, Has anyone succeeded in cross-compiling R to Linux on an ARM CPU? If so, can you share a little about your toolchain & build process? Thanks! [[alternative HTML version deleted]]
On Aug 27, 2009, at 5:37 PM, Jonathan Wilner wrote:> Hi, > > Has anyone succeeded in cross-compiling R to Linux on an ARM CPU?Yes (although that questions leaves a lot of room for interpretation).> If so, can you share a little about your toolchain & build process? >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). That could probably be simplified, but I didn't have the time to do that. Cheers, Simon
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? 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... -- Andrew Piskorski <atp at piskorski.com> http://www.piskorski.com/
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