--- 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.
--- On Thu, 3/9/09, Vinh Nguyen <vinhdizzo at gmail.com> wrote:> hmmm....tried building R-2.8.0 on my > mac, didn't work. i think it got > the very end before failing: > i386-mingw32-windres --preprocessor="i386-mingw32-gcc -E > -xc > -DRC_INVOKED" -I > /Users/vinh/Downloads/Rwin/R-2.8.0/include -I > -i > methods_res.rc -o methods_res.o > i386-mingw32-gcc -std=gnu99 -shared -s -o > methods.dll methods.def > class_support.o do_substitute_direct.o init.o > methods_list_dispatch.o > slot.o tests.o methods_res.o > -L/Users/vinh/Downloads/Rwin/R-2.8.0/bin > -lR > ... DLL made > installing DLL > collecting R files > preparing package methods for lazy loading > dumping R code in package `methods' > cp: > /Library/Frameworks/R.framework/Resources/library/methods/libs/methods.so: > No such file or directory > make[4]: *** > [/Users/vinh/Downloads/Rwin/R-2.8.0/library/methods/R/methods.rdb] > Error 1 > make[3]: *** [all] Error 2 > make[2]: *** [pkg-methods] Error 2 > make[1]: *** [rpackage] Error 1 > make: *** [all] Error 2It is probably wiser to use the last of 2.8 (i.e. 2.8.1patched) That seems to be buggy - anyhow, I said to build win32 R package you need to have the win32 R.dll, I don't mean you have to build it yourself. You can just take it out of the official win32 R installer.> > if i go to bin/R.exe, my wine opens R fine. so i > think this is OK. > my ultimate goal would be to build a package for > windows. looking > through the admin file, i don't understand how i would do > this (even > if i didn't get that previous error). could u kindly > point me in the > direction of how to do this? make what?The instruction for cross-compiling R packages is in a file called "README.packages" or some such under src/gnuwin32 . The file was removed in R 2.9.x (as the content is no longer supported). BTW, you have not shown your affiliation nor the reason why you want to go this way - and I am reluctant to do one-on-one hand-holding on annonymity. So please keep the CC:, or arrange for commercial consultancy.
Maybe Matching Threads
- R 3.2.2 64 bit compilation error on AIX
- segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages
- R 3.2.2 64 bit compilation error on AIX
- R 3.2.2 64 bit compilation error on AIX
- segfault with readDCF on R 3.1.2 on AIX 6.1 when using install.packages