Skip to content

remote repo installs fails on pak but succeeds on renv #305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yonicd opened this issue Jun 10, 2021 · 15 comments
Closed

remote repo installs fails on pak but succeeds on renv #305

yonicd opened this issue Jun 10, 2021 · 15 comments

Comments

@yonicd
Copy link

yonicd commented Jun 10, 2021

I have noticed a few times that in pak when i try to install remote repos (gh in this case) that the builds fail, but then i try on renv same install and it builds fine. what could be the root of that?

> pak::pkg_install('Azure/Microsoft365R')
v Loading metadata database                                     
                                                                           
> Will update 1 package.
> Will download 1 package with unknown size.
+ Microsoft365R 2.2.0 > 2.2.1 [bld][cmp][dl] (GitHub: 31ff33b)
? Do you want to continue (Y/n) y
i Getting 1 pkg with unknown size
v Got Microsoft365R 2.2.1 (source) (201.39 kB)                  
v Downloaded 1 package (201.39 kB)in 1.9s                       
i Packaging Microsoft365R 2.2.1
v Packaged Microsoft365R 2.2.1 (3.9s)                                         
i Building Microsoft365R 2.2.1                                                
x Failed to build Microsoft365R 2.2.1                                         
Error: Failed to build source package 'Microsoft365R'                         
Type .Last.error.trace to see where the error occurred
[Yesterday 10:15 AM] Yoni Sidi
    
> pak::pkg_install('Azure/Microsoft365R')
                                                                           
> Will install 4 packages.
> Will download 3 CRAN packages (1.51 MB).
> Will download 1 package with unknown size.
+ AzureAuth       1.3.2 [dl] (455.62 kB)
+ AzureGraph      1.3.1 [dl] (580.90 kB)
+ jose            1.0   [dl] (474.87 kB)
+ Microsoft365R   2.2.0 [bld][cmp][dl] (GitHub: 2d7d43a)
i Getting 3 pkgs (1.51 MB) and 1 pkg with unknown size
v Got Microsoft365R 2.2.0 (source) (199.84 kB)                                  
v Got AzureAuth 1.3.2 (windows) (455.67 kB)                  
v Got jose 1.0 (windows) (474.87 kB)                         
v Got AzureGraph 1.3.1 (windows) (580.90 kB)                 
v Downloaded 4 packages (1.71 MB)in 1.1s                     
v Installed AzureAuth 1.3.2  (181ms)                                        
v Installed AzureGraph 1.3.1  (231ms)                   
v Installed jose 1.0  (285ms)                                          
i Packaging Microsoft365R 2.2.0                                        
v Packaged Microsoft365R 2.2.0 (1.4s)                                         
i Building Microsoft365R 2.2.0                                                
x Failed to build Microsoft365R 2.2.0                                         
Error: Failed to build source package 'Microsoft365R'                         
Type .Last.error.trace to see where the error occurred
> .Last.error.trace
 Stack trace:
 12. (function (...)  ...
 13. base:::withCallingHandlers(cli_message = function(msg) {​​​​​​​ ...
 14. get("pkg_install_do_plan", asNamespace("pak"))(...)
 15. pkgdepends::install_package_plan(plan = plan, lib = lib, num_workers = num_ ...
 16. base:::withCallingHandlers({​​​​​​​ ...
 17. pkgdepends:::handle_events(state, events)
 18. pkgdepends:::handle_event(state, i)
 19. pkgdepends:::stop_task(state, worker)
 20. pkgdepends:::stop_task_build(state, worker)
 21. base:::throw(new_pkg_build_error("Failed to build source package {​​​​​​​pkg}​​​​​​​",  ...
 22. base:::signalCondition(cond)
 23. (function (e)  ...
 24. base:::stop(e)
 25. (function (e)  ...
 x Failed to build source package 'Microsoft365R' 
> renv::install('Azure/Microsoft365R')
Retrieving 'https://api.github.com/repos/Azure/Microsoft365R/tarball/31ff33bca4ebb34d97fb00ce8b3dbec0049d5fa8' ...
	OK [downloaded 134.7 Kb in 0.7 secs]
Installing Microsoft365R [2.2.1] ...
	OK [built from source]
si
- Session info -----------------------------------------------------------------------------------------------------------------
 setting  value                       
 version  R version 4.1.0 (2021-05-18)
 os       Windows 10 x64              
 system   x86_64, mingw32             
 ui       RStudio                     
 language (EN)                        
 collate  English_United States.1252  
 ctype    English_United States.1252  
 tz       America/New_York            
 date     2021-06-10                  

- Packages ---------------------------------------------------------------------------------------------------------------------
 ! package        * version    date       lib source                          
 P ash              1.0-15     2015-09-01 [?] CRAN (R 4.1.0)                  
 P assertthat       0.2.1      2019-03-21 [?] CRAN (R 4.1.0)                  
 P backports        1.1.10     2020-09-15 [?] CRAN (R 4.1.0)                  
 P base64enc        0.1-3      2015-07-28 [?] CRAN (R 4.1.0)                  
 P broom          * 0.7.6      2021-04-05 [?] CRAN (R 4.1.0)                  
 P broom.mixed    * 0.2.6      2020-05-17 [?] CRAN (R 4.1.0)                  
 P checkmate        2.0.0      2020-02-06 [?] CRAN (R 4.1.0)                  
 P cli              2.5.0      2021-04-26 [?] CRAN (R 4.1.0)                  
 P clipr            0.7.0      2019-07-23 [?] CRAN (R 4.1.0)                  
 P cluster          2.1.1      2021-02-14 [?] CRAN (R 4.1.0)                  
 P coda             0.19-3     2019-07-05 [?] CRAN (R 4.1.0)                  
 P colorspace       1.4-1      2019-03-18 [?] CRAN (R 4.1.0)                  
 P crayon           1.4.1      2021-02-08 [?] CRAN (R 4.1.0)                  
 P data.table       1.13.0     2020-07-24 [?] CRAN (R 4.1.0)                  
 P desc             1.2.0      2018-05-01 [?] CRAN (R 4.1.0)                  
 P details          0.2.1      2020-01-12 [?] CRAN (R 4.1.0)                  
 P digest           0.6.27     2020-10-24 [?] CRAN (R 4.1.0)                  
 P distributional   0.2.1      2020-10-06 [?] CRAN (R 4.1.0)                  
 P dplyr            1.0.6      2021-05-05 [?] CRAN (R 4.1.0)                  
 P ellipsis         0.3.2      2021-04-29 [?] CRAN (R 4.1.0)                  
 P emmeans        * 1.5.2-1    2020-10-25 [?] CRAN (R 4.1.0)                  
 P estimability     1.3        2018-02-11 [?] CRAN (R 4.1.0)                  
 P evaluate         0.14       2019-05-28 [?] CRAN (R 4.1.0)                  
 P extrafont        0.17       2014-12-08 [?] CRAN (R 4.1.0)                  
 P extrafontdb      1.0        2012-06-11 [?] CRAN (R 4.1.0)                  
 P fansi            0.4.1      2020-01-08 [?] CRAN (R 4.1.0)                  
 P farver           2.0.3      2020-01-16 [?] CRAN (R 4.1.0)                  
 P forcats          0.5.0      2020-03-01 [?] CRAN (R 4.1.0)                  
 P foreign          0.8-81     2020-12-22 [?] CRAN (R 4.1.0)                  
 P Formula          1.2-4      2020-10-16 [?] CRAN (R 4.1.0)                  
 P fs               1.5.0      2020-07-31 [?] CRAN (R 4.1.0)                  
 P generics         0.1.0      2020-10-31 [?] CRAN (R 4.1.0)                  
 P ggalt            0.6.2      2021-06-03 [?] Github (hrbrmstr/ggalt@e46e54b) 
 P ggdist           2.3.0      2020-10-31 [?] CRAN (R 4.1.0)                  
 P ggplot2        * 3.3.3      2020-12-30 [?] CRAN (R 4.1.0)                  
 P glue             1.4.2      2020-08-27 [?] CRAN (R 4.1.0)                  
 P gridExtra        2.3        2017-09-09 [?] CRAN (R 4.1.0)                  
 P gt               0.3.0.9000 2021-06-03 [?] Github (rstudio/gt@47df8ad)     
 P gtable           0.3.0      2019-03-25 [?] CRAN (R 4.1.0)                  
 P gtools           3.8.2      2020-03-31 [?] CRAN (R 4.1.0)                  
 P haven            2.3.1      2020-06-01 [?] CRAN (R 4.1.0)                  
 P Hmisc            4.4-1      2020-08-10 [?] CRAN (R 4.1.0)                  
 P hms              0.5.3      2020-01-08 [?] CRAN (R 4.1.0)                  
 P htmlTable        2.1.0      2020-09-16 [?] CRAN (R 4.1.0)                  
   htmltools        0.5.1.1    2021-01-22 [1] standard (@0.5.1.1)             
 P htmlwidgets      1.5.2      2020-10-03 [?] CRAN (R 4.1.0)                  
 P httr             1.4.2      2020-07-20 [?] CRAN (R 4.1.0)                  
 P jpeg             0.1-8.1    2019-10-24 [?] CRAN (R 4.1.0)                  
 P KernSmooth       2.23-18    2020-10-29 [?] CRAN (R 4.1.0)                  
 P knitr            1.30       2020-09-22 [?] CRAN (R 4.1.0)                  
 P labeling         0.3        2014-08-23 [?] CRAN (R 4.1.0)                  
 P lattice          0.20-41    2020-04-02 [?] CRAN (R 4.1.0)                  
 P latticeExtra     0.6-29     2019-12-19 [?] CRAN (R 4.1.0)                  
 P lifecycle        1.0.0      2021-02-15 [?] CRAN (R 4.1.0)                  
 P lsmeans        * 2.30-0     2018-11-02 [?] CRAN (R 4.1.0)                  
 P magrittr       * 2.0.1      2020-11-17 [?] standard (@2.0.1)               
 P maps             3.3.0      2018-04-03 [?] CRAN (R 4.1.0)                  
 P MASS             7.3-53     2020-09-09 [?] CRAN (R 4.1.0)                  
 P Matrix           1.3-2      2021-01-06 [?] CRAN (R 4.1.0)                  
 P munsell          0.5.0      2018-06-12 [?] CRAN (R 4.1.0)                  
 P mvtnorm          1.1-1      2020-06-09 [?] CRAN (R 4.1.0)                  
 P nlme           * 3.1-149    2020-08-23 [?] CRAN (R 4.1.0)                  
 P nnet             7.3-15     2021-01-24 [?] CRAN (R 4.1.0)                  
   pak              0.1.2.9001 2021-06-07 [1] local                           
 P pillar           1.6.1      2021-05-16 [?] CRAN (R 4.1.0)                  
 P pins             0.4.4      2020-10-30 [?] CRAN (R 4.1.0)                  
 P pkgconfig        2.0.3      2019-09-22 [?] CRAN (R 4.1.0)                  
 P plyr             1.8.6      2020-03-03 [?] CRAN (R 4.1.0)                  
 P png              0.1-7      2013-12-03 [?] CRAN (R 4.1.0)                  
 P proj4            1.0-10     2020-03-02 [?] CRAN (R 4.1.0)                  
 P purrr            0.3.4      2020-04-17 [?] CRAN (R 4.1.0)                  
 P R6               2.5.0      2020-10-28 [?] CRAN (R 4.1.0)                  
 P RColorBrewer     1.1-2      2014-12-07 [?] CRAN (R 4.1.0)                  
 P Rcpp             1.0.5      2020-07-06 [?] CRAN (R 4.1.0)                  
 P readr            1.3.1      2018-12-21 [?] CRAN (R 4.1.0)                  
   renv             0.13.2     2021-03-30 [1] CRAN (R 4.1.0)                  
 P reshape2         1.4.4      2020-04-09 [?] CRAN (R 4.1.0)                  
 P rlang            0.4.11     2021-04-30 [?] CRAN (R 4.1.0)                  
 P rmarkdown        2.5        2020-10-21 [?] CRAN (R 4.1.0)                  
 P rpart            4.1-15     2019-04-12 [?] CRAN (R 4.1.0)                  
 P rprojroot        1.3-2      2018-01-03 [?] CRAN (R 4.1.0)                  
 P rstudioapi       0.13       2020-11-12 [?] CRAN (R 4.1.0)                  
 P Rttf2pt1         1.3.8      2020-01-10 [?] CRAN (R 4.1.0)                  
 P sasdrive         0.0.1      2021-06-03 [?] Github (sagerx/sasdrive@a788cda)
 P scales           1.1.1      2020-05-11 [?] CRAN (R 4.1.0)                  
 P sessioninfo      1.1.1      2018-11-05 [?] CRAN (R 4.1.0)                  
 P stringi          1.4.6      2020-02-17 [?] CRAN (R 4.1.0)                  
 P stringr          1.4.0      2019-02-10 [?] CRAN (R 4.1.0)                  
 P survival         3.2-7      2020-09-28 [?] CRAN (R 4.1.0)                  
 P tibble           3.1.2      2021-05-16 [?] CRAN (R 4.1.0)                  
 P tidyr            1.1.3      2021-03-03 [?] CRAN (R 4.1.0)                  
 P tidyselect       1.1.0      2020-05-11 [?] CRAN (R 4.1.0)                  
 P TMB              1.7.18     2020-07-27 [?] CRAN (R 4.1.0)                  
 P utf8             1.2.1      2021-03-12 [?] CRAN (R 4.1.0)                  
 P vctrs            0.3.8      2021-04-29 [?] CRAN (R 4.1.0)                  
 P withr            2.3.0      2020-09-22 [?] CRAN (R 4.1.0)                  
 P xfun             0.18       2020-09-29 [?] CRAN (R 4.1.0)                  
 P xml2             1.3.2      2020-04-23 [?] CRAN (R 4.1.0)                  
 P xtable           1.8-4      2019-04-21 [?] CRAN (R 4.1.0)                  
 P yaml             2.2.1      2020-02-01 [?] CRAN (R 4.1.0)                  

[1] C:/trials/217-cross-study/renv/library/R-4.1/x86_64-w64-mingw32
[2] C:/Users/jonathan.sidi/AppData/Local/Temp/Rtmp8GLACF/renv-system-library

 P -- Loaded and on-disk path mismatch.

@gaborcsardi
Copy link
Member

Hmmm, why is pak downloading version 2.2.0, and renv version 2.2.1? Did you run them from the same session?

@jimhester
Copy link
Member

If you run .Last.error you will get a more useful error message.

FWIW @gaborcsardi we really need to look into fixing this to display the error automatically in interactive sessions.

@yonicd
Copy link
Author

yonicd commented Jun 10, 2021

@gaborcsardi i ran those on the same session

> renv::remove('Microsoft365R')
* Removing package(s) from project library ...
Removing package 'Microsoft365R' ... Done!
> pak::pkg_install('Azure/Microsoft365R')
                                                                          
> Will install 1 package.
> Will download 1 package with unknown size.
+ Microsoft365R   2.2.1 [bld][cmp][dl] (GitHub: 31ff33b)
i Getting 1 pkg with unknown size
v Cached copy of Microsoft365R 2.2.1 (source) is the latest build
v No downloads needed, all packages are cached
i Packaging Microsoft365R 2.2.1
v Packaged Microsoft365R 2.2.1 (1.2s)                                         
i Building Microsoft365R 2.2.1                                                
x Failed to build Microsoft365R 2.2.1                                         
Error: Failed to build source package 'Microsoft365R'                         
Type .Last.error.trace to see where the error occurred
> .Last.error
<callr_remote_error: Failed to build source package 'Microsoft365R'>
 in process 27672 
-->
Failed to build source package 'Microsoft365R', stdout + stderr:

OE> * installing *source* package 'Microsoft365R' ...
OE> staged installation is only possible with locking
OE> ** using non-staged installation
OE> ** R
OE> ** inst
OE> ** byte-compile and prepare package for lazy loading
OE> ** help
OE> *** installing help indices
OE>   converting help for package 'Microsoft365R'
OE>     finding HTML links ... done
OE>     Microsoft365R-deprecated                html  
OE>     add_methods                             html  
OE>     finding level-2 HTML links ... done
OE> 
OE>     client                                  html  
OE>     make_basic_list                         html  
OE>     ms_channel                              html  
OE>     ms_chat_message                         html  
OE>     ms_drive                                html  
OE>     ms_drive_item                           html  
OE>     ms_list                                 html  
OE>     ms_list_item                            html  
OE>     ms_outlook                              html  
OE>     ms_outlook_attachment                   html  
OE>     ms_outlook_email                        html  
OE>     ms_outlook_folder                       html  
OE>     ms_plan                                 html  
OE>     ms_plan_bucket                          html  
OE>     ms_plan_task                            html  
OE>     ms_site                                 html  
OE>     ms_team                                 html  
OE>     ms_team_member                          html  
OE> *** copying figures
OE> ** building package indices
OE> ** installing vignettes
OE> ** testing if installed package can be loaded
OE> *** arch - i386
OE> Error: package or namespace load failed for 'Microsoft365R':
OE>  .onLoad failed in loadNamespace() for 'AzureAuth', details:
OE>   call: library.dynam(lib, package, package.lib)
OE>   error: DLL 'rappdirs' not found: maybe not installed for this architecture?
OE> Error: loading failed
OE> Execution halted
OE> *** arch - x64
OE> ERROR: loading failed for 'i386'
OE> * removing 'C:/Users/JONATH~1.SID/AppData/Local/Temp/RtmpCi9vWe/pkg-lib6c183a5e1074/Microsoft365R'

@gaborcsardi
Copy link
Member

Yeah, so this is because CRAN binaries do not have i386 any more, but R still wants to install for i386 as well when installing from source.

@yonicd
Copy link
Author

yonicd commented Jun 10, 2021

is there something i can do when calling pak or is it something i cant control?

@gaborcsardi
Copy link
Member

In this case you could try to install rappdirs from source, hopefully that's the only one not available for i386:

pak::pkg_install("rappdirs?source")

@gaborcsardi
Copy link
Member

gaborcsardi commented Jun 10, 2021

@jimhester I wonder if we should default to single arch on Windows 4.1 x64, in pkgbuild or elsewhere.

OTOH, ideally R-core/CRAN could agree if they want i386 by default or not, but binary installs being x64 only and source installs being multi-arch by default is not quite ideal.

@yonicd
Copy link
Author

yonicd commented Jun 10, 2021

it worked. ty

> pak::pkg_install("rappdirs?source")
 
> Will install 1 package.
> Will download 1 CRAN package (12.29 kB).
+ rappdirs   0.3.3 [bld][cmp][dl] (12.29 kB)

! rappdirs is loaded in the current R session and has locked files in your
library. The installation will probably fail, unless pak unloads it, and also
all other packages importing it.

What do you want to do?

1. Have pak unload them before the installation. (Safest option.)
2. Try the installation without unloading them
3. Abort the installation.

? Your choice [1]: 1
  Unloading rappdirs...

i Getting 1 pkg (12.29 kB)
v Got rappdirs 0.3.3 (source) (12.29 kB)                              
v Downloaded 1 package (12.29 kB)in 285ms                             
i Building rappdirs 0.3.3
v Built rappdirs 0.3.3 (12.1s)                                       
v Installed rappdirs 0.3.3  (187ms)                                    
v 1 + 0 pkgs | kept 0, updated 0, new 1 | downloaded 1 (12.29 kB) 25.2s

! pak had to unload some packages before installation, and the
  current R session may be unstable. It is best to restart R now.

  1. Restart R without saving data.
  2. Save data to `.RData` and restart R.
  3. Do not restart R.

? Your choice [1]: 1

Restarting R session...

* Project 'C:/trials/217-cross-study' loaded. [renv 0.13.2]
* The project may be out of sync -- use `renv::status()` for more details.
> renv::remove('Microsoft365R')
* Removing package(s) from project library ...
Removing package 'Microsoft365R' ... Done!
> pak::pkg_install('Azure/Microsoft365R')
v Loading metadata database                                     
                                                                           
> Will install 1 package.
> Will download 1 package with unknown size.
+ Microsoft365R   2.2.1 [bld][cmp][dl] (GitHub: 31ff33b)
i Getting 1 pkg with unknown size
v Cached copy of Microsoft365R 2.2.1 (source) is the latest build
v No downloads needed, all packages are cached
i Packaging Microsoft365R 2.2.1
v Packaged Microsoft365R 2.2.1 (2.3s)                                         
i Building Microsoft365R 2.2.1                                                
v Built Microsoft365R 2.2.1 (9.8s)                                            
v Installed Microsoft365R 2.2.1 (github::Azure/Microsoft365R@31ff33b) (214ms)   
v 1 + 16 pkgs | kept 13, updated 0, new 1 | downloaded 0 (0 B) 19.6s

@jimhester
Copy link
Member

yeah, probably we should default to single arch on R 4.1+

@gaborcsardi
Copy link
Member

We could also make it configurable with an env var as well, passing down a command line option is not really great.

But pak must be better with archs, too. It just assumes that if a package is installed, then it is installed for all archs, which was typically true before, but not any more.

@yonicd
Copy link
Author

yonicd commented Jun 30, 2021

is it possible to set the deps to install source as well as the library?

I am running into a bit of a cat and mouse scenario with this architecture problem

eg

> pak::pkg_install(c('stan-dev/cmdstanr'))
                                                                           
> Will install 3 packages.
> Will download 1 CRAN package (232.80 kB).
> Will download 2 packages with unknown size.
+ cmdstanr    0.4.0.9000 [bld][cmp][dl] (GitHub: 38ea435)
+ posterior   0.1.7      [bld][cmp][dl] (GitHub: c8f3f3f)
+ tensorA     0.36.2     [dl] (232.80 kB)
i Getting 1 pkg (232.80 kB) and 2 pkgs with unknown sizes
v Got tensorA 0.36.2 (windows) (232.80 kB)                                      
v Got posterior 0.1.7 (source) (696.57 kB)                               
v Got cmdstanr 0.4.0.9000 (source) (2.06 MB)               
v Downloaded 3 packages (2.99 MB)in 8.2s                   
v Installed tensorA 0.36.2  (224ms)                                       
i Packaging posterior 0.1.7                                               
v Packaged posterior 0.1.7 (4.8s)                                         
i Building posterior 0.1.7                                                
x Failed to build posterior 0.1.7                                         
Error: Failed to build source package 'posterior'                         
Type .Last.error.trace to see where the error occurred
> .Last.error
<callr_remote_error: Failed to build source package 'posterior'>
 in process 29144 
-->
Failed to build source package 'posterior', stdout + stderr:

OE> * installing *source* package 'posterior' ...
OE> staged installation is only possible with locking
OE> ** using non-staged installation
OE> ** R
OE> ** inst
OE> ** byte-compile and prepare package for lazy loading
OE> ** help
OE> *** installing help indices
OE>   converting help for package 'posterior'
OE>     finding HTML links ... done
OE>     as_rvar                                 html  
OE>     autocorrelation                         html  
OE>     autocovariance                          html  
OE>     bind_draws                              html  
OE>     chol.rvar                               html  
OE>     diagnostics                             html  
OE>     draws-index                             html  
OE> REDIRECT:topic	 variables<- -> draws-index.html [ FAIL ]
OE>     draws                                   html  
OE>     draws_array                             html  
OE>     draws_df                                html  
OE>     draws_list                              html  
OE>     draws_matrix                            html  
OE>     draws_of                                html  
OE> REDIRECT:topic	 draws_of<- -> draws_of.html [ FAIL ]
OE>     draws_rvars                             html  
OE>     draws_summary                           html  
OE>     ess_basic                               html  
OE>     ess_bulk                                html  
OE>     ess_mean                                html  
OE>     ess_quantile                            html  
OE>     ess_sd                                  html  
OE>     ess_tail                                html  
OE>     example_draws                           html  
OE>     extract_variable                        html  
OE>     extract_variable_matrix                 html  
OE>     is_rvar                                 html  
OE>     mcse_mean                               html  
OE>     mcse_quantile                           html  
OE>     mcse_sd                                 html  
OE>     merge_chains                            html  
OE>     mutate_variables                        html  
OE>     order_draws                             html  
OE>     posterior-package                       html  
OE>     print.draws_array                       html  
OE>     print.draws_df                          html  
OE>     print.draws_list                        html  
OE>     print.draws_matrix                      html  
OE>     print.draws_rvars                       html  
OE>     print.rvar                              html  
OE>     quantile2                               html  
OE>     r_scale                                 html  
OE>     rdo                                     html  
OE>     finding level-2 HTML links ... done
OE> 
OE>     reexports                               html  
OE>     rename_variables                        html  
OE>     repair_draws                            html  
OE>     resample_draws                          html  
OE>     reserved-variables                      html  
OE>     rfun                                    html  
OE>     rhat                                    html  
OE>     rhat_basic                              html  
OE>     rstar                                   html  
OE>     rvar-dist                               html  
OE>     rvar-matmult                            html  
OE> REDIRECT:topic	 %**% -> rvar-matmult.html [ FAIL ]
OE>     rvar-summaries-over-draws               html  
OE> REDIRECT:topic	 Previous alias or file overwritten by alias: C:/Users/JONATH~1.SID/AppData/Local/Temp/RtmpEpgqoh/pkg-lib71d8300a54c3/posterior/help/Summary.rvar.html
OE>     rvar-summaries-within-draws             html  
OE>     rvar                                    html  
OE>     rvar_apply                              html  
OE>     rvar_is_finite                          html  
OE>     rvar_rng                                html  
OE>     split_chains                            html  
OE>     sub-.draws_array                        html  
OE>     sub-.draws_matrix                       html  
OE>     subset_draws                            html  
OE>     thin_draws                              html  
OE>     u_scale                                 html  
OE>     vctrs-compat                            html  
OE>     weight_draws                            html  
OE>     weights.draws                           html  
OE>     z_scale                                 html  
OE> *** copying figures
OE> ** building package indices
OE> ** installing vignettes
OE> ** testing if installed package can be loaded
OE> *** arch - i386
OE> Error: package or namespace load failed for 'posterior':
OE>  .onLoad failed in loadNamespace() for 'checkmate', details:
OE>   call: library.dynam(lib, package, package.lib)
OE>   error: DLL 'backports' not found: maybe not installed for this architecture?
OE> Error: loading failed
OE> Execution halted
OE> *** arch - x64
OE> ERROR: loading failed for 'i386'
OE> * removing 'C:/Users/JONATH~1.SID/AppData/Local/Temp/RtmpEpgqoh/pkg-lib71d8300a54c3/posterior'
> pak::pkg_install(c('backports?source'))
 
> Will install 1 package.
> Will download 1 CRAN package (21.18 kB).
+ backports   1.2.1 [bld][cmp][dl] (21.18 kB)
i Getting 1 pkg (21.18 kB)
v Got backports 1.2.1 (source) (21.18 kB)                                
v Downloaded 1 package (21.18 kB)in 1.2s                                        
i Building backports 1.2.1
v Built backports 1.2.1 (19.6s)                                       
v Installed backports 1.2.1  (453ms)                                    
v 1 + 0 pkgs | kept 0, updated 0, new 1 | downloaded 1 (21.18 kB) 23.1s 
> pak::pkg_install(c('stan-dev/cmdstanr'))
                                                                           
> Will install 2 packages.
> Will download 2 packages with unknown size.
+ cmdstanr    0.4.0.9000 [bld][cmp][dl] (GitHub: 38ea435)
+ posterior   0.1.7      [bld][cmp][dl] (GitHub: c8f3f3f)
i Getting 2 pkgs with unknown sizes
v Cached copy of cmdstanr 0.4.0.9000 (source) is the latest build
v Cached copy of posterior 0.1.7 (source) is the latest build
v No downloads needed, all packages are cached                     
i Packaging posterior 0.1.7
v Packaged posterior 0.1.7 (4.3s)                                         
i Building posterior 0.1.7                                                
x Failed to build posterior 0.1.7                                         
Error: Failed to build source package 'posterior'                         
Type .Last.error.trace to see where the error occurred
> .Last.error
<callr_remote_error: Failed to build source package 'posterior'>
 in process 29144 
-->
Failed to build source package 'posterior', stdout + stderr:

OE> * installing *source* package 'posterior' ...
OE> staged installation is only possible with locking
OE> ** using non-staged installation
OE> ** R
OE> ** inst
OE> ** byte-compile and prepare package for lazy loading
OE> ** help
OE> *** installing help indices
OE>   converting help for package 'posterior'
OE>     finding HTML links ... done
OE>     as_rvar                                 html  
OE>     autocorrelation                         html  
OE>     autocovariance                          html  
OE>     bind_draws                              html  
OE>     chol.rvar                               html  
OE>     diagnostics                             html  
OE>     draws-index                             html  
OE> REDIRECT:topic	 variables<- -> draws-index.html [ FAIL ]
OE>     draws                                   html  
OE>     draws_array                             html  
OE>     draws_df                                html  
OE>     draws_list                              html  
OE>     draws_matrix                            html  
OE>     draws_of                                html  
OE> REDIRECT:topic	 draws_of<- -> draws_of.html [ FAIL ]
OE>     draws_rvars                             html  
OE>     draws_summary                           html  
OE>     ess_basic                               html  
OE>     ess_bulk                                html  
OE>     ess_mean                                html  
OE>     ess_quantile                            html  
OE>     ess_sd                                  html  
OE>     ess_tail                                html  
OE>     example_draws                           html  
OE>     extract_variable                        html  
OE>     extract_variable_matrix                 html  
OE>     is_rvar                                 html  
OE>     mcse_mean                               html  
OE>     mcse_quantile                           html  
OE>     mcse_sd                                 html  
OE>     merge_chains                            html  
OE>     mutate_variables                        html  
OE>     order_draws                             html  
OE>     posterior-package                       html  
OE>     print.draws_array                       html  
OE>     print.draws_df                          html  
OE>     print.draws_list                        html  
OE>     print.draws_matrix                      html  
OE>     print.draws_rvars                       html  
OE>     print.rvar                              html  
OE>     quantile2                               html  
OE>     r_scale                                 html  
OE>     rdo                                     html  
OE>     finding level-2 HTML links ... done
OE> 
OE>     reexports                               html  
OE>     rename_variables                        html  
OE>     repair_draws                            html  
OE>     resample_draws                          html  
OE>     reserved-variables                      html  
OE>     rfun                                    html  
OE>     rhat                                    html  
OE>     rhat_basic                              html  
OE>     rstar                                   html  
OE>     rvar-dist                               html  
OE>     rvar-matmult                            html  
OE> REDIRECT:topic	 %**% -> rvar-matmult.html [ FAIL ]
OE>     rvar-summaries-over-draws               html  
OE> REDIRECT:topic	 Previous alias or file overwritten by alias: C:/Users/JONATH~1.SID/AppData/Local/Temp/RtmpEpgqoh/pkg-lib71d8709275ff/posterior/help/Summary.rvar.html
OE>     rvar-summaries-within-draws             html  
OE>     rvar                                    html  
OE>     rvar_apply                              html  
OE>     rvar_is_finite                          html  
OE>     rvar_rng                                html  
OE>     split_chains                            html  
OE>     sub-.draws_array                        html  
OE>     sub-.draws_matrix                       html  
OE>     subset_draws                            html  
OE>     thin_draws                              html  
OE>     u_scale                                 html  
OE>     vctrs-compat                            html  
OE>     weight_draws                            html  
OE>     weights.draws                           html  
OE>     z_scale                                 html  
OE> *** copying figures
OE> ** building package indices
OE> ** installing vignettes
OE> ** testing if installed package can be loaded
OE> *** arch - i386
OE> Error: package or namespace load failed for 'posterior' in library.dynam(lib, package, package.lib):
OE>  DLL 'farver' not found: maybe not installed for this architecture?
OE> Error: loading failed
OE> Execution halted
OE> *** arch - x64
OE> ERROR: loading failed for 'i386'
OE> * removing 'C:/Users/JONATH~1.SID/AppData/Local/Temp/RtmpEpgqoh/pkg-lib71d8709275ff/posterior'
> pak::pkg_install(c('farver?source'))
                                                                          
> Will install 1 package.
> Will download 1 CRAN package (1.28 MB).
+ farver   2.1.0 [bld][cmp][dl] (1.28 MB)
i Getting 1 pkg (1.28 MB)
v Got farver 2.1.0 (source) (1.28 MB)                                 
v Downloaded 1 package (1.28 MB)in 2.8s                               
i Building farver 2.1.0
v Built farver 2.1.0 (2m 12.3s)                                    
v Installed farver 2.1.0  (523ms)                                    
v 1 + 0 pkgs | kept 0, updated 0, new 1 | downloaded 1 (1.28 MB) 2m 18.7s
> pak::pkg_install(c('stan-dev/cmdstanr'))
                                                                           
> Will install 2 packages.
> Will download 2 packages with unknown size.
+ cmdstanr    0.4.0.9000 [bld][cmp][dl] (GitHub: 38ea435)
+ posterior   0.1.7      [bld][cmp][dl] (GitHub: c8f3f3f)
i Getting 2 pkgs with unknown sizes
v Cached copy of cmdstanr 0.4.0.9000 (source) is the latest build
v Cached copy of posterior 0.1.7 (source) is the latest build
v No downloads needed, all packages are cached                     
i Packaging posterior 0.1.7
v Packaged posterior 0.1.7 (4.7s)                                         
i Building posterior 0.1.7                                                
x Failed to build posterior 0.1.7                                         
Error: Failed to build source package 'posterior'                         
Type .Last.error.trace to see where the error occurred
> pak::pkg_install(c('stan-dev/posterior?source'))
                                                                           
> Will install 1 package.
> Will download 1 package with unknown size.
+ posterior   0.1.7 [bld][cmp][dl] (GitHub: c8f3f3f)
i Getting 1 pkg with unknown size
v Cached copy of posterior 0.1.7 (source) is the latest build
v No downloads needed, all packages are cached          
i Packaging posterior 0.1.7
v Packaged posterior 0.1.7 (4.7s)                                         
i Building posterior 0.1.7                                                
x Failed to build posterior 0.1.7                                         
Error: Failed to build source package 'posterior'                         
Type .Last.error.trace to see where the error occurred
> .Last.error
<callr_remote_error: Failed to build source package 'posterior'>
 in process 29144 
-->
Failed to build source package 'posterior', stdout + stderr:

OE> * installing *source* package 'posterior' ...
OE> staged installation is only possible with locking
OE> ** using non-staged installation
OE> ** R
OE> ** inst
OE> ** byte-compile and prepare package for lazy loading
OE> ** help
OE> *** installing help indices
OE>   converting help for package 'posterior'
OE>     finding HTML links ... done
OE>     as_rvar                                 html  
OE>     autocorrelation                         html  
OE>     autocovariance                          html  
OE>     bind_draws                              html  
OE>     chol.rvar                               html  
OE>     diagnostics                             html  
OE>     draws-index                             html  
OE> REDIRECT:topic	 variables<- -> draws-index.html [ FAIL ]
OE>     draws                                   html  
OE>     draws_array                             html  
OE>     draws_df                                html  
OE>     draws_list                              html  
OE>     draws_matrix                            html  
OE>     draws_of                                html  
OE> REDIRECT:topic	 draws_of<- -> draws_of.html [ FAIL ]
OE>     draws_rvars                             html  
OE>     draws_summary                           html  
OE>     ess_basic                               html  
OE>     ess_bulk                                html  
OE>     ess_mean                                html  
OE>     ess_quantile                            html  
OE>     ess_sd                                  html  
OE>     ess_tail                                html  
OE>     example_draws                           html  
OE>     extract_variable                        html  
OE>     extract_variable_matrix                 html  
OE>     is_rvar                                 html  
OE>     mcse_mean                               html  
OE>     mcse_quantile                           html  
OE>     mcse_sd                                 html  
OE>     merge_chains                            html  
OE>     mutate_variables                        html  
OE>     order_draws                             html  
OE>     posterior-package                       html  
OE>     print.draws_array                       html  
OE>     print.draws_df                          html  
OE>     print.draws_list                        html  
OE>     print.draws_matrix                      html  
OE>     print.draws_rvars                       html  
OE>     print.rvar                              html  
OE>     quantile2                               html  
OE>     r_scale                                 html  
OE>     rdo                                     html  
OE>     finding level-2 HTML links ... done
OE> 
OE>     reexports                               html  
OE>     rename_variables                        html  
OE>     repair_draws                            html  
OE>     resample_draws                          html  
OE>     reserved-variables                      html  
OE>     rfun                                    html  
OE>     rhat                                    html  
OE>     rhat_basic                              html  
OE>     rstar                                   html  
OE>     rvar-dist                               html  
OE>     rvar-matmult                            html  
OE> REDIRECT:topic	 %**% -> rvar-matmult.html [ FAIL ]
OE>     rvar-summaries-over-draws               html  
OE> REDIRECT:topic	 Previous alias or file overwritten by alias: C:/Users/JONATH~1.SID/AppData/Local/Temp/RtmpEpgqoh/pkg-lib71d879ee1f23/posterior/help/Summary.rvar.html
OE>     rvar-summaries-within-draws             html  
OE>     rvar                                    html  
OE>     rvar_apply                              html  
OE>     rvar_is_finite                          html  
OE>     rvar_rng                                html  
OE>     split_chains                            html  
OE>     sub-.draws_array                        html  
OE>     sub-.draws_matrix                       html  
OE>     subset_draws                            html  
OE>     thin_draws                              html  
OE>     u_scale                                 html  
OE>     vctrs-compat                            html  
OE>     weight_draws                            html  
OE>     weights.draws                           html  
OE>     z_scale                                 html  
OE> *** copying figures
OE> ** building package indices
OE> ** installing vignettes
OE> ** testing if installed package can be loaded
OE> *** arch - i386
OE> Error: package or namespace load failed for 'posterior' in library.dynam(lib, package, package.lib):
OE>  DLL 'colorspace' not found: maybe not installed for this architecture?
OE> Error: loading failed
OE> Execution halted
OE> *** arch - x64
OE> ERROR: loading failed for 'i386'
OE> * removing 'C:/Users/JONATH~1.SID/AppData/Local/Temp/RtmpEpgqoh/pkg-lib71d879ee1f23/posterior'
> pak::pkg_install(c('colorspace?source'))
                                                                          
> Will install 1 package.
> Will download 1 CRAN package (2.20 MB).
+ colorspace   2.0-2 [bld][cmp][dl] (2.20 MB)
i Getting 1 pkg (2.20 MB)
v Got colorspace 2.0-2 (source) (2.20 MB)                                 
v Downloaded 1 package (2.20 MB)in 1.6s                                   
i Building colorspace 2.0-2
v Built colorspace 2.0-2 (38.8s)                                       
v Installed colorspace 2.0-2  (1.6s)                                     
v 1 + 0 pkgs | kept 0, updated 0, new 1 | downloaded 1 (2.20 MB) 44.7s   

@gaborcsardi
Copy link
Member

It seems that CRAN now includes i386 as well in the binaries, so if you reinstall the packages that are x64 only, that should work.

@yonicd
Copy link
Author

yonicd commented Jul 1, 2021

Apologies for the confusion. I ran that script yesterday. Was CRAN not updated then with i386? Should I be using pak in a different way? Thanks

@gaborcsardi
Copy link
Member

I don't know when CRAN was updated, but (unless you ran this with a clean library) you probably already some packages installed without i386. So if you remove these packages, the issue should go away.

@gaborcsardi
Copy link
Member

This is now fixed in dev pkgdepends I believe, so the current devel pak builds should work already:

install.packages("pak", repos = "https://r-lib.github.io/p/pak/devel/")

If not, please reopen this, or create a new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants