0

I wanted to send this email to the R-devel mailing list but there's a problem to subscribe to this list. Here is the message I wrote.

I want to submit a package to CRAN, namely the OwenQ package. This package uses Rcpp and BH, the package which links to the Boost C++ libraries.

The package works flawlessly. However, the R CMD CHECK generates this warning:

  • checking whether package 'OwenQ' can be installed ... WARNING

Found the following significant warnings:
d:/RCompile/CRANpkg/lib/3.7/BH/include/boost/math/special_functions/detail/bernoulli_details.hpp:72:36: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]
d:/RCompile/CRANpkg/lib/3.7/BH/include/boost/math/special_functions/detail/bernoulli_details.hpp:96:9: warning: ISO C++ 1998 does not support 'long long' [-Wlong-long]

See 'd:/RCompile/CRANincoming/R-devel/OwenQ.Rcheck/00install.out' for details.

Regarding this warning, I wrote this comment to CRAN during my submission:

The WARNING from R CMD check is related to the boost library in the BH package. More precisely, it is related to the file bernoulli_details.hpp which is not used by my package (it uses only owens-t.hpp which does not include bernoulli_detail.hpp). I do not know how I could fix this warning.

What could I do to fix this warning? The warning says : "ISO C++ 1998 does not support 'long long'". Is there something to do to ask Rcpp to not use C++ 1998 ? (I'm ignorant in C++, I don't even know whether my question makes sense). What would be your advice otherwise ?

Stéphane Laurent
  • 75,186
  • 15
  • 119
  • 225
  • 1
    "I wanted to send this email to the R-devel mailing list but there's a problem to subscribe to this list" - Then why don't you work on solving *that* problem?? – Jesper Juhl Aug 24 '19 at 18:26
  • 1
    @JesperJuhl Because I think this question is also appropriate for SO. Simply... I should not have mentioned this, right. – Stéphane Laurent Aug 24 '19 at 18:33
  • 2
    This is old news, and a FAQ. The `long long` you get rid off very easily by turning C++11 on (which will be the default with the next R release); see a few of my packages or of course the _Writing R Extensions_ manual on how to do that. – Dirk Eddelbuettel Aug 24 '19 at 18:33
  • Thank you @DirkEddelbuettel, I will try to find an example in a package then. – Stéphane Laurent Aug 24 '19 at 18:34
  • Also, technical inaccuracy in your post: with BH we don't _link_. It is a header-only library. Wording is delicate but maybe use "accesses parts of" rather than "links". – Dirk Eddelbuettel Aug 24 '19 at 18:34
  • Also see question 3.13 in the [Rcpp FAQ](https://cloud.r-project.org/web/packages/Rcpp/vignettes/Rcpp-FAQ.pdf) – Dirk Eddelbuettel Aug 24 '19 at 18:37
  • 1
    Ok @DirkEddelbuettel, I appreciate your remark. Even in French I would have not know the correct wording, but it's worst in English ;-) – Stéphane Laurent Aug 24 '19 at 18:37
  • 2
    @DirkEddelbuettel I've found an example [here](https://github.com/jwood000/RcppAlgos) (with CXX11 instead of CXX14). SystemRequirements in the DESCRIPTION file and the Makevars files. Now I will try the online win builder, which is the one which generated this warning. – Stéphane Laurent Aug 24 '19 at 18:47

0 Answers0