Skip to content

Instantly share code, notes, and snippets.

@wzrzt
Forked from mjsteinbaugh/DEPRECATED-rcpp-mojave.txt
Created December 13, 2018 07:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wzrzt/dcbbaed5a40a4a685d37d1d5e6374e62 to your computer and use it in GitHub Desktop.
Save wzrzt/dcbbaed5a40a4a685d37d1d5e6374e62 to your computer and use it in GitHub Desktop.
Rcpp macOS Mojave header fix
# macOS Mojave fixes
# Cpp headers are messed up on Mojave.
# https://thecoatlessprofessor.com/programming/r-compiler-tools-for-rcpp-on-macos/#comment-4116064190
# Setting `CPPFLAGS` in `~/.R/Makevars` doesn't work.
CPPFLAGS="-isystem /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
# The second option is to hard install the headers back to the default location of previous macOS builds
# e.g. /usr/local.
# This works but isn't a great solution since it requires modifying Mojave.
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
# installer: Package name is macOS_SDK_headers_for_macOS_10.14
# installer: Installing at base path /
# installer: The install was successful.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment