Prereqs for installing packages with `devtools::install_github()`

I've never had an issue installing GitHub packages until recently, when I had trouble with two packages, including, which have C++ code. I solved the issue by following the instructions here to install XCode Command Line Tools on MacOS Mojave (R version 3.6.1)

My question is the following: are there general instructions that I can provide to students on what they need to use devtools::install_github()? Is the clang7 R binary or GNU Fortran 6.1 -- or anything else -- necessary for the packages with code that needs to be compiled? I did not install anything besides XCode CLI to install santoku, which was surprising, since this note from CRAN suggests otherwise:

"Important: this release uses Clang 7.0.0 and GNU Fortran 6.1, neither of which is supplied by Apple. If you wish to compile R packages from sources, you will need to download and install those tools - see the tools directory."

Thanks in advance for shedding light on this topic.

1 Like

This is a fantastic question, and one that I wish I had better guidance to offer or point to. I just switched to a new Apple computer and am having some compilation struggles myself. I will say that brew has been much more helpful to me than CRAN's tool list in the past... I have bad memories of wrestling through the CRAN tools on my last computer for weeks before trying brew and having my problems solved.

You could always push the students into and save the hassle of any of this :smile: But I definitely would love to see some better guidance on "R-dev-setup for Macs" out there. If I encounter anything life changing, I definitely plan to come back and share! :smiley:


Thanks, good to know about brew being more helpful than CRAN tools.