I am aware of many other questions where this has been asked, but I have not found any that concerns Mac OS Catalina. I have seen this and this are relevant.
I recently updated my Mac to Catalina, and I am trying to update my Rcpp package but I am unable to install it, as I do not have the headers (or at least R cannot access them). I have tried using:
xcode-select --install
and
sudo xcodebuild -license accept
which usually work for me when I update my system, but both had no success when I tried to install my package.
My Xcode version is 11.2, and so I have tried to download the command line tools from Apple. I downloaded 'Command Line Tools for Xcode 11.2' from October 23, 2019. But this has not made my code work.
The full error that I am getting is:
> devtools::install()
Skipping 2 packages not available: layeredBB, fusionAnalysis
✔ checking for file ‘/Users/rchan/OneDrive - The Alan Turing Institute/freefor7/2019-07-02_Rcpp_exp_4_fusion/exp4FusionRCPP/DESCRIPTION’ ...
─ preparing ‘exp4FusionRCPP’: (448ms)
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘exp4FusionRCPP_0.0.0.9000.tar.gz’
Warning: invalid uid value replaced by that for user 'nobody'
Warning: invalid gid value replaced by that for user 'nobody'
Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \
/var/folders/yv/rrnzy52j137d266mztz356n1vg32qz/T//RtmpTYGCfO/exp4FusionRCPP_0.0.0.9000.tar.gz \
--install-tests
* installing to library ‘/Users/rchan/Library/R/3.5/library’
* installing *source* package ‘exp4FusionRCPP’ ...
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Users/rchan/Library/R/3.5/library/Rcpp/include" -I"/Users/rchan/Library/R/3.5/library/layeredBB/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/stats/include" -I"/Users/rchan/Library/R/3.5/library/BH/include" -I/usr/local/include -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
In file included from RcppExports.cpp:4:
In file included from /Users/rchan/Library/R/3.5/library/Rcpp/include/Rcpp.h:27:
In file included from /Users/rchan/Library/R/3.5/library/Rcpp/include/RcppCommon.h:29:
In file included from /Users/rchan/Library/R/3.5/library/Rcpp/include/Rcpp/r/headers.h:67:
In file included from /Users/rchan/Library/R/3.5/library/Rcpp/include/Rcpp/platform/compiler.h:100:
In file included from /usr/local/clang8/bin/../include/c++/v1/cmath:305:
/usr/local/clang8/bin/../include/c++/v1/math.h:301:15: fatal error: 'math.h' file not found
#include_next <math.h>
^~~~~~~~
1 error generated.
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘exp4FusionRCPP’
* removing ‘/Users/rchan/Library/R/3.5/library/exp4FusionRCPP’
* restoring previous ‘/Users/rchan/Library/R/3.5/library/exp4FusionRCPP’
Apologies if this has been answered somewhere, but I have only seen answers for Mojave and none for Catalina.