Skip to content
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

consider requiring C++11 for 'long long' #37

Closed
kevinushey opened this issue Sep 6, 2016 · 9 comments
Closed

consider requiring C++11 for 'long long' #37

kevinushey opened this issue Sep 6, 2016 · 9 comments

Comments

@kevinushey
Copy link
Contributor

From @jjf234:

Hi Kevin,

I noticed over the past couple of days that most packages that rely on RcppParallel are now getting a 'long long' warning on CRAN for 'r-devel-windows-ix86+x86_64'. Here's a sample warning:

d:/RCompile/CRANpkg/lib/3.4/RcppParallel/include/tthread/tinythread.h:632:14: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]

For reference, these are the packages and 'long long' warning messages:

I've followed the steps on the RcppParallel site for creating R packages (http://rcppcore.github.io/RcppParallel/#r_packages) but was wondering if we need to also include or modify something else? If not, do you think this is an RcppParallel issue or a CRAN issue (since it only appeared in the last couple of days)?

Thanks in advance,
Jason

We might want to require C++11 support on Windows to avoid these CRAN warnings.

@eddelbuettel
Copy link
Member

@jjf234: Well. what makes you think the warning is new? AFAIK we had that for years, and I used the same trick (of turning on C++11, or just C++0x with g++-4.6.*) to get long long for a number of packages. (Though something may of course be different with RcppParallel, my experience is more with Rcpp in general).

@kevinushey
Copy link
Contributor Author

My guess is that this is a new warning as otherwise the CRAN maintainers would've rejected these package submissions.

@kevinushey
Copy link
Contributor Author

It's also possible that package authors just need to re-submit with CXX_STD = CXX11 in their Makevars or Makevars.win, to enforce adherence to the C++11 standard.

@eddelbuettel
Copy link
Member

We had those warnings for years. I even once tried an entire dummy package around it: RcppLongLong. So I still doubt these are new -- g++ has always complained about 'no long long' in that whole stupid context of C++98 not having them wheres C99 (IIRC, or maybe a 2003 interim C++ or something) had them yet we were not supposed to have access to it.

Anyway, all over now, apart from those base-layer packages we need to be able to compile with g++-4.6 or older.

@kevinushey
Copy link
Contributor Author

I should emphasize that these are compiler warnings that are now being treated as R CMD check warnings; hence why there is some more urgency in getting a fix.

For RcppParallel + client packages, I am guessing the simplest fix will be to just add users to add CXXSTD = CXX11 to their Makevars.

@kevinushey
Copy link
Contributor Author

And I'm guessing that a recent R-devel change is now causing R to compile with the -pedantic flag set on Windows, which triggers this warning on gcc 4.9.3.

@eddelbuettel
Copy link
Member

True dat on both counts. Cannot propagate a compilation standard down to a client when the "interface" is offering a directory with headers :-/

@kevinushey
Copy link
Contributor Author

I've confirmed that no warnings are emitted when compiling RcppParallel client packages with CXX_STD = CXX11. I've contacted the maintainers of downstream packages and instructed them to add this to their src/Makevars[.win] files, and let the CRAN team know as well.

@kevinushey
Copy link
Contributor Author

I'm going to update the RcppParallel documentation to suggest the use of CXX_STD = CXX11 for client packages, but otherwise I think we can consider this issue closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants