This is the latest output that I got when running the example:
stn_md> stancode ← ‘data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}’
stn_md> mod ← stan_model(model_code = stancode, verbose = TRUE)
TRANSLATING MODEL ‘’ FROM Stan CODE TO C++ CODE NOW.
COMPILING THE C++ CODE FOR MODEL ‘anon_model’ NOW.
OS: x86_64, mingw32; rstan: 2.26.13; Rcpp: 1.0.9; inline: 0.3.19
setting environment variables:
PKG_LIBS = “C:/Users/sterr/AppData/Local/R/win-library/4.2/rstan/lib/x64/libStanServices.a” -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64" -ltbb -LC:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64 -ltbb -ltbbmalloc
PKG_CPPFLAGS = -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/Rcpp/include/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppEigen/include/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppEigen/include/unsupported" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/BH/include" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/include/src/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/include/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/include/" -DRCPP_PARALLEL_USE_TBB=1 -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -include “C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/include/stan/math/prim/fun/Eigen.hpp” -std=c++1y
Program source :
1 :
2 : // includes from the plugin
3 : // [[Rcpp::plugins(cpp14)]]
4 :
5 :
lines 6-360 excluded
361 :
362 : .method(
363 : “call_sampler”,
364 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::call_sampler)
365 : .method(
366 : “param_names”,
367 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_names)
368 : .method(“param_names_oi”,
369 : &rstan::stan_fit<stan_model,
370 : boost::random::ecuyer1988>::param_names_oi)
371 : .method(“param_fnames_oi”,
372 : &rstan::stan_fit<stan_model,
373 : boost::random::ecuyer1988>::param_fnames_oi)
374 : .method(
375 : “param_dims”,
376 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_dims)
377 : .method(“param_dims_oi”,
378 : &rstan::stan_fit<stan_model,
379 : boost::random::ecuyer1988>::param_dims_oi)
380 : .method(“update_param_oi”,
381 : &rstan::stan_fit<stan_model,
382 : boost::random::ecuyer1988>::update_param_oi)
383 : .method(“param_oi_tidx”,
384 : &rstan::stan_fit<stan_model,
385 : boost::random::ecuyer1988>::param_oi_tidx)
386 : .method(“grad_log_prob”,
387 : &rstan::stan_fit<stan_model,
388 : boost::random::ecuyer1988>::grad_log_prob)
389 : .method(“log_prob”,
390 : &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::log_prob)
391 : .method(“unconstrain_pars”,
392 : &rstan::stan_fit<stan_model,
393 : boost::random::ecuyer1988>::unconstrain_pars)
394 : .method(“constrain_pars”,
395 : &rstan::stan_fit<stan_model,
396 : boost::random::ecuyer1988>::constrain_pars)
397 : .method(
398 : “num_pars_unconstrained”,
399 : &rstan::stan_fit<stan_model,
400 : boost::random::ecuyer1988>::num_pars_unconstrained)
401 : .method(
402 : “unconstrained_param_names”,
403 : &rstan::stan_fit<
404 : stan_model, boost::random::ecuyer1988>::unconstrained_param_names)
405 : .method(
406 : “constrained_param_names”,
407 : &rstan::stan_fit<stan_model,
408 : boost::random::ecuyer1988>::constrained_param_names)
409 : .method(“standalone_gqs”,
410 : &rstan::stan_fit<stan_model,
411 : boost::random::ecuyer1988>::standalone_gqs);
412 : }
413 :
414 :
415 : // declarations
416 : extern “C” {
417 : SEXP file235016df5c7c( ) ;
418 : }
419 :
420 : // definition
421 : SEXP file235016df5c7c() {
422 : return Rcpp::wrap(“anon_model”);
423 : }
make cmd is
make -f “C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf” -f “C:/PROGRA~1/R/R-42~1.1/share/make/winshlib.mk” CXX=‘(CXX14) (CXX14STD)’ CXXFLAGS=‘(CXX14FLAGS)' CXXPICFLAGS='(CXX14PICFLAGS)’ SHLIB_LDFLAGS=‘(SHLIB_CXX14LDFLAGS)' SHLIB_LD='(SHLIB_CXX14LD)’ SHLIB=“file235016df5c7c.dll” WIN=64 TCLBIN= OBJECTS=“file235016df5c7c.o”
make would use
C:/rtools42/usr/mingw_64/bin/g++ -std=gnu++14 -I"C:/PROGRA~1/R/R-42~1.1/include" -DNDEBUG -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/Rcpp/include/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppEigen/include/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppEigen/include/unsupported" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/BH/include" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/include/src/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/include/" -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/include/" -DRCPP_PARALLEL_USE_TBB=1 -I"C:/Users/sterr/AppData/Local/R/win-library/4.2/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -DBOOST_PENDING_INTEGER_LOG2_HPP -DSTAN_THREADS -DUSE_STANC3 -DSTRICT_R_HEADERS -DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION -DBOOST_NO_AUTO_PTR -include “C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/include/stan/math/prim/fun/Eigen.hpp” -std=c++1y -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c file235016df5c7c.cpp -o file235016df5c7c.o
if test “zfile235016df5c7c.o” != “z”; then
if test -e “file235016df5c7c-win.def”; then
echo C:/rtools42/usr/mingw_64/bin/g++ -shared -s -static-libgcc -o file235016df5c7c.dll file235016df5c7c-win.def file235016df5c7c.o “C:/Users/sterr/AppData/Local/R/win-library/4.2/rstan/lib/x64/libStanServices.a” -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64" -ltbb -LC:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-42~1.1/bin/x64" -lR ;
C:/rtools42/usr/mingw_64/bin/g++ -shared -s -static-libgcc -o file235016df5c7c.dll file235016df5c7c-win.def file235016df5c7c.o “C:/Users/sterr/AppData/Local/R/win-library/4.2/rstan/lib/x64/libStanServices.a” -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64" -ltbb -LC:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-42~1.1/bin/x64" -lR ;
else
echo EXPORTS > tmp.def;
C:/rtools42/usr/mingw_64/bin/nm file235016df5c7c.o | sed -n ‘s/^.* [BCDRT] / /p’ | sed -e ‘/[.]refptr[.]/d’ -e ‘/[.]weak[.]/d’ | sed ‘s/[^ ][^ ]*/“&”/g’ >> tmp.def;
echo C:/rtools42/usr/mingw_64/bin/g++ -shared -s -static-libgcc -o file235016df5c7c.dll tmp.def file235016df5c7c.o “C:/Users/sterr/AppData/Local/R/win-library/4.2/rstan/lib/x64/libStanServices.a” -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64" -ltbb -LC:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-42~1.1/bin/x64" -lR ;
C:/rtools42/usr/mingw_64/bin/g++ -shared -s -static-libgcc -o file235016df5c7c.dll tmp.def file235016df5c7c.o “C:/Users/sterr/AppData/Local/R/win-library/4.2/rstan/lib/x64/libStanServices.a” -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/StanHeaders/libs/x64" -lStanHeaders -L"C:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64" -ltbb -LC:/Users/sterr/AppData/Local/R/win-library/4.2/RcppParallel/lib/x64 -ltbb -ltbbmalloc -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib" -L"C:/PROGRA~1/R/R-42~1.1/bin/x64" -lR ;
rm -f tmp.def;
fi
fi
ERROR(s) during compilation: source code errors or compiler configuration errors!
Program source:
1:
2: // includes from the plugin
3: // [[Rcpp::plugins(cpp14)]]
4:
5:
lines 6-360 excluded
360: .constructor<SEXP, SEXP, SEXP>()
361:
362: .method(
363: “call_sampler”,
364: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::call_sampler)
365: .method(
366: “param_names”,
367: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_names)
368: .method(“param_names_oi”,
369: &rstan::stan_fit<stan_model,
370: boost::random::ecuyer1988>::param_names_oi)
371: .method(“param_fnames_oi”,
372: &rstan::stan_fit<stan_model,
373: boost::random::ecuyer1988>::param_fnames_oi)
374: .method(
375: “param_dims”,
376: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::param_dims)
377: .method(“param_dims_oi”,
378: &rstan::stan_fit<stan_model,
379: boost::random::ecuyer1988>::param_dims_oi)
380: .method(“update_param_oi”,
381: &rstan::stan_fit<stan_model,
382: boost::random::ecuyer1988>::update_param_oi)
383: .method(“param_oi_tidx”,
384: &rstan::stan_fit<stan_model,
385: boost::random::ecuyer1988>::param_oi_tidx)
386: .method(“grad_log_prob”,
387: &rstan::stan_fit<stan_model,
388: boost::random::ecuyer1988>::grad_log_prob)
389: .method(“log_prob”,
390: &rstan::stan_fit<stan_model, boost::random::ecuyer1988>::log_prob)
391: .method(“unconstrain_pars”,
392: &rstan::stan_fit<stan_model,
393: boost::random::ecuyer1988>::unconstrain_pars)
394: .method(“constrain_pars”,
395: &rstan::stan_fit<stan_model,
396: boost::random::ecuyer1988>::constrain_pars)
397: .method(
398: “num_pars_unconstrained”,
399: &rstan::stan_fit<stan_model,
400: boost::random::ecuyer1988>::num_pars_unconstrained)
401: .method(
402: “unconstrained_param_names”,
403: &rstan::stan_fit<
404: stan_model, boost::random::ecuyer1988>::unconstrained_param_names)
405: .method(
406: “constrained_param_names”,
407: &rstan::stan_fit<stan_model,
408: boost::random::ecuyer1988>::constrained_param_names)
409: .method(“standalone_gqs”,
410: &rstan::stan_fit<stan_model,
411: boost::random::ecuyer1988>::standalone_gqs);
412: }
413:
414:
415: // declarations
416: extern “C” {
417: SEXP file235016df5c7c( ) ;
418: }
419:
420: // definition
421: SEXP file235016df5c7c() {
422: return Rcpp::wrap(“anon_model”);
423: }
Compilation ERROR, function(s)/method(s) not created!
Error in compileCode(f, code, language = language, verbose = verbose) :
/bin/sh: line 1: C:/rtools42/usr/mingw_64/bin/g++: No such file or directorymake: *** [C:/PROGRA~1/R/R-42~1.1/etc/x64/Makeconf:260: file235016df5c7c.o] Error 127