[R-pkg-devel] Solaris x68 and C++17
Thank you for the quick response and the information. For some reason the Solaris results have now disappeared completely from the check results page. (Now there are some additional issues I have to look into.) I will wait for the rest of the checks to complete and might write a similar shell script to yours if it's needed. Thanks for the code snippets. Glad you liked it! Florian
Tue, Jan 19, 2021, 18:26 Dirk Eddelbuettel <edd at debian.org> wrote:
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 Rtools4). 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 else | 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. Dirk -- https://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org