Package installation exiting with status 1

Viewed 290

I have a small package with a handful of functions that I have previously installed successfully on my local machine (i.e. not a CRAN package). I made some updates to these functions and their supporting data, and am trying to use the RStudio "clean and rebuild" pipeline to reinstall the updated package. I've gotten an error I don't understand and have not had success in tracing. It appears to result from a call to grep.c that happens as or after it is trying to identify the temporary directory in which it had been installed first, but I don't know how to inspect the source code behind this to identify what is being grepped, why, or why it is failing.

I have tried this from a clean run of RStudio (i.e. no other projects open, nothing else running, no optional packages loaded). I have not tried it from the console within RStudio (I'm not actually sure how to do so, or if it's possible), so if there's a way to do something akin to traceback(), I'm not aware of it.

This is the full output I get from the failed installation.

>==> Rcmd.exe INSTALL --no-multiarch --with-keep.source WRAPNorms
>
>* installing to library 'C:/Users/jonaitis/Documents/R/win-library/4.0'
>* installing *source* package 'WRAPNorms' ...
>** using staged installation
>** R
>** inst
>** byte-compile and prepare package for lazy loading
>** help
>*** installing help indices
>  converting help for package 'WRAPNorms'
>    finding HTML links ...    WRAP_est                                html  
>    WRAP_harm                               html   done
>
>    finding level-2 HTML links ...
>    convert_missing_wrap                    html   done
>
>    hello                                   html  
>    recode_values                           html  
>** building package indices
>** testing if installed package can be loaded from temporary location
>** testing if installed package can be loaded from final location
>** testing if installed package keeps a record of temporary installation path
>Error in grepRaw("00new", r, fixed = TRUE, all = FALSE, value = FALSE) : 
>  long vectors not supported yet: grep.c:1449
>* removing 'C:/Users/jonaitis/Documents/R/win-library/4.0/WRAPNorms'
>* restoring previous 'C:/Users/jonaitis/Documents/R/win-library/4.0/WRAPNorms'
>
>Exited with status 1.

Edit: I have now tried installing using devtools procedures from the RStudio command line. It still fails, but now I have a little more information. Here's the end of the console output.

> ** building package indices
> ** testing if installed package can be loaded from temporary location
> *** arch - i386
> *** arch - x64
> ** testing if installed package can be loaded from final location
> *** arch - i386
> *** arch - x64
> ** testing if installed package keeps a record of temporary installation path
> Error in grepRaw("00new", r, fixed = TRUE, all = FALSE, value = FALSE) : 
  long vectors not supported yet: grep.c:1450
> * removing 'C:/Users/jonaitis/Documents/R/R-4.1.2/library/WRAPNorms'
> Error in (function (command = NULL, args = character(), error_on_status = TRUE,  : 
>  System command 'Rcmd.exe' failed, exit status: 1, stdout & stderr were printed
> Type .Last.error.trace to see where the error occurred
> > .Last.error.trace
>
>  Stack trace:
>
> 1. devtools:::install()
> 2. pkgbuild::with_build_tools(required = FALSE, callr::rcmd("INSTALL",  ...
> 3. withr::with_path(rtools_path(), code)
> 4. base:::force(code)
> 5. callr::rcmd("INSTALL", c(install_path, opts), echo = !quiet,  ...
> 6. callr:::run_r(options)
> 7. base:::with(options, with_envvar(env, do.call(processx::run,  ...
> 8. base:::with.default(options, with_envvar(env, do.call(processx::run,  ...
> 9. base:::eval(substitute(expr), data, enclos = parent.frame())
> 10. base:::eval(substitute(expr), data, enclos = parent.frame())
> 11. callr:::with_envvar(env, do.call(processx::run, c(list(bin, args = real_cmdargs,  ...
> 12. base:::force(code)
> 13. base:::do.call(processx::run, c(list(bin, args = real_cmdargs,  ...
> 14. (function (command = NULL, args = character(), error_on_status = TRUE,  ...
> 15. throw(new_process_error(res, call = sys.call(), echo = echo,  ...
0 Answers
Related