I run a daily process which installs prophet to a Databricks cluster. As of this morning the process no longer works and the installation fails - this seems to coincide with an update to rstantools yesterday?
All of the dependencies seem to install without any problems but when I reach the prophet step I get the following:
* installing *source* package ‘prophet’ ...
** package ‘prophet’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I"../inst/include" -I"/databricks/spark/R/lib/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error -I"/usr/local/lib/R/site-library/BH/include" -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/databricks/spark/R/lib/rstan/include" -I"/databricks/spark/R/lib/StanHeaders/include" `"/usr/lib/R/bin/Rscript" -e "RcppParallel::CxxFlags()"` `"/usr/lib/R/bin/Rscript" -e "StanHeaders:::CxxFlags()"` -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++14 -I"/usr/share/R/include" -DNDEBUG -I"../inst/include" -I"/databricks/spark/R/lib/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -DBOOST_MATH_OVERFLOW_ERROR_POLICY=errno_on_error -I"/usr/local/lib/R/site-library/BH/include" -I"/usr/local/lib/R/site-library/Rcpp/include" -I"/usr/local/lib/R/site-library/RcppEigen/include" -I"/databricks/spark/R/lib/rstan/include" -I"/databricks/spark/R/lib/StanHeaders/include" `"/usr/lib/R/bin/Rscript" -e "RcppParallel::CxxFlags()"` `"/usr/lib/R/bin/Rscript" -e "StanHeaders:::CxxFlags()"` -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c stanExports_prophet.cc -o stanExports_prophet.o
In file included from /databricks/spark/R/lib/StanHeaders/include/stan/math/rev/core.hpp:8:0,
from /databricks/spark/R/lib/StanHeaders/include/stan/math/rev/mat.hpp:6,
from /databricks/spark/R/lib/StanHeaders/include/src/stan/model/log_prob_grad.hpp:4,
from /databricks/spark/R/lib/StanHeaders/include/src/stan/model/test_gradients.hpp:7,
from /databricks/spark/R/lib/StanHeaders/include/src/stan/services/diagnose/diagnose.hpp:10,
from /databricks/spark/R/lib/rstan/include/rstan/stan_fit.hpp:35,
from /databricks/spark/R/lib/rstan/include/rstan/rstaninc.hpp:3,
from stanExports_prophet.h:6,
from stanExports_prophet.cc:5:
/databricks/spark/R/lib/StanHeaders/include/stan/math/rev/core/init_chainablestack.hpp:8:41: fatal error: tbb/task_scheduler_observer.h: No such file or directory
compilation terminated.
/usr/lib/R/etc/Makeconf:175: recipe for target 'stanExports_prophet.o' failed
make: *** [stanExports_prophet.o] Error 1
ERROR: compilation failed for package ‘prophet’
* removing ‘/databricks/spark/R/lib/prophet’
I've tried installing older versions of rstantools and StanHeaders before installing prophet but it gives the same error. Can anyone help with why this error is occurring and how I can fix it?
EDIT: Installing version 2.0.0 of rstantools seems to have fixed the problem. I'm still not sure why the changes to 2.1.0 have caused an error or if this is a Databricks specific issue but at least I've gto a working version.
I installed rstantools 2.1.0 on my local machine and re-install prophet after that and didn't run into any issues. So it may be a databricks thing, but let's see if anyone else runs into this issue.
I don't think this is Databricks related, as I experienced the same issue, and do not use Databricks at all.
I can confirm that downgrading rstantools to 2.0.0 solved the installation issue for me too.
Here's what I did :
remove.packages('rstantools')
devtools::install_version("rstantools", version = "2.0.0")
install.packages('prophet')
A similar issue was reported on rstantools project a few minutes ago : https://github.com/stan-dev/rstantools/issues/76
Most helpful comment
I don't think this is Databricks related, as I experienced the same issue, and do not use Databricks at all.
I can confirm that downgrading rstantools to 2.0.0 solved the installation issue for me too.
Here's what I did :