r-lib / revdepcheck

R package reverse dependency checking
https://revdepcheck.r-lib.org
Other
101 stars 32 forks source link

Failure to install DEV version of package, no useful error message provided #276

Closed clauswilke closed 3 years ago

clauswilke commented 4 years ago

revdep_check() fails to install the DEV version of the package for me. See transcript from R console below. Immediately after the revdep_check() I install the package with devtools::install(".") and everything works fine. Any suggestions on how to debug this?

> revdepcheck::revdep_check(num_workers = 4)
── INSTALL ────────────────────────────────────────────────────────────────────────────────────────── 2 versions ──
Installing CRAN version of cowplot
Installing DEV version of cowplot
Error: Failed to install 'cowplot' from local:
  (converted from warning) installation of package ‘/var/folders/b1/13gn4j655jddkfhxmtk5tsfm0000gn/T//RtmpOPlXqZ/filea3fe765d1778/cowplot_1.1.0.tar.gz’ had non-zero exit status

> devtools::install(".")
✓  checking for file ‘/Users/clauswilke/github/cowplot/DESCRIPTION’ ...
─  preparing ‘cowplot’: (4.8s)
✓  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts (1.1s)
─  checking for empty or unneeded directories
─  building ‘cowplot_1.1.0.tar.gz’

Running /Library/Frameworks/R.framework/Resources/bin/R CMD INSTALL \
  /var/folders/b1/13gn4j655jddkfhxmtk5tsfm0000gn/T//RtmpOPlXqZ/cowplot_1.1.0.tar.gz --install-tests 
* installing to library ‘/Users/clauswilke/Library/R/4.0/library’
* installing *source* package ‘cowplot’ ...
** using staged installation
** R
** inst
** tests
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** 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
* DONE (cowplot)
LiNk-NY commented 3 years ago

Hi @hadley @gaborcsardi I am also getting this error.

> revdepcheck::revdep_check("MultiAssayExperiment", num_workers = 34)
── INSTALL ────────────────────────────────────────────────────────────────────────────────────────────── 2 versions ──
Installing CRAN version of MultiAssayExperiment
Installing DEV version of MultiAssayExperiment
Error: Failed to install 'MultiAssayExperiment' from local:
  (converted from warning) installation of package '/tmp/RtmprG4GEN/fileb755a561556/MultiAssayExperiment_1.17.14.tar.gz' had non-zero exit status

Here is my traceback().

> traceback()
14: stop(remote_install_error(remotes[[i]], e))
13: value[[3L]](cond)
12: tryCatchOne(expr, names, parentenv, handlers[[1L]])
11: tryCatchList(expr, classes, parentenv, handlers)
10: tryCatch(res[[i]] <- install_remote(remotes[[i]], ...), error = function(e) {
        stop(remote_install_error(remotes[[i]], e))
    })
9: install_remotes(remotes, dependencies = dependencies, upgrade = upgrade, 
       force = force, quiet = quiet, build = build, build_opts = build_opts, 
       build_manual = build_manual, build_vignettes = build_vignettes, 
       repos = repos, type = type, ...)
8: install_local(pkg, quiet = quiet, repos = get_repos(bioc = TRUE), 
       force = TRUE, upgrade = "always")
7: rlang::with_options(warn = 2, install_local(pkg, quiet = quiet, 
       repos = get_repos(bioc = TRUE), force = TRUE, upgrade = "always"))
6: force(code)
5: with_libpaths(dir_find(pkg, "new"), rlang::with_options(warn = 2, 
       install_local(pkg, quiet = quiet, repos = get_repos(bioc = TRUE), 
           force = TRUE, upgrade = "always")))
4: force(code)
3: with_envvar(c(CRANCACHE_REPOS = "cran,bioc", CRANCACHE_QUIET = "yes", 
       env), with_libpaths(dir_find(pkg, "new"), rlang::with_options(warn = 2, 
       install_local(pkg, quiet = quiet, repos = get_repos(bioc = TRUE), 
           force = TRUE, upgrade = "always"))))
2: revdep_install(pkg, quiet = quiet, env = env)
1: revdepcheck::revdep_check("MultiAssayExperiment", num_workers = 34)

I am using the latest version on the master branch

> packageVersion("revdepcheck")
[1] '1.0.0.9001'
session_info > devtools::session_info() ─ Session info ─────────────────────────────────────────────────────────────── setting value version R Under development (unstable) (2020-10-28 r79382) os Ubuntu 18.04.5 LTS system x86_64, linux-gnu ui X11 language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz America/New_York date 2021-03-03 ─ Packages ─────────────────────────────────────────────────────────────────── package * version date lib source assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.1.0) base64enc 0.1-3 2015-07-28 [1] CRAN (R 4.1.0) bit 4.0.4 2020-08-04 [1] CRAN (R 4.1.0) bit64 4.0.5 2020-08-30 [1] CRAN (R 4.1.0) blob 1.2.1 2020-01-20 [1] CRAN (R 4.1.0) cachem 1.0.4 2021-02-13 [1] RSPM (R 4.1.0) callr 3.5.1 2020-10-13 [1] CRAN (R 4.1.0) cli 2.3.1 2021-02-23 [1] RSPM (R 4.1.0) clisymbols 1.2.0 2017-05-21 [1] CRAN (R 4.1.0) crancache 0.0.0.9001 2020-10-08 [1] Github (r-lib/crancache@7ea4e47) cranlike 1.0.2 2018-11-26 [1] CRAN (R 4.1.0) crayon 1.4.1.9000 2021-03-03 [1] Github (r-lib/crayon@965d1dc) curl 4.3 2019-12-02 [1] CRAN (R 4.1.0) DBI 1.1.1 2021-01-15 [1] CRAN (R 4.1.0) debugme 1.1.0 2017-10-22 [1] CRAN (R 4.1.0) desc 1.2.0 2018-05-01 [1] CRAN (R 4.1.0) devtools 2.3.2 2020-09-18 [1] CRAN (R 4.1.0) digest 0.6.27 2020-10-24 [1] CRAN (R 4.1.0) ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.1.0) fansi 0.4.2 2021-01-15 [1] CRAN (R 4.1.0) fastmap 1.1.0 2021-01-25 [1] RSPM (R 4.1.0) fs 1.5.0 2020-07-31 [1] CRAN (R 4.1.0) glue 1.4.2 2020-08-27 [1] CRAN (R 4.1.0) gmailr 1.0.0 2019-08-23 [1] CRAN (R 4.1.0) hms 1.0.0 2021-01-13 [1] CRAN (R 4.1.0) httr 1.4.2 2020-07-20 [1] CRAN (R 4.1.0) jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.1.0) knitr 1.31 2021-01-27 [1] RSPM (R 4.1.0) lifecycle 1.0.0 2021-02-15 [1] RSPM (R 4.1.0) magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.1.0) memoise 2.0.0 2021-01-26 [1] RSPM (R 4.1.0) parsedate 1.2.0 2019-05-08 [1] CRAN (R 4.1.0) pillar 1.5.0 2021-02-22 [1] RSPM (R 4.1.0) pkgbuild 1.2.0 2020-12-15 [1] CRAN (R 4.1.0) pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.1.0) pkgload 1.2.0 2021-02-23 [1] RSPM (R 4.1.0) prettyunits 1.1.1 2020-01-24 [1] CRAN (R 4.1.0) processx 3.4.5 2020-11-30 [1] CRAN (R 4.1.0) progress 1.2.2 2019-05-16 [1] CRAN (R 4.1.0) ps 1.6.0 2021-02-28 [1] RSPM (R 4.1.0) purrr 0.3.4 2020-04-17 [1] CRAN (R 4.1.0) R6 2.5.0 2020-10-28 [1] CRAN (R 4.1.0) rappdirs 0.3.3 2021-01-31 [1] RSPM (R 4.1.0) rcmdcheck 1.3.3.9000 2021-03-03 [1] Github (r-lib/rcmdcheck@fe512fb) Rcpp 1.0.6 2021-01-15 [1] CRAN (R 4.1.0) rematch2 2.1.2 2020-05-01 [1] CRAN (R 4.1.0) remotes 2.2.0 2020-07-21 [1] CRAN (R 4.1.0) revdepcheck 1.0.0.9001 2021-03-03 [1] Github (r-lib/revdepcheck@a2ece65) rlang 0.4.10 2020-12-30 [1] CRAN (R 4.1.0) rprojroot 2.0.2 2020-11-15 [1] CRAN (R 4.1.0) RSQLite 2.2.3 2021-01-24 [1] RSPM (R 4.1.0) rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.1.0) sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.1.0) testthat 3.0.2 2021-02-14 [1] RSPM (R 4.1.0) tibble 3.1.0 2021-02-25 [1] RSPM (R 4.1.0) usethis 2.0.1 2021-02-10 [1] RSPM (R 4.1.0) utf8 1.1.4 2018-05-24 [1] CRAN (R 4.1.0) vctrs 0.3.6 2020-12-17 [1] CRAN (R 4.1.0) whoami 1.3.0 2019-03-19 [1] CRAN (R 4.1.0) withr 2.4.1 2021-01-26 [1] RSPM (R 4.1.0) xfun 0.21 2021-02-10 [1] RSPM (R 4.1.0) xopen 1.0.0 2018-09-17 [1] CRAN (R 4.1.0) yaml 2.2.1 2020-02-01 [1] CRAN (R 4.1.0) [1] /mnt/STORE1/bighome/mramos/R/bioc-devel [2] /mnt/STORE1/bighome/mramos/src/svn/r-devel/R/lib/R/library
gaborcsardi commented 3 years ago

Set the R_REMOTES_NO_ERRORS_FROM_WARNINGS="true" env var, or use dev remotes.

LiNk-NY commented 3 years ago

Hi @gaborcsardi cc: @hadley

Thanks for your response. This is still not working. I've tried true and false and I get the same error with the devel version of remotes.

> Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS="false")
> Sys.getenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS")
[1] "false"
> revdepcheck::revdep_check("MultiAssayExperiment", num_workers = 34)
── INSTALL ────────────────────────────────────────────────────────────────────────────────────────────── 2 versions ──
Installing CRAN version of MultiAssayExperiment
Installing DEV version of MultiAssayExperiment
Error: Failed to install 'MultiAssayExperiment' from local:
  (converted from warning) installation of package '/tmp/RtmpTLFlIl/file1418f645f430e/MultiAssayExperiment_1.17.14.tar.gz' had non-zero exit status
## remotes devel version
> packageVersion("remotes")
[1] '2.2.0.9000'
gaborcsardi commented 3 years ago

You don't need to set it to anything for dev remotes.

LiNk-NY commented 3 years ago

Sorry Gábor @gaborcsardi, it still doesn't work. As you can see, the package installs with R CMD INSTALL and even with remotes::install_local(force = TRUE).

> library(revdepcheck)
> revdep_check(".", num_workers = 34)
── INSTALL ────────────────────────────────────────────────────────────────────────────────────────────── 2 versions ──
Installing CRAN version of MultiAssayExperiment
Installing DEV version of MultiAssayExperiment
Error: Failed to install 'MultiAssayExperiment' from local:
  (converted from warning) installation of package '/tmp/RtmpE8WoVL/file27df36ab1ed5/MultiAssayExperiment_1.17.14.tar.gz' had non-zero exit status
> Sys.getenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS")
[1] ""
> packageVersion("remotes")
[1] '2.2.0.9000'

R CMD INSTALL

mramos@computer ~/gh/MultiAssayExperiment (branch) $ Rdev CMD INSTALL .
* installing to library '/mnt/STORE1/bighome/mramos/R/bioc-devel'
* installing *source* package 'MultiAssayExperiment' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** 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
* DONE (MultiAssayExperiment)

remotes::install_local

> remotes::install_local(force = TRUE)
✔  checking for file ‘/tmp/RtmpGlBcx6/file1fec435b43f0/MultiAssayExperiment/DESCRIPTION’ ...
─  preparing ‘MultiAssayExperiment’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘MultiAssayExperiment_1.17.14.tar.gz’

Installing package into '/mnt/STORE1/bighome/mramos/R/bioc-devel'
(as 'lib' is unspecified)
* installing *source* package 'MultiAssayExperiment' ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** 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
* DONE (MultiAssayExperiment)
Adding 'MultiAssayExperiment_1.17.14_R_x86_64-pc-linux-gnu.tar.gz' to the cache

Note, I've also tried it with the release version and env variable:

> Sys.getenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS")
[1] "true"
> library(revdepcheck)
> revdep_check("MultiAssayExperiment", num_workers=34)
── INSTALL ────────────────────────────────────────────────────────────────────────────────────────────── 2 versions ──
Installing CRAN version of MultiAssayExperiment
Installing DEV version of MultiAssayExperiment
Error: Failed to install 'MultiAssayExperiment' from local:
  (converted from warning) installation of package '/tmp/Rtmpnz4ZAD/file95eb25dbf45d/MultiAssayExperiment_1.17.15.tar.gz' had non-zero exit status
> packageVersion("remotes")
[1] '2.2.0'
gaborcsardi commented 3 years ago
❯ R CMD INSTALL -l revdep/library.noindex/MultiAssayExperiment/new/ /var/folders/59/0gkmw1yj2w7bf2dfc3jznv5w0000gn/T//RtmpACOYUo/file1500635ab0803/MultiAssayExperiment_1.17.14.tar.gz
* installing *source* package ‘MultiAssayExperiment’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(name) : there is no package called ‘HDF5Array’
Error: unable to load R code in package ‘MultiAssayExperiment’
Execution halted
ERROR: lazy loading failed for package ‘MultiAssayExperiment’
* removing ‘/private/tmp/MultiAssayExperiment/revdep/library.noindex/MultiAssayExperiment/new/MultiAssayExperiment’

Seems like your package does not install without HDF5Array, but it is not a hard dependency of your package.

In general, I suggest you run R CMD check on your package first, to detect these issues, before running revdepcheck.

LiNk-NY commented 3 years ago

Hi Gábor, @gaborcsardi Thanks for the info. I just realized that there is a quiet = TRUE argument that I could've set to FALSE to figure this issue out. FWIW, I did do R CMD check before using your tool and had no problems installing, building, or checking because I have HDF5Array in my lib. Update: It works after solving the 'hard dep' issue. Thanks!

LiNk-NY commented 3 years ago

Hi Claus, @clauswilke

I would recommend that you use

revdepcheck::revdep_check(num_workers = 4, quiet = FALSE)

to debug the issue. Feel free to close the issue if it is not related to the package.

Best, Marcel