-
-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Source Cpp file failed due to math.h not found #922
Comments
@yangleicq c.f. coatless-mac/r-macos-rtools#11 (comment) On Mojave use: sudo installer -pkg \
/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg \
-target / @eddelbuettel please close. |
Thank you, it works. |
Does not work for me, installed
restarted R, restarted Mac
|
So your ducks are not in a row. See the Rcpp FAQ vignette. Ask for help on r-sig-mac. It works for CRAN on macOS too, as it does for thousands of users. |
RcppCore/Rcpp#922 xcode-select --install sudo installer -pkg \ /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg \ -target /
Running into the same problem on Catalina OS. Does the recommend fix for Mojave work as well just replace the build number? |
Not a macOS user myself but there were a number of posts on StackOverflow too once Catalina was released. As I recall, you need to reinstall some tools. This thread is not the best reference so I recommend we do not continue here. |
Unfortunately, those instructions are no longer relevant for macOS Catalona. See the guide @coatless has put together: https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/ Note also that the issue is handled by R itself in the recent patch releases of R 3.6.1 as well. If you're aggressively updating your OS, you should be aggressively updating your other software as well. Locking this thread for now as it is indeed not the best avenue for discussion. |
Recently, I updated my mac to macOS Mojave Version (10.14.1). After that Rcpp cannot build from source. For the example below, "example.cpp" is just the template code created by Rstudio.
I check the "/usr/local/clang4/bin/../include/c++/v1/math.h", it definitely is there.
I read the issue from coatless-mac/r-macos-clang#10 (comment), and followed the instruction to run
xcode-select --install
andsudo xcodebuild -license accept
, still ran into the same error message. I reinstalled R, Rcpp, Xcode, still the the same error message.Finally I changed
CXX=/usr/local/clang4/bin/clang++
toCXX=g++
in~/.R/Makevars
, and the error message is gone. Basically I can only change the compiler to make things work.The text was updated successfully, but these errors were encountered: