Closed eddelbuettel closed 3 years ago
Suggested wording (before I go all PR on this):
SystemRequirements: A C++17 compiler as an optional requirement detected in configure, with C++11 as a fallback
Good enough?
Note that the current requirement for simdjson is C++11. We worked hard to wave the C++17 requirement.
I am, as you know, aware of that. What would help here is how to say that for CRAN, esp when the package they use is (by construction) something older than your GH repo.
@eddelbuettel Yes. I understand.
I put a commit in to get it done and off everybody's plate. If it needs refining that will be easy enough to do too.
The package is not currently installable without C++17, so I'd recommend simply putting SystemRequirements: C++17
. If memory serves, SystemRequirements: C++17
should also make the configure
script unnecessary.
Whoops. I missed that but you are right. With C++11 hardwired:
edd@rob:~/git/rcppsimdjson(feature/check_cxx11)$ install.r
* installing *source* package found in current working directory ...
* installing *source* package ‘RcppSimdJson’ ...
** using staged installation
** libs
ccache g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/Rcpp/include' -DSIMDJSON_NO_COMPUTED_GOTO -I../inst/include -fopenmp -fpic -g -O3 -Wall -pipe -pedantic -c RcppExports.cpp -o RcppExports.o
ccache g++ -std=gnu++11 -I"/usr/share/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/Rcpp/include' -DSIMDJSON_NO_COMPUTED_GOTO -I../inst/include -fopenmp -fpic -g -O3 -Wall -pipe -pedantic -c deserialize.cpp -o deserialize.o
deserialize.cpp:6:1: error: ‘SEXP’ does not name a type
6 | SEXP deserialize(SEXP json,
| ^~~~
deserialize.cpp:85:1: error: ‘SEXP’ does not name a type
85 | SEXP load(const Rcpp::CharacterVector& json,
| ^~~~
deserialize.cpp: In function ‘bool exceptions_enabled()’:
deserialize.cpp:167:5: error: ‘Rcpp’ has not been declared
167 | Rcpp::stop("`SIMDJSON_EXCEPTIONS` not defined");
| ^~~~
deserialize.cpp:169:12: error: ‘SIMDJSON_EXCEPTIONS’ was not declared in this scope
169 | return SIMDJSON_EXCEPTIONS == 1;
| ^~~~~~~~~~~~~~~~~~~
make: *** [/usr/lib/R/etc/Makeconf:177: deserialize.o] Error 1
ERROR: compilation failed for package ‘RcppSimdJson’
* removing ‘/usr/local/lib/R/site-library/RcppSimdJson’
* restoring previous ‘/usr/local/lib/R/site-library/RcppSimdJson’
Warning message:
In install.packages(pkgs = f, lib = lib, repos = if (isMatchingFile(f)) NULL else repos) :
installation of package ‘.’ had non-zero exit status
edd@rob:~/git/rcppsimdjson(feature/check_cxx11)$
I corrected that -- much appreciate the heads-up.
Another reason to get a new version up :)
Sorry I didn't catch the issue sooner!
CRAN sent us (and three others) a note:
and while I replied that it is more varied (as we test in configure and drop down to C++11 if we must) I adda note to SystemRequirements in DESCRIPTION to express this (also mentioning the conditionality).