-
-
Notifications
You must be signed in to change notification settings - Fork 216
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
Rcpp broken by Mac OS Big Sur and Xcode 12.5 #1160
Comments
@coatless @kevinushey and/or other macOS users: can you chime in? We do have the pinned RcppArmadillo issue #268 at RcppCore/RcppArmadillo#268 but nothing for Rcpp. Maybe we need something to guide users in need who mistakenly think our code was a fault (and who cannot seem to even look at CRAN status results for Rcpp which beg to differ too... |
Hi, Following the instructions on that post (though they're a little out of date) does not fix the problem. This issue occurred right after upgrading to Big Sur and Xcode 12.5. I suspect some issue in the automatic way these and/or xcode-command line tools are configured. I agree with your comment that it's not a bug in Rcpp, but I assume this issue is still relevant to Rcpp users who will likely experience this once they upgrade their OS. |
Traveling at the moment. But, I can say that the macOS build is a okay with Rcpp. This is a local build issue. |
You are using Xcode instead of the Xcode CLI based on the compilation statements. Are you sure you setup the CLI tools? The path should be '''sh /Library/Developer/CommandLineTools not /Applications/Xcode.app Check path with xcode-select --print-path |
Hi, Yes I installed Xcode CLI:
Is that not the correct configuration? That is the default configuration after uninstalling and re-installing Xcode 12.5 on Big Sur. But I think I found the problem. Brew installed various files and symlinks in /usr/local/include. The /usr/local/include path was searched first during compilation and conflicted with other headers in the Xcode library paths. Deleting /usr/local/include and reinstalling Xcode and basic brew packages (but not brew packages for gcc and other compilers) seems to have fixed the problem. So the problem was a conflict between brew and Xcode. |
Closing this as it was a local setup issue. Thanks all. |
For the future googler, it is ill-advised to use the homebrew ( If using homebrew is a requirement, then a much better idea is to use the cask version of R, e.g. First, note that you are using Secondly, regarding the problem on compilation tools used, the path issue would likely get picked up. brew doctor Let's say homebrew isn't installed, but you were using Xcode.app for heavy macOS development instead of CommandLineTools. This can be picked programmatically up by typing in Terminal: xcode-select --print-path If the path is: /Applications/Xcode.app This indicates that the build toolchain is using Xcode-related suite of compilers. This needs to be switched to using the Xcode CLT. The switch is done in Terminal by typing: sudo xcode-select -s /Library/Developer/CommandLineTools |
Note also that in my case it was not a brew R installation that was the problem. I was using standard R. It was brew installation of other packages that put files in /usr/local/include that conflicted with Xcode. I don't know exactly which brew package it was, but it wasn't R, because I didn't have a brew R installation. It may have been gcc, or something like that. |
Rcpp gives many compilation errors on new MacOS Big Sur 11.3.1 and Xcode 12.5.
Uninstalling and re-installing Xcode does not fix the problem. Every other possible way of installing and reinstalling xcode command line tools does not help.
The text was updated successfully, but these errors were encountered: