How do I cross compile R packages for MacOS from a Linux environment?

后端 未结 2 1825
星月不相逢
星月不相逢 2021-01-14 13:32

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 w

相关标签:
2条回答
  • 2021-01-14 14:11

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

    0 讨论(0)
  • 2021-01-14 14:14

    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.

    0 讨论(0)
提交回复
热议问题