[R-pkg-devel] Solaris x68 and C++17

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Tue Jan 19 18:26:51 CET 2021

On 19 January 2021 at 17:45, Florian Rupprecht wrote:
| Hello,
| the CRAN checks show an error for my newly released package 'httpgd' with
| 'r-patched-solaris-x86':
| Error: C++17 standard requested but CXX17 is not defined
| It seems like 'rcppsimdjson' had the same problem (
| https://github.com/eddelbuettel/rcppsimdjson/issues/7) and worked around it
| by disabling some functionality with compiler flags.

Clarification: An earlier release required C++17. Later releases relaxed
that. We only need C++11 these days. (And I just noticed that I should
updated Makevars.win accordingly but it really isn't a constraint with

The test is still in configure though, and it appears that Solaris is still
having the same issue.  Here is what I did (where configure is once again a
shell script):

   CXX17=`${R_HOME}/bin/R CMD config --all | awk '{print $1}' | grep "^CXX17$"`


   if test "x${CXX17}" = "x"; then
       echo "** this is not a system on which RcppSimdJson can be built"
       echo "** setting C++11 as a fallback"
       sed -e 's/@CXXSTD@/CXX11/' src/Makevars.in > src/Makevars

| I don't really know what the error means for the CRAN package. Will it be
| removed if it is not fixed? The R extension documentation states that C++17
| is supported since R 3.4.0, and I do have R >= 4.0.0 as well as C++17
| specified in the DESCRIPTION file.
| Or is there some way to indicate that Solaris is not supported? (I doubt I
| will ever have users running it.)

Fair question. I don't know the answer. As package authors we have no
sanctioned way to opt out.  FWIW I think the most 'aggressive' my packages
are in terms of C++ standard is currently C++14 (as e.g. RcppGeiger, which
isn't even on CRAN).

httpgd is a cool package by the way, I gave plotting to the webbrowser a
quick spin this morning.


https://dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org

More information about the R-package-devel mailing list