cmdstanr icon indicating copy to clipboard operation
cmdstanr copied to clipboard

issues of include stan math library in compile

Open MSQ-123 opened this issue 1 year ago • 0 comments

I tried to include stan math library by:

file <- file.path("./Txn_burst_test.stan")

mod <- cmdstan_model(file, compile = FALSE) mod$compile(include_paths = c('math-4.7.0/', '/usr/local/include/eigen3/', '/usr/local/include/eigen3/Eigen/'))

with errors:

Syntax error in '/usr/local/include/eigen3/Eigen/src/Core/util/Macros.h', line 23, column 38,

#define EIGEN_VERSION_AT_LEAST(x,y,z) (EIGEN_WORLD_VERSION>x || (EIGEN_WORLD_VERSION>=x &&
23: (EIGEN_MAJOR_VERSION>y || (EIGEN_MAJOR_VERSION>=y &&
^ 24: EIGEN_MINOR_VERSION>=z))))

Expected "functions {" or "data {" or "transformed data {" or "parameters {" or "transformed parameters {" or "model {" or "generated quantities {".

make: *** [/var/folders/2j/k27f0c2x3cddhvbwn5_t2x200000gn/T/Rtmp8SsQHu/model-547b6b851eca.hpp] Error 1

Error: An error occured during compilation! See the message above for more information.

It seems strang with this error

MSQ-123 avatar Jan 18 '24 02:01 MSQ-123