[R-pkg-devel] clang issue

Grose, Daniel d@n@gro@e @end|ng |rom |@nc@@ter@@c@uk
Mon Aug 7 14:58:30 CEST 2023


Hi

My package submission fails due to --------



In file included from MeanAnomalyMV.cpp:7:
In file included from ./Functions_mean.h:4:
In file included from usr/local/clang-trunk/bin../include/c++/v1/vector:321:
In file included from
usr/local/clang-trunk/bin../include/c++/v1/__format/formatter_bool.h:20:
In file included from
usr/local/clang-trunk/bin../include/c++/v1/__format/formatter_integral.h:32:
In file included from usr/local/clang-trunk/bin../include/c++/v1/locale:202:
usr/local/clang-trunk/bin../include/c++/v1/__locale:962:34: error: too
many arguments provided to function-like macro invocation
   962 |     int length(state_type& __st, const extern_type* __frm,
const extern_type* __end, size_t __mx) const
       |                                  ^
/data/gannet/ripley/R/R-flang/include/Rinternals.h:968:9: note: macro
'length' defined here
   968 | #define length(x)               Rf_length(x)
       |         ^
...

Please define R_NO_REMAP and fix the fallout: it has Rinternals.h
included all over the place in both .h and .cpp files.  It must not be
included before <vector> nor any other C++ header.

Please fix and resubmit.

--------------------------------------------

I have tried to reproduce the error using clang-15 on Ubuntu-22.04, but everything seems fine --

 clang-15 -std=gnu++17 -I"/usr/share/R/include" -DNDEBUG -DBOOST_ALLOW_DEPRECATED_HEADERS -DR_NO_REMAP -I'/home/grosedj/R-packages/Rcpp/include' -I'/home/grosedj/R-packages/BH/include'    -fpic  -g -O2 -fdebug-prefix-map=/build/r-base-a3XuZ5/r-base-4.2.2.20221110=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2  -c MeanAnomalyMV.cpp -o MeanAnomalyMV.o


Any ideas ?

Many thanks,

Daniel Grose




	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list