Hello there, I hope someone can help me.
I am using in R v. 4.4.1 on macOS 14.6.1 Chip M1
The full error report is:
Error in compileCode(f, code, language = language, verbose = verbose) :
using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.3)’using C++17using SDK: ‘MacOSX15.0.sdk’In file included from :1:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: ‘cmath’ file not found 679 | #include | ^~~~~~~1 error generated.make: *** [filefee91f1ef11d.o] Error 1
Error in sink(type = “output”) : invalid connection
Apparently a recent macos update moved around some of the files C++ relies on. We’ve heard some users say uninstalling and then re-installing xcode and the xcode command line tools has fixed this
Was there a solution to this issue? I am encountering the same issue. I have updated R, Rstudio, uninstalled and reinstalled rstan, but still get this error message
Error in compileCode(f, code, language = language, verbose = verbose) :
using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.4)’
using C++17
using SDK: ‘MacOSX15.1.sdk’
In file included from <built-in>:1:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Dense:1:
In file included from /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/Core:19:
/Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found
679 | #include <cmath>
| ^~~~~~~
1 error generated.
make: *** [filee2174fb1725.o] Error 1
Error in sink(type = "output") : invalid connection
I am having the same issue. My version of MacOS is Sanoma Version 14.7.1 (23H222)
Error in compileCode(f, code, language = language, verbose = verbose) : using C++ compiler: ‘Apple clang version 16.0.0 (clang-1600.0.26.4)’ using C++17 using SDK: ‘MacOSX15.1.sdk’ In file included from <built-in>:1: In file included from /Users/christinafillmore/Library/R/arm64/4.4/library/StanHeaders/include/stan/math/prim/fun/Eigen.hpp:22: In file included from /Users/christinafillmore/Library/R/arm64/4.4/library/RcppEigen/include/Eigen/Dense:1: In file included from /Users/christinafillmore/Library/R/arm64/4.4/library/RcppEigen/include/Eigen/Core:19: /Users/christinafillmore/Library/R/arm64/4.4/library/RcppEigen/include/Eigen/src/Core/util/Macros.h:679:10: fatal error: 'cmath' file not found 679 | #include <cmath> | ^~~~~~~ 1 error generated. make: *** [fileb6d43783d3f.o] Error 1 Error in sink(type = "output") : invalid connection
Both of your error messages are reporting that you have the MacOs 15.1 SDK, but you have an older operating system version. Apple seems to not be concerned with whether or not these play nice with each other, so the advice we have been giving is either update MacOS, or downgrade Xcode to a matching version