Skip to content

Toolchain for macOS Sierra

March 1, 2017

Previously, I’ve described my setup on Windows 7 and macOS 10.9.x (Mavericks). Now that I’ve got a new MacBook Air, it’s time to update these instructions for macOS 10.12.x (Sierra). The setup described below is quite minimal, since I have limited disk space. See the article by Bhaskar Karambelkar‏ for an install based on homebrew that has all the bells & whistles.

The most significant change is the increased security features that were introduced in El Capitan, in an attempt to make OS X less vulnerable to rootkits and other script kiddie exploits. Upgrading caused a lot of headaches for users of R and LaTeX, since folders were magically moved to different locations on the hard drive. This is one of the reasons that I chose to skip Yosemite and El Capitan (OK, mostly it was sheer laziness…)

I use the Outlook email client because my work email is hosted on an Exchange server and I’ve found Mac mail very flaky for that. I also have co-authors that use Excel and Word, so having Office installed makes it easier to collaborate with them. Wherever possible, I use R Markdown with pandoc to generate Word documents programmatically, which saves me a lot of time in the long run (reproducible research FTW!). Other commercial software that I have installed includes MATLAB, Mathematica, Dropbox,  and Skype.

I was very pleased that I was able to install the Xcode command-line tools and the Gnu compilers without any problems. I can switch between clang++ and g++ by editing my ~/.R/Makeconf as described here. I also use XQuartz for X/Windows support. Of course, I have R and RStudio installed, using vecLib instead of the default R BLAS library. The instructions for switching BLAS libraries on OS X in Sect. 10.5 of the installation guide are out of date. On OS X Mavericks or later, type the following commands in Terminal:

cd /Library/Frameworks/R.framework/Resources/lib

ln -sf /System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Versions/Current/libBLAS.dylib libRblas.dylib

I have limited space on my solid state drive, so I decided to install the minimal BasicTeX with TeXShop for editing and compiling LaTeX documents. Overall, I think this is a better approach. I wouldn’t install all 10,000 packages from CRAN just in case I might need them, so I see no reason why CTAN should be any different. So far, I’ve had to install the following additional packages from CTAN using tlmgr:

  • preprint
  • algorithms
  • subfigure
  • bbm-macros
  • latexmk
  • multirow
  • morefloats
  • framed
  • titling
  • inconsolata
  • chicago
  • courier
  • helvetic

Even on Sierra, you need to run tlmgr as root, using:

sudo /usr/local/texlive/2016basic/bin/x86_64-darwin/tlmgr install algorithms

As with MS Word, you can generate LaTeX programmatically using knitr, but you still need to have pdfLatex installed to compile the PDF. I still use JabRef to manage all of my BibTeX files, since I haven’t found anything that does the job better. The installer for JabRef isn’t signed, so Gatekeeper will complain when you try to install it.

Filesystem      Size   Used  Avail Capacity  Mounted on
/dev/disk1     465Gi   54Gi  411Gi    12%    /
devfs          182Ki  182Ki    0Bi   100%    /dev
map -hosts       0Bi    0Bi    0Bi   100%    /net
map auto_home    0Bi    0Bi    0Bi   100%    /home

No major changes from my previous list. I’ve dropped Stata since the R package foreign does a good enough job of importing .dta files. Instead, I’ve got Mathematica installed to help out with my poor algebra skills. I did consider getting a 15in MacBook Pro instead of the Air, which could have had up to 16GB of RAM and 2TB solid state drive. The Thunderbolt 3 (USB-C) ports and touch bar would have been annoying, but the real deal breaker was Radeon instead of nVidia graphics. If I couldn’t use CUDA, then it just wasn’t worth the extra expense (plus, I’m not sure I’d trust myself with such an expensive laptop!). I’ve got a GeForce GTX 970M in my Windows machine if I need to run any CUDA code. ASUS laptops offer a lot more bang for your buck, but Mac OS is still nicer to use (particularly for developing software and writing academic papers). I think it’s well worth the extra money, if you can afford it.

Advertisements

From → C++, R, Toolchain

One Comment

Trackbacks & Pingbacks

  1. Fixing compile issues on SPARC Solaris | Matt Moores

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Let's Look at the Figures

David Firth's blog

Nicholas Tierney

Computational Bayesian statistics

One weiRd tip

Computational Bayesian statistics

Series B'log

discussion blog for JRSS Series B papers

Mad (Data) Scientist

Musings, useful code etc. on R and data science

R-bloggers

R news and tutorials contributed by (750) R bloggers

Another Astrostatistics Blog

The random musings of a reformed astronomer ...

Darren Wilkinson's research blog

Statistics, computing, data science, Bayes, stochastic modelling, systems biology and bioinformatics

CHANCE

Computational Bayesian statistics

StatsLife - Significance magazine

Computational Bayesian statistics

(badness 10000)

Computational Bayesian statistics

Igor's Blog

Computational Bayesian statistics

Statisfaction

I can't get no

Xi'an's Og

an attempt at bloggin, nothing more...

Sam Clifford

Postdoctoral Fellow, Bayesian Statistics, Aerosol Science

Bayesian Research & Applications Group

Frontier Research in Bayesian Methodology & Computation

%d bloggers like this: