3

I'm running Linux and trying to compile an R package for use on a Mac. I could only find Linux->Windows and MacOS->Windows cross-compiling instructions. Does anybody know what I should do to compile a MacOS binary package for R?

Or, I'll settle for I build server. Again, there's a Windows build-server for R packages, but does anybody know of a MacOS build-server?

bokov
  • 3,444
  • 2
  • 31
  • 49
  • Depending on the details, you might consider setting up a project on http://rforge.net or http://r-forge.r-project.org , which incorporate build servers. Maybe not feasible for a one-off cross-build. – Ben Bolker Mar 19 '12 at 12:32
  • The author of the R snpMatrix package apparently do that regularly. http://sourceforge.net/projects/outmodedbonsai/files/ Consider asking him nicely. –  Oct 16 '12 at 05:53

2 Answers2

3

By first building a gcc crosscompiler -- see its documentation.

Available libraries may be a limiting factor, though. You'd have to rebuild everything from OS X you'd like to link against.

Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
0

Just a side note:

While in R packages can be installed (from pre-compiled binary packages for all major platforms Windows, Mac, Linux) there are also tools for building packages from source as part of the installation process.

Example for installation from source (more info):

install.packages("Simpsons", type="source")

Depending on the package (pure R or with some other language like C/C++ in it) and depending on the OS you use, you need additional tools to build the packages from source (e.g. Rtools for Windows, r-base-dev for Linux systems ...)

Community
  • 1
  • 1
petermeissner
  • 12,234
  • 5
  • 63
  • 63