[Rd] building r packages for windows on a mac/linux

Hin-Tak Leung htl10 at users.sourceforge.net
Thu Sep 3 17:30:15 CEST 2009


--- On Thu, 3/9/09, Vinh Nguyen <vinhdizzo at gmail.com> wrote:

> hi hin-tak,
> 
> i'm trying to build r packages for windows on a
> mac/linux.  i guess
> this used to possible and supported, but is no longer
> supported.  i
> ran into this post of yours,
> https://stat.ethz.ch/pipermail/r-devel/2009-July/053971.html,
> and hope
> u don't mind me emailing you.
> 
> how did you set up your system to do this sort of
> thing?  i guess the
> only thing i don't get from your post is
> <win32_R_top>.  what does
> this refer to?  i do have mingw for macs, taken from
> http://crossgcc.rts-software.org/doku.php
> .  i tried compiling a
> package using your method but it didn't work, couldn't find
> things
> such as R.h.  i'm pretty sure it is the
> <win32_R_top> because i don't
> know what you are referring to with this.
> 
> i tried building R using mingw, but i got to the following
> error:
> sh: ../../../bin/Rterm.exe: cannot execute binary file
> make[2]: *** [all] Error 126
> make[1]: *** [R] Error 1
> make: *** [all] Error 2
> 
> can you guide me in the right direction?  thanks.

<win32_R_top> stands for 'windows R top directory' - you need both native R and win32 R to cross-compile R packages. (native R for executing R code, win32 R for its R.dll for the cross-compiler's linker to resolve symbols) Go back to R 2.8.x and study the cross-compile instructions and make sure that works, before attempting cross-compile with R 2.9.x .

FWIW, I just built win32 snpMatrix against R 2.9.2 last week and released that, and also managed to build the chm windows-help file for the first time.. These days, R packages for different platform only differ by the dll/so (and to a lesser extent, things like the chm file) so you just need to build the dll/so to go from one platform to another. chm file building is documented by others. 







More information about the R-devel mailing list