robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.1k stars 340 forks source link

download from cran fails? #940

Closed alejandrohagan closed 1 year ago

alejandrohagan commented 1 year ago

I get the below error when trying to download from CRAN

In file included from calcBATS.cpp:1: calcBATS.h:38:1: error: ‘RcppExport’ does not name a type 38 | RcppExport SEXP calcBATS(SEXP ys, SEXP yHats, SEXP wTransposes, SEXP Fs, SEXP xs, SEXP gs, SEXP es ) ; | ^~~~~~ calcBATS.h:40:1: error: ‘RcppExport’ does not name a type 40 | RcppExport SEXP calcBATSFaster(SEXP ys, SEXP yHats, SEXP wTransposes, SEXP Fs, SEXP xs, SEXP gs, SEXP es, SEXP xNought_s, SEXP sPeriods_s, SEXP betaV, SEXP tau_s, SEXP p_s, SEXP q_s ) ; | ^~~~~~ In file included from calcBATS.cpp:1: calcBATS.h:42:1: error: ‘RcppExport’ does not name a type 42 | RcppExport SEXP calcWTilda(SEXP wTildaTransposes, SEXP Ds) ; | ^~~~~~ calcBATS.h:44:1: error: ‘RcppExport’ does not name a type 44 | RcppExport SEXP makeBATSWMatrix(SEXP smallPhi_s, SEXP sPeriods_s, SEXP arCoefs_s, SEXP maCoefs_s) ; | ^~~~~~ calcBATS.h:46:1: error: ‘RcppExport’ does not name a type 46 | RcppExport SEXP makeBATSGMatrix(SEXP alpha_s, SEXP beta_s, SEXP gammaVector_s, SEXP seasonalPeriods_s, SEXP p_s, SEXP q_s) ; | ^~~~~~ calcBATS.h:48:1: error: ‘RcppExport’ does not name a type 48 | RcppExport SEXP updateFMatrix(SEXP F_s, SEXP smallPhi_s, SEXP alpha_s, SEXP beta_s, SEXP gammaBold_s, SEXP ar_s, SEXP ma_s, SEXP tau_s) ; | ^~~~~~ calcBATS.h:50:1: error: ‘RcppExport’ does not name a type 50 | RcppExport SEXP updateWtransposeMatrix(SEXP wTranspose_s, SEXP smallPhi_s, SEXP tau_s, SEXP arCoefs_s, SEXP maCoefs_s, SEXP p_s, SEXP q_s) ; | ^~~~~~ calcBATS.h:52:1: error: ‘RcppExport’ does not name a type 52 | RcppExport SEXP updateGMatrix(SEXP g_s, SEXP gammaBold_s, SEXP alpha_s, SEXP beta_s, SEXP gammaVector_s, SEXP seasonalPeriods_s) ; | ^~~~~~ calcBATS.h:55:1: error: ‘RcppExport’ does not name a type 55 | RcppExport SEXP makeTBATSWMatrix(SEXP smallPhi_s, SEXP kVector_s, SEXP arCoefs_s, SEXP maCoefs_s, SEXP tau_s) ; | ^~~~~~ calcBATS.h:57:1: error: ‘RcppExport’ does not name a type 57 | RcppExport SEXP makeCIMatrix(SEXP k_s, SEXP m_s) ; | ^~~~~~ calcBATS.h:59:1: error: ‘RcppExport’ does not name a type 59 | RcppExport SEXP makeSIMatrix(SEXP k_s, SEXP m_s) ; | ^~~~~~ calcBATS.h:61:1: error: ‘RcppExport’ does not name a type 61 | RcppExport SEXP makeAIMatrix(SEXP C_s, SEXP S_s, SEXP k_s) ; | ^~~~~~ calcBATS.h:63:1: error: ‘RcppExport’ does not name a type 63 | RcppExport SEXP updateTBATSGammaBold(SEXP gammaBold_s, SEXP kVector_s, SEXP gammaOne_s, SEXP gammaTwo_s) ; | ^~~~~~ calcBATS.h:65:1: error: ‘RcppExport’ does not name a type 65 | RcppExport SEXP updateTBATSGMatrix(SEXP g_s, SEXP gammaBold_s, SEXP alpha_s, SEXP beta_s) ; | ^~~~~~ calcBATS.h:67:1: error: ‘RcppExport’ does not name a type 67 | RcppExport SEXP calcTBATSFaster(SEXP ys, SEXP yHats, SEXP wTransposes, SEXP Fs, SEXP xs, SEXP gs, SEXP es, SEXP xNought_s) ; | ^~~~~~ calcBATS.cpp:3:17: error: ‘Rcpp’ is not a namespace-name 3 | using namespace Rcpp ; | ^~~~ calcBATS.cpp:5:1: error: ‘SEXP’ does not name a type 5 | SEXP calcBATS(SEXP ys, SEXP yHats, SEXP wTransposes, SEXP Fs, SEXP xs, SEXP gs, SEXP es ){ | ^~~~ calcBATS.cpp:42:1: error: ‘SEXP’ does not name a type 42 | SEXP calcBATSFaster(SEXP ys, SEXP yHats, SEXP wTransposes, SEXP Fs, SEXP xs, SEXP gs, SEXP es, SEXP xNought_s, SEXP sPeriods_s, SEXP betaV, SEXP tau_s, SEXP p_s, SEXP q_s ) { | ^~~~ calcBATS.cpp:258:1: error: ‘SEXP’ does not name a type 258 | SEXP calcWTilda(SEXP wTildaTransposes, SEXP Ds) { | ^~~~ make: *** [/usr/lib/R/etc/Makeconf:177: calcBATS.o] Error 1 ERROR: compilation failed for package ‘forecast’

robjhyndman commented 1 year ago

Most likely your C++ installation does not match the requirements to compile the package. I suggest you install from binary via the Posit Package Manager. See https://packagemanager.rstudio.com/__docs__/admin/getting-started/user-guide/#configure-ide

alejandrohagan commented 1 year ago

Hi, tried to install the binaries but not having much luck. I wrote on the rcpp issue page and it seems to be an issue with my computer and rcpp. When i install your package on rstudio.cloud it works just fine.