############################################################################## ############################################################################## ### ### Running command: ### ### /Library/Frameworks/R.framework/Resources/bin/R CMD build --keep-empty-dirs --no-resave-data cn.mops ### ############################################################################## ############################################################################## * checking for file ‘cn.mops/DESCRIPTION’ ... OK * preparing ‘cn.mops’: * checking DESCRIPTION meta-information ... OK * cleaning src * installing the package to build vignettes ----------------------------------- * installing *source* package ‘cn.mops’ ... ** using staged installation ** libs using C compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using C++ compiler: ‘Apple clang version 14.0.0 (clang-1400.0.29.202)’ using SDK: ‘MacOSX11.3.sdk’ clang -arch x86_64 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -c R_init_cnmops.c -o R_init_cnmops.o clang++ -arch x86_64 -std=gnu++17 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/opt/R/x86_64/include -fPIC -falign-functions=64 -Wall -g -O2 -DR_NO_REMAP -c cnmops.cpp -o cnmops.o cnmops.cpp:18:10: error: use of undeclared identifier 'length' int N = length(xS); ^ cnmops.cpp:19:10: error: use of undeclared identifier 'length' int n = length(IS); ^ cnmops.cpp:30:29: error: expected '(' for function-style cast or type construction double *lg=Calloc(N, double); ~~~~~~^ cnmops.cpp:42:25: error: use of undeclared identifier 'allocMatrix'; did you mean 'Rf_allocMatrix'? PROTECT(alpha_ik_RET = allocMatrix(REALSXP, n, N)); ^~~~~~~~~~~ Rf_allocMatrix /Library/Frameworks/R.framework/Resources/include/Rinternals.h:388:31: note: expanded from macro 'PROTECT' #define PROTECT(s) Rf_protect(s) ^ /Library/Frameworks/R.framework/Resources/include/Rinternals.h:504:6: note: 'Rf_allocMatrix' declared here SEXP Rf_allocMatrix(SEXPTYPE, int, int); ^ cnmops.cpp:46:24: error: use of undeclared identifier 'allocVector'; did you mean 'Rf_allocVector'? PROTECT(alpha_i_RET = allocVector(REALSXP, n)); ^~~~~~~~~~~ Rf_allocVector /Library/Frameworks/R.framework/Resources/include/Rinternals.h:388:31: note: expanded from macro 'PROTECT' #define PROTECT(s) Rf_protect(s) ^ /Library/Frameworks/R.framework/Resources/include/Rinternals.h:1078:10: note: 'Rf_allocVector' declared here SEXP Rf_allocVector(SEXPTYPE, R_xlen_t); ^ cnmops.cpp:50:26: error: use of undeclared identifier 'allocVector'; did you mean 'Rf_allocVector'? PROTECT(alpha_est_RET = allocVector(REALSXP, n)); ^~~~~~~~~~~ Rf_allocVector /Library/Frameworks/R.framework/Resources/include/Rinternals.h:388:31: note: expanded from macro 'PROTECT' #define PROTECT(s) Rf_protect(s) ^ /Library/Frameworks/R.framework/Resources/include/Rinternals.h:1078:10: note: 'Rf_allocVector' declared here SEXP Rf_allocVector(SEXPTYPE, R_xlen_t); ^ cnmops.cpp:54:27: error: use of undeclared identifier 'allocVector'; did you mean 'Rf_allocVector'? PROTECT(lambda_est_RET = allocVector(REALSXP, n)); ^~~~~~~~~~~ Rf_allocVector /Library/Frameworks/R.framework/Resources/include/Rinternals.h:388:31: note: expanded from macro 'PROTECT' #define PROTECT(s) Rf_protect(s) ^ /Library/Frameworks/R.framework/Resources/include/Rinternals.h:1078:10: note: 'Rf_allocVector' declared here SEXP Rf_allocVector(SEXPTYPE, R_xlen_t); ^ cnmops.cpp:113:2: error: use of undeclared identifier 'Free'; did you mean 'free'? Free(lg); ^~~~ free /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/usr/include/malloc/_malloc.h:42:7: note: 'free' declared here void free(void *); ^ cnmops.cpp:116:21: error: use of undeclared identifier 'allocVector'; did you mean 'Rf_allocVector'? PROTECT(namesRET = allocVector(STRSXP, 4)); ^~~~~~~~~~~ Rf_allocVector /Library/Frameworks/R.framework/Resources/include/Rinternals.h:388:31: note: expanded from macro 'PROTECT' #define PROTECT(s) Rf_protect(s) ^ /Library/Frameworks/R.framework/Resources/include/Rinternals.h:1078:10: note: 'Rf_allocVector' declared here SEXP Rf_allocVector(SEXPTYPE, R_xlen_t); ^ cnmops.cpp:117:30: error: use of undeclared identifier 'mkChar' SET_STRING_ELT(namesRET, 0, mkChar("alpha.ik")); ^ cnmops.cpp:118:30: error: use of undeclared identifier 'mkChar' SET_STRING_ELT(namesRET, 1, mkChar("alpha.i")); ^ cnmops.cpp:119:30: error: use of undeclared identifier 'mkChar' SET_STRING_ELT(namesRET, 2, mkChar("alpha.est")); ^ cnmops.cpp:120:30: error: use of undeclared identifier 'mkChar' SET_STRING_ELT(namesRET, 3, mkChar("lambda.est")); ^ cnmops.cpp:123:16: error: use of undeclared identifier 'allocVector'; did you mean 'Rf_allocVector'? PROTECT(RET = allocVector(VECSXP, 4)); ^~~~~~~~~~~ Rf_allocVector /Library/Frameworks/R.framework/Resources/include/Rinternals.h:388:31: note: expanded from macro 'PROTECT' #define PROTECT(s) Rf_protect(s) ^ /Library/Frameworks/R.framework/Resources/include/Rinternals.h:1078:10: note: 'Rf_allocVector' declared here SEXP Rf_allocVector(SEXPTYPE, R_xlen_t); ^ cnmops.cpp:128:2: error: use of undeclared identifier 'setAttrib'; did you mean 'Rf_setAttrib'? setAttrib(RET, R_NamesSymbol, namesRET); ^~~~~~~~~ Rf_setAttrib /Library/Frameworks/R.framework/Resources/include/Rinternals.h:580:6: note: 'Rf_setAttrib' declared here SEXP Rf_setAttrib(SEXP, SEXP, SEXP); ^ 15 errors generated. make: *** [cnmops.o] Error 1 ERROR: compilation failed for package ‘cn.mops’ * removing ‘/private/tmp/RtmpUWgeKr/Rinst481e15f357c9/cn.mops’ ----------------------------------- ERROR: package installation failed