"If a package does have a src/Makevars[.win] file then also setting
the make variable ?CXX_STD? there is recommended,"
Avi
On Mon, Feb 6, 2023 at 10:58 PM I?aki Ucar <iucar at fedoraproject.org>
wrote:
On Mon, 6 Feb 2023 at 23:27, Avraham Adler <avraham.adler at gmail.com>
On Mon, Feb 6, 2023 at 9:46 PM Duncan Murdoch <
murdoch.duncan at gmail.com> wrote:
On 06/02/2023 4:01 p.m., Duncan Murdoch wrote:
On 06/02/2023 3:46 p.m., Winston Chang wrote:
I recently submitted a package to CRAN with "SystemRequirements:
This raises the following NOTE on R-devel, and I was asked to fix
resubmit:
* checking C++ specification ... NOTE
Specified C++11: please update to current default of C++17
If I understand correctly, I have two options, neither of which
1. Remove "SystemRequirements: C++11" entirely. The problem with
that on systems with older versions of R (3.6 and below, I
try to compile the package with an older C++ standard, which will
2. Update it to "SystemRequirements: C++17". The problem here is
systems that don't have a C++17 compiler, the package won't build
though the package only actually requires a C++11 compiler.
How should I deal with this?
Are you allowed to say "C++11 or C++17"?
Actually I can partially answer this: the test is not based on
SystemRequirements, but on the log of the build, which now contains
lines like this:
using C compiler: ?Apple clang version 12.0.0
using C++ compiler: ?Apple clang version 12.0.0
using C++11
using SDK: ?MacOSX11.1.sdk?
I get "using C++11" because of this line in Makevars:
CXX_STD = CXX11
So I guess the answer is to change your Makevars to make that line
conditional on running under an old version of R. If you figure out
to do that, could you post the recipe here?
I believe this is closely related to this email [1]. Dirk and I and
Aymeric have been going through the same issue with nloptr as well.
Our current opinion is to leave it out, as it would restrict more
users to demand C++17, which is unneeded, than to have users with over
a decade old compiler which does not have C++11. Dirk and Aymeric,
please chime in if I have misstated. Regardless, according to
Professor Ripley, if you require specific features, you should mark
them in _both_ Makevars and SystemRequirements, which is implied in
the "r-devel" version of WRE which adds the words "also" in section
1.2.4.
Could you please point to the specific passage? According to [1],
section 1.2.4, declaring the C++ standard in SystemRequirements is
only mandatory for C++17 or later.
[1]