I tried to follow the “Step by step guide for creating a package that depends on RStan” at Step by step guide for creating a package that depends on RStan • rstantools but got an error message at the end. The bare minimal package failed to compile. The system specs are: Windows 11 Home, R 4.2.2, RStudio 2022.12.0 Build 353, rtools42, rstan 2.21.8, rstantools 2.2.0, StanHeaders 2.21.0-7.
…
C:\Users\kaife\AppData\Local\Temp\ccGrwRVD.s: Assembler messages:
C:\Users\kaife\AppData\Local\Temp\ccGrwRVD.s: Fatal error: can’t write 87 bytes to section .text of stanExports_lm.o: ‘file too big’
as: stanExports_lm.o: too many sections (36627)
C:\Users\kaife\AppData\Local\Temp\ccGrwRVD.s: Fatal error: stanExports_lm.o: file too big
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:258: stanExports_lm.o] Error 1
ERROR: compilation failed for package ‘rstanlm’
─ removing ‘C:/Users/kaife/AppData/Local/Temp/RtmpmovtZY/devtools_install_129c1b79144d/rstanlm’
Error in (function (command = NULL, args = character(), error_on_status = TRUE, …
:
! System command ‘Rcmd.exe’ failed
Exit status: 1
stdout & stderr:
Type .Last.error to see the more details.
.Last.error
<system_command_status_error/rlib_error_3_0/rlib_error/error>
Error in(function (command = NULL, args = character(), error_on_status = TRUE, …
:
! System command ‘Rcmd.exe’ failed
Exit status: 1
stdout & stderr:
Backtrace:
- roxygen2::roxygenize()
- local load_code(base_path)
- pkgload::load_all(path, helpers = FALSE, attach_testthat = FALSE)
- pkgbuild::compile_dll(path, quiet = quiet)
- pkgbuild:::install_min(path, dest = install_dir, components = “libs”, args = if (needs_clea…
- pkgbuild::rcmd_build_tools(“INSTALL”, c(path, paste(“–library=”, dest, …
- pkgbuild::with_build_tools({ …
- withr::with_path(rtools_path(), code)
- base::force(code)
- base::withCallingHandlers(callr::rcmd_safe(…, env = env, spinner = FALSE, …
- callr::rcmd_safe(…, env = env, spinner = FALSE, show = FALSE, …
- callr:::run_r(options)
- base::with(options, with_envvar(env, do.call(processx::run, c(list(bin, …
- base::with.default(options, with_envvar(env, do.call(processx::run, …
- base::eval(substitute(expr), data, enclos = parent.frame())
- base::eval(substitute(expr), data, enclos = parent.frame())
- callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs, …
- base::force(code)
- base::do.call(processx::run, c(list(bin, args = real_cmdargs, stdout_line_callback = r…
- (function (command = NULL, args = character(), error_on_status = TRUE, …
- base::throw(new_process_error(res, call = sys.call(), echo = echo, …
- | base::signalCondition(cond)
- (function (e) …
- asNamespace(“callr”)$err$throw(e)
Any insights are greatly appreciated!