‘compileCode(f, code, language = language, verbose = verbose)’:
Compilation ERROR, function(s)/method(s) not created! In file included from C:/R/R-3.6.2/library/StanHeaders/include/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17:0,
from C:/R/R-3.6.2/library/StanHeaders/include/stan/math/prim/arr.hpp:46,
from C:/R/R-3.6.2/library/StanHeaders/include/stan/math/prim/mat.hpp:344,
from C:/R/R-3.6.2/library/StanHeaders/include/stan/math/rev/mat.hpp:12,
from C:/R/R-3.6.2/library/StanHeaders/include/stan/math.hpp:4,
from C:/R/R-3.6.2/library/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file4b182f9b57cd.cpp:8:
C:/R/R-3.6.2/library/BH/include/boost/numeric/odeint.hpp:31:76: fatal error: boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp: No such file or directory #include <boost/numeric/odeint/stepper/runge_kutta_cash_karp54_classic.hpp>
I’m having the same issue on Windows 10. I wonder if it is related to this change in R 3.6.2:
Windows
The default standard for C++ in package installation is C++11 (as it has been on other platforms where available since R 3.6.0: the default toolchain on Windows was defaulting to C++98).
DEPRECATED AND DEFUNCT
Support for specifying C++98 in package installation is deprecated.
Support in R CMD config for F77, FCPIFCPLAGS, CPP, CXXCPP and CXX98 and similar is deprecated. (CPP is found from the system make and may well not be set.) Use $CC -E and $CXX -E instead of CPP and CXXCPP.
@bgoodri Still getting an error after installing BH, any pointers?
install.packages(“BH”, type = “win.binary”)
Installing package into ‘C:/Users/Cucumber15/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
trying URL ‘https://cran.rstudio.com/bin/windows/contrib/3.6/BH_1.72.0-1.zip’
Content type ‘application/zip’ length 18170647 bytes (17.3 MB)
downloaded 17.3 MB
package ‘BH’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Cucumber15\AppData\Local\Temp\Rtmp6jeg17\downloaded_packages
fit ← stan(file = ‘8schools.stan’, data = schools_dat)
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from C:/Users/Cucumber15/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/arr/functor/integrate_ode_rk45.hpp:17:0,
from C:/Users/Cucumber15/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/arr.hpp:46,
from C:/Users/Cucumber15/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat.hpp:344,
from C:/Users/Cucumber15/Documents/R/win-library/3.6/StanHeaders/include/stan/math/rev/mat.hpp:12,
from C:/Users/Cucumber15/Documents/R/win-library/3.6/StanHeaders/include/stan/math.hpp:4,
from C:/Users/Cucumber15/Documents/R/win-library/3.6/StanHeaders/include/src/stan/model/model_header.hpp:4,
from file3d787ed77a85.cpp:8:
C:/Users/Cucumber15/Documents/R/win-library/3.6/BH/include/boost/numeric/odeint.hpp:31:76: fatal error: boost/numeric/odeint/stepper/runge_kutta_cash_karp54_clas
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command ‘C:/PROGRA~1/R/R-36~1.2/bin/x64/R CMD SHLIB file3d787ed77a85.cpp 2> file3d787ed77a85.cpp.err.txt’ had status 1
Error in sink(type = “output”) : invalid connection
Another weird thing is now that I can fit the 8 schools example is that I got a divergent transition warning. I just ran the line a few times and it went away however.
MCMC is not deterministic (without a fixed seed), so sometimes you get a divergent transition or two and sometimes you don’t. All the more reason to run at least four chains.