After running a traceback(), this is what I get:
24: poll(list(self), ms)
23: process_poll_io(self, private, timeout)
22: proc$poll_io(remains)
21: run_manage(pr, timeout, spinner, stdout_line_callback, stdout_callback,
stderr_line_callback, stderr_callback)
20: doTryCatch(return(expr), name, parentenv, handler)
19: tryCatchOne(expr, names, parentenv, handlers[[1L]])
18: tryCatchList(expr, classes, parentenv, handlers)
17: tryCatch(run_manage(pr, timeout, spinner, stdout_line_callback,
stdout_callback, stderr_line_callback, stderr_callback),
interrupt = function(e) {
tryCatch(pr$kill(), error = function(e) NULL)
"!DEBUG run() process `pr$get_pid()` killed on interrupt"
signalCondition(make_condition(list(interrupt = TRUE),
runcall))
cat("\n")
invokeRestart("abort")
})
16: (function (command = NULL, args = character(), error_on_status = TRUE,
wd = NULL, echo_cmd = FALSE, echo = FALSE, spinner = FALSE,
timeout = Inf, stdout_line_callback = NULL, stdout_callback = NULL,
stderr_line_callback = NULL, stderr_callback = NULL, stderr_to_stdout = FALSE,
env = NULL, windows_verbatim_args = FALSE, windows_hide_window = FALSE,
encoding = "", cleanup_tree = FALSE)
{
assert_that(is_flag(error_on_status))
assert_that(is_time_interval(timeout))
assert_that(is_flag(spinner))
assert_that(is.null(stdout_line_callback) || is.function(stdout_line_callback))
assert_that(is.null(stderr_line_callback) || is.function(stderr_line_callback))
assert_that(is.null(stdout_callback) || is.function(stdout_callback))
assert_that(is.null(stderr_callback) || is.function(stderr_callback))
assert_that(is_flag(cleanup_tree))
assert_that(is_flag(stderr_to_stdout))
"!DEBUG run() Checked arguments"
if (!interactive())
spinner <- FALSE
stderr <- if (stderr_to_stdout)
"2>&1"
else "|"
pr <- process$new(command, args, echo_cmd = echo_cmd, wd = wd,
windows_verbatim_args = windows_verbatim_args, windows_hide_window = windows_hide_window,
stdout = "|", stderr = stderr, env = env, encoding = encoding,
cleanup_tree = cleanup_tree)
"#!DEBUG run() Started the process: `pr$get_pid()`"
if (cleanup_tree) {
on.exit(pr$kill_tree(), add = TRUE)
}
else {
on.exit(pr$kill(), add = TRUE)
}
if (echo) {
stdout_callback <- echo_callback(stdout_callback, "stdout")
stderr_callback <- echo_callback(stderr_callback, "stderr")
}
runcall <- sys.call()
res <- tryCatch(run_manage(pr, timeout, spinner, stdout_line_callback,
stdout_callback, stderr_line_callback, stderr_callback),
interrupt = function(e) {
tryCatch(pr$kill(), error = function(e) NULL)
"!DEBUG run() process `pr$get_pid()` killed on interrupt"
signalCondition(make_condition(list(interrupt = TRUE),
runcall))
cat("\n")
invokeRestart("abort")
})
if (error_on_status && (is.na(res$status) || res$status !=
0)) {
"!DEBUG run() error on status `res$status` for process `pr$get_pid()`"
stop(make_condition(res, call = sys.call()))
}
res
})("C:/PROGRA~1/MIE74D~1/ROPEN~1/R-35~1.3/bin/x64/Rcmd.exe",
args = c("config", "CC"), stdout_line_callback = function (x,
proc)
{
if (!is.null(stream))
cat(x, file = stream, sep = "\n", append = TRUE)
}, stderr_line_callback = function (x, proc)
{
if (!is.null(stream))
cat(x, file = stream, sep = "\n", append = TRUE)
}, stdout_callback = NULL, stderr_callback = NULL, stderr_to_stdout = FALSE,
echo_cmd = FALSE, echo = FALSE, spinner = FALSE, error_on_status = FALSE,
timeout = Inf)
15: do.call(processx::run, c(list(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdout),
stderr_line_callback = real_callback(stderr), stdout_callback = real_block_callback,
stderr_callback = real_block_callback, stderr_to_stdout = stderr_to_stdout,
echo_cmd = echo, echo = show, spinner = spinner, error_on_status = fail_on_status,
timeout = timeout), extra))
14: force(code)
13: with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs,
stdout_line_callback = real_callback(stdout), stderr_line_callback = real_callback(stderr),
stdout_callback = real_block_callback, stderr_callback = real_block_callback,
stderr_to_stdout = stderr_to_stdout, echo_cmd = echo, echo = show,
spinner = spinner, error_on_status = fail_on_status, timeout = timeout),
extra)))
12: eval(substitute(expr), data, enclos = parent.frame())
11: eval(substitute(expr), data, enclos = parent.frame())
10: with.default(options, with_envvar(env, do.call(processx::run,
c(list(bin, args = real_cmdargs, stdout_line_callback = real_callback(stdout),
stderr_line_callback = real_callback(stderr), stdout_callback = real_block_callback,
stderr_callback = real_block_callback, stderr_to_stdout = stderr_to_stdout,
echo_cmd = echo, echo = show, spinner = spinner, error_on_status = fail_on_status,
timeout = timeout), extra))))
9: with(options, with_envvar(env, do.call(processx::run, c(list(bin,
args = real_cmdargs, stdout_line_callback = real_callback(stdout),
stderr_line_callback = real_callback(stderr), stdout_callback = real_block_callback,
stderr_callback = real_block_callback, stderr_to_stdout = stderr_to_stdout,
echo_cmd = echo, echo = show, spinner = spinner, error_on_status = fail_on_status,
timeout = timeout), extra))))
8: run_r(options)
7: callr::rcmd_safe("config", "CC")
6: gsub("\n", "", callr::rcmd_safe("config", "CC")$stdout)
5: scan_config_for_rtools(debug)
4: has_rtools()
3: pkgbuild::with_build_tools(cxxfunction(sig = sig, body = body,
plugin = plugin, includes = includes, settings = settings,
..., verbose = verbose), required = rstan_options("required") &&
!identical(Sys.getenv("WINDOWS"), "TRUE") && !identical(Sys.getenv("R_PACKAGE_SOURCE"),
""))
2: cxxfunctionplus(signature(), body = paste(" return Rcpp::wrap(\"",
model_name, "\");", sep = ""), includes = inc, plugin = "rstan",
save_dso = save_dso | auto_write, module_name = paste("stan_fit4",
model_cppname, "_mod", sep = ""), verbose = verbose)
1: stan_model(model_code = stancode, verbose = TRUE)