-
Notifications
You must be signed in to change notification settings - Fork 66
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
Comments
Hmmm, why is pak downloading version 2.2.0, and renv version 2.2.1? Did you run them from the same session? |
If you run FWIW @gaborcsardi we really need to look into fixing this to display the error automatically in interactive sessions. |
@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' |
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. |
is there something i can do when calling pak or is it something i cant control? |
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") |
@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. |
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 |
yeah, probably we should default to single arch on R 4.1+ |
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. |
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 |
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. |
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 |
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. |
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! |
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?
si
The text was updated successfully, but these errors were encountered: