Skip to content

Upgrading to macOS Sierra

May 1, 2017

Now that I have a new MacBook Air, I decided to upgrade my old machine to the latest version of macOS. Updates for Microsoft Office are no longer available for OS 10.9 (Mavericks) or earlier, so this upgrade was long overdue. Installing the 5GB upgrade took about an hour, but since I was upgrading from Mavericks this broke a bunch of installed software. If you are a software developer, I’d advise you to set aside an afternoon to fix this mess.

The first surprise was that the Xcode command-line tools were no longer working:

$ g++ --version

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

These needed to be reinstalled from scratch:

xcode-select --install

Unfortunately, the latest (January 2017) CUDA Toolkit 8.0.61 is incompatible with Apple LLVM 8.1.0:

nvcc fatal   : The version ('80000') of the host compiler ('Apple clang') is not supported

So after upgrading the XCode command-line tools, I then needed to downgrade again.

The Gnu toolchain was still working, since it was correctly installed in /usr/local/bin, but it was now giving a worrying error message:

gfortran: warning: couldn’t understand kern.osversion ‘16.4.0

I decided it was better to reinstall these as well. This gave me version 6.3.0 of GCC, g++ and gfortran.

R still ran from inside RStudio, but it was no longer on the PATH. I would advise reinstalling R from scratch, so that the R executable will be located in /usr/local/bin where it belongs, rather than wherever the macOS upgrade scripts have relocated it to! I upgraded to the latest RStudio as well, for good measure.

Likewise with LaTeX, /Library/TeX/texbin was hosed. I could no longer compile any TeX documents, even from inside TeXShop or RStudio. Happily, this did not require a reinstall, just a modification of the PATH and the TeXShop preferences to point to the new location. RStudio ignores any .profile or .bashrc in your home directory, so you need to edit the system-wide PATH:

sudo vi /etc/paths

Screen Shot 2017-03-14 at 14.09.42

Java apps (such as JabRef) gave an interesting error message:

To open "JabRef" you need to install the legacy Java SE 6 runtime.

…which is yet another reason to abandon Java! But alas, JabRef remains the best reference manager for BibTeX files. Certainly, the one that comes with MacTeX is pretty awful. If only they had used Qt, like RStudio does.

As for MATLAB, the news is not good:

If you are running MATLAB R2013b or earlier a patch for these releases is not available. Please update to MATLAB R2014a or later to use MATLAB on macOS Sierra.

I tried installing R2014a as suggested above, but it just crashes with a segfault immediately upon launch. R2017a appears to be running fine, but of course this can create compatibility issues with existing code. For all of the idiosyncrasies in R that are due to backwards compatibility with S, at least they are careful not to arbitrarily break things every couple of years! If you’re distributing your research code in MATLAB, you might as well be writing in Fortran and storing it on punch cards in a shoebox.


From → Toolchain

Leave a Comment

Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s


Computational Bayesian statistics

Bayes' Food Cake

A bit of statistics, a bit of cakes. - Blogs to Learn R from the Community

Computational Bayesian statistics

Richard Everitt's blog

Computational Bayesian statistics

Let's Look at the Figures

David Firth's blog

Nicholas Tierney

Computational Bayesian statistics

Sweet Tea, Science

Two southern scientistas will be bringing you all that is awesome in STEM as we complete our PhDs. Ecology, statistics, sass.

Mad (Data) Scientist

Musings, useful code etc. on R and data science

Darren Wilkinson's blog

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

(badness 10000)

Computational Bayesian statistics

Igor Kromin

Computational Bayesian statistics


I can't get no

Xi'an's Og

an attempt at bloggin, nothing more...

Sam Clifford

Postdoctoral Fellow, Bayesian Statistics, Aerosol Science

%d bloggers like this: