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

Hin-Tak Leung htl10 at users.sourceforge.net
Fri Sep 4 00:20:32 CEST 2009


--- 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 2

It 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.


    


More information about the R-devel mailing list