-
Notifications
You must be signed in to change notification settings - Fork 31
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
What C++ version should CXX_STD have? #107
Comments
Is someone complaining about it? Seems fine to leave it as C++11. Must be loads of other packages doing that as well. Alternative is to just not specify anything, and allow R to choose a C++11-compatible compiler. Almost everything should be compatible across C++ versions, unless you're fiddling with some of the edge cases (e.g., |
No I just saw some packages being changed to deal with this recently which made me take a look at the current R guidelines. I would remove the specification but:
Probably I'll just pretend I never saw any of this and leave things as they are. |
Returning to this, for the RcppHNSW package, |
I'm not sure if this is relevant, but I'm (suddenly) having errors compiling uwot in a Docker container using
|
Thanks for the report @jeremydavisturak. I submitted a new version of Are you building directly from the |
@jlmelville I'm doing an install straight from CRAN (install.packages), but I can try devtools:: install_github ; just let me know the branch or ref to point to |
This dockerfile can be used to test (my goal was to install Seurat, and uwot is a dependency).
|
Am I right in thinking that your base image is: FROM r-base:4.0.5 That might be part of the problem as that image is 3 years old. Any chance you can try building with a newer R? The only testing I've done (and the only CRAN checks) are for the development version of R, the current version of R (4.3.3) and the previous minor version (4.2.3) which was released over a year ago. |
@jeremydavisturak I tried running the
|
Also @jeremydavisturak now I have looked closer at this: if you are working with a specific old version of R, a specific old version of |
I'm also getting this error by installing source code from CRAN. I've also encounted this in some other packages, like this and this |
@fenguoerbian what version of R are you using? From R 4.3 onwards, my understanding is that C++17 is assumed to be the standard. Adding I build from source on Windows, Linux and Mac, and also as part of CI on Github Actions and again with rhub as part of preparation for CRAN submissions. None of these platforms fail to compile. If you need this, can you add |
@jlmelville I'm using R 4.2.2 on windows. If that's the case I'll just upgrade to 4.3 at some point. Also I believe adding |
Hi @jlmelville I tried to install uwot a few times (on Mac), in different R version (4.4, 4.3, 4.2), from CRAN using install.packages() or devtools:: install_github. Each time I got the same error messages (see below). The thing is, when I installed some other packages such as sctransform, c++17 was used. So I dont understand why c++11 was used when I tried to install uwot... Thanks.
|
@DawnSLin89 that's confusing to me. Both the Mac github actions and my personal Mac build
I assume you have all the XCode development tools installed? If not, maybe try that. |
@jlmelville FYI for the old Seurat version we're trying to support, I did get to work (but it's now breaking due to something in the OS for R 4.0.5 ...)
|
Makevars
has had:CXX_STD = CXX11
for ages, but
https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-C_002b_002b-code says:
Seems like messing this up will be a great way to get booted off CRAN. I have no idea what the best choice is now. C++14?
The text was updated successfully, but these errors were encountered: