Closed ghost closed 2 years ago
I have the exact same problem it seems, except concerning R packages requiring compilation generally. I noticed this after updating R, RStudio, Xcode and macOS. I posted an issue today and am waiting for any sort of reply.
Seeing that you've gotten no response here from the RStudio folks, I'm wondering if you've managed to solve this.
Hi I'm sorry I just saw this, unfortunately I have not been able to solve it and have not encountered a solution anywhere. Let me know if you figure anything out.
You could try the instructions on https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/, and you may want to try either installing the full version of XCode or removing the command line tools and reinstalling them.
Unfortunately it is hard to know exactly what the problem is on your machine just based on the description provided above.
Like at @gabe-schulman , I am also unable to solve the issue (which is similar to my #118). I've uninstalled both Xcode and CLT, but this didn't solve anything. As such, I'm unable to run Stan models in addition to testing my packages that utilize complied code. Oddly, my .R folder still contains a Makevars with Clang4 instead of Clang12. I am unable to edit and save the file in any way and following Coatless' instructions at https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos/ doesn't appear to help.
If ~/.R/Makevars
is pointing to the wrong or non-existent compiler than that is definitely your issue. You need to either edit the relevant entries or delete the file.
@jimhester Thanks! I did
sudo rm ~/.R/Makevars
to remove it, but upon trying to compile a simple Stan program as a test, I receive the following error:
Error in compileCode(f, code, language = language, verbose = verbose) :
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cmath:653:25: error: no template named
'numeric_limits' return _FloatBigger ? numeric_limits<_IntT>::max() : (numeric_limits<_IntT>::max() >> _Bits << _Bits);
^fatal error: too many errors emitted, stopping now [-ferror-limit=]20 errors generated.make: *** [file30b5c416eb3.o] Error 1
Error in sink(type = "output") : invalid connection
Any ideas?
Something is wrong with your include paths, R isn't able to find standard headers correctly. You can try some of the things in https://stackoverflow.com/questions/58628377/catalina-c-using-cmath-headers-yield-error-no-member-named-signbit-in-th and see if any work for you.
This was a while ago, I am closing it. Please open new issues if you still gave problems.
Hey there,
I had an issue with stan recently that led me to try reinstalling it. Now when I try to reinstall it, it prompts me to install build tools, and then fails to install it. I think it may be something to do with buildtools, which also won't install now (seems to be what's blocking the installation of stan). If I run
pkgbuild::check_build_tools(debug = TRUE)
I get the following error:
Error: Could not find tools necessary to compile a package Call
pkgbuild::check_build_tools(debug = TRUE)
to diagnose the problem.If I try and run
xcode-select --install
from terminal, I get this error
xcode-select: error: command line tools are already installed, use “Software Update” to install updates
and removing and reinstalling command line tools didn't help either. Anyone know what the issue may be?