[R-pkg-devel] [External] Re: clang issue
Ivan Krylov
kry|ov@r00t @end|ng |rom gm@||@com
Mon Aug 7 20:01:28 CEST 2023
В Mon, 7 Aug 2023 15:52:38 +0000
"Grose, Daniel" <dan.grose using lancaster.ac.uk> пишет:
> https://github.com/grosed/anomaly
Ah, so this is why I couldn't find your package on CRAN. Now I can see
the compiler log, together with the compiler command line:
https://www.stats.ox.ac.uk/pub/bdr/clang17/anomaly.log
It looks like -DR_NO_REMAP is missing from src/Makevars, both in the
last archived version on CRAN and in the version-4.3.0 branch, but if
you add it to the line with PKG_CPPFLAGS, it should work.
If it's too much to fix, at least make sure to move any R-related
#includes below the system #includes. MeanAnomalyMV.cpp originally blew
up because (1) -DR_NO_REMAP was missing from the compiler command line,
(2) Rinternals.h was included, which provides #define length(x), and
(3) a standard C++ header was included, which tried to define a
function named length. Moving the R headers below the standard C++
headers would have prevented it.
It may also help to change the interface of MeanAnomalyMV so that it
either (1) uses Rcpp, enjoying built-in R_NO_REMAP or (2) works purely
in terms of R and C types, avoiding the need to #include <vector> and
<string>.
Hope you'll succeed in getting the package back in shape!
--
Best regards,
Ivan
More information about the R-package-devel
mailing list