Skip to content

Please test R 4.0.0 pre-releases!

2 messages · Patrick Schratz, Simon Urbanek

#
Thanks Simon,

This simplifies things a lot and clears up the process. While the instructions on?https://mac.r-project.org/?are more clear now I think there is still simplification needed for the install process and custom modifications that are needed.
This not only applies to the dev page but finally also to production end users if the SDK 10.15 issues (see below) persists.

I?ve scripted all installation steps (R-devel, gfortran, SDK 10.13) and will probably write a blog post about it to make the R community more aware about it. Let me know if anything is wrong about it - otherwise I?ll use the code below in the blog post.

# install R-devel
wget https://mac.r-project.org/el-capitan/R-devel/R-devel-el-capitan-sa-x86_64.tar.gz
sudo tar fvxz R*.tar.gz -C /
rm R-devel-el-capitan-sa-x86_64.tar.gz

# install gfortran
wget https://github.com/fxcoudert/gfortran-for-macOS/releases/download/8.2/gfortran-8.2-Mojave.dmg
sudo hdiutil attach gfortran*.dmg
sudo installer -package /Volumes/gfortran*/gfortran*/gfortran*.pkg -target /
sudo hdiutil detach /Volumes/gfortran-8.2-Mojave

# install SDK10.13
wget https://github.com/phracker/MacOSX-SDKs/releases/download/10.15/MacOSX10.13.sdk.tar.xz
tar fvxz MacOSX10.13.sdk.tar.xz
sudo mv MacOSX10.13.sdk /Library/Developer/CommandLineTools/SDKs/
rm -rf MacOSX10.13*

In addition people need to set custom CFLAGS in ~/.R/Makevars to actually use it:

CFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk
CCFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk
CXXFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk
CPPFLAGS=-isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk

In addition there really seem to be major problems regarding the 10.15 SDK. For example, {igraph} which is a package on which lots of other packages depend, cannot be installed from source with SDK 10.15 but works with SDK 10.13.

Patrick
On 1. Apr 2020, 09:38 +0200, Simon Urbanek <simon.urbanek at r-project.org>, wrote:

  
  
#
Patrick,

firstly, please don't post such things - they are often wrong (as are parts of what you included it this e-mail) and it's impossible for us to track all blogs that have incorrect advice. Unfortunately, a lot of the issues we see out there are due to people finding bad advice and using it. Ideally, it should be sufficient to point to the official R documentation since that is the canonical source. If you post a blog, it should point to the official documentation. If that documentation is missing or not covering a need, please post here so we can fix it. It is more important that the official source is complete and much better for the community than to have random tidbits that may or may not be correct floating around.

As for the script, please do not use R tar balls - first, you're picking the wrong one (there is no R-devel for el-capitan. R 4.0.0 pre-releases are in R-4-0-branch and they are built for high sierra). Second, the tar ball doesn't have the entitlements enabled so it doesn't match the release. Please use the signed R package. This may change, but with the complications of the Apple notarization process that's what it is today.

Then there is the question of the SDK. What are you trying to setup here? What you posted here has nothing to do with the CRAN setup. You don't need 10.13 SDK to compile igraph, it compiles just fine using stock command line tools on High Sierra which is what we use on CRAN. You can, of course, pick any SDK you like, but please don't tell people that's what they should do. One of the most annoying issues is that people are recommending messing with Makevars which is incredibly fragile and will cause things to break left and right with any update. It's ok to do that for a very special purpose, but no regular user should have Makevars in their home.

So if you really want to serve the community, please suggest improvements to the official documentation and post them here. If you have special needs, ask about them here.

Thanks,
Simon