When running revdep_check() on Shiny in Linux, it does this on my machine:
> revdep_check()
Reverse dependency checks for shiny ============================================
Saving check results in `revdep/checks/`
Computing reverse dependencies
Installing shiny 0.13.2.9005 and dependencies to /R-lib/
Setting env vars ---------------------------------------------------------------
NOT_CRAN : false
RGL_USE_NULL: true
DISPLAY :
Checking 207 CRAN packages =====================================================
Results saved in /home/shiny/shiny-master/revdep/checks
Installing dependencies --------------------------------------------------------
Determining available packages
trying URL 'https://cran.rstudio.com/src/contrib/AFM_1.2.2.tar.gz'
Content type 'unknown' length 1007273 bytes (983 KB)
==================================================
downloaded 983 KB
trying URL 'https://cran.r-project.org/src/contrib/fftwtools_0.9-7.tar.gz'
Content type 'unknown' length 145998 bytes (142 KB)
==================================================
downloaded 142 KB
Error: Command failed (1)
It turns out the problem is that fftwtools needs fftw3.h to compile, but that information isn't reported or saved anywhere. I found the problem by running options(error=recover), finding the R CMD INSTALL command that was being run, and then running that command inside another terminal.
One more note: This issue makes it very difficult to run revdep checks on Linux, because any package installation failure leads to the revdep_check() exiting, and without any information about why. It would help to:
revdep_check even if some package installations fail, because the user might not want to install every single system dependency required for all the packages to compile correctly.You could try #1300 or my m-revdep branch (where I collect revdep-related fixes):
devtools::install_github("hadley/devtools#1300")
devtools::install_github("krlmlr/devtools@m-revdep")
Hmm, neither of those install_github commands works for me ("404 not found"). Does install_github really know about those kinds of references ... ? (Maybe this has been incorporated into the master branch? I'm going to install_github("hadley/devtools") and see how it goes ...)
At the beginning I had the same problem as @wch that revdep_check() (for afex) just failed with Error: Command failed (1) while installing the required packages on Linux.
The solution was to set a libpath outside the package directory (e.g., revdep_check(libpath = "../revdep")) and install all failed packages per hand there (e.g., install.packages("apa", lib = "../revdep")). Then I had to continue with revdep_check_resume() until the next package failed which I would then install with install.packages again, and so forth (i.e., I could install the failing packages via install.packages, but not via revdep_check() and could not figure out why).
Unfortunately, after all packages had been installed, revdep_check(libpath = "../revdep") failed again:
> revdep_check(libpath = "../revdep")
Reverse dependency checks for afex =============================================================
Saving check results in `revdep/checks/`
Computing reverse dependencies
Installing afex 0.17-3 and dependencies to ../revdep
Setting env vars -------------------------------------------------------------------------------
NOT_CRAN : false
RGL_USE_NULL: true
DISPLAY :
Checking 4 CRAN packages =======================================================================
Results saved in /home/henrik/packages/afex/git/afex/revdep/checks
Installing dependencies ------------------------------------------------------------------------
Determining available packages
Downloading source packages for checking
Checking packages ------------------------------------------------------------------------------
Error: Check failed: '/home/henrik/packages/afex/git/afex/revdep/checks/apa.Rcheck' doesn't exist
The solution was to also use a check_dir outside the package directory: revdep_check(libpath = "../revdep", check_dir = "../revdep_checks"). This worked; it created and then deleted ../revdep_checks. However it nevertheless created revdep in the package directory (which contained the results check.rds):
> revdep_check(libpath = "../revdep", check_dir = "../revdep_checks")
Reverse dependency checks for afex =============================================================
Computing reverse dependencies
Installing afex 0.17-3 and dependencies to ../revdep
Setting env vars -------------------------------------------------------------------------------
NOT_CRAN : false
RGL_USE_NULL: true
DISPLAY :
Checking 4 CRAN packages =======================================================================
Results saved in ../revdep_checks
Installing dependencies ------------------------------------------------------------------------
Determining available packages
Downloading source packages for checking
Checking packages ------------------------------------------------------------------------------
Checked apa : 0 errors | 0 warnings | 0 notes
Checked fullfact: 0 errors | 0 warnings | 0 notes
Checked jmv : 0 errors | 0 warnings | 0 notes
Checked r2glmm : 0 errors | 0 warnings | 0 notes
Saving check results to `revdep/check.rds` -----------------------------------------------------
Cleaning up ------------------------------------------------------------------------------------
I have the same issue of cryptic error message on macOS.
Edit: Got things much faster and streamlined by setting options(pkgType = "mac.binary")
should type defaults to binary packages for platforms that support it?
Edit: Maybe the question is: when pkgType is set to "both", why does it try installing source packages when a binary is available?
Hmm. I followed @singmann 's advice but I still get
revdep_check("bbmle",libpath="bbmle_revdep_check/",check_dir="revdep_checks")
Reverse dependency checks for bbmle ============================================
Computing reverse dependencies
Installing bbmle 1.0.19 and dependencies to bbmle_revdep_check/
Setting env vars ---------------------------------------------------------------
NOT_CRAN : false
RGL_USE_NULL: true
DISPLAY :
Checking 14 CRAN packages ======================================================
Results saved in revdep_checks
Installing dependencies --------------------------------------------------------
Determining available packages
Downloading source packages for checking
Checking packages --------------------------------------------------------------
Error: Check failed: '/media/sf_Documents/Rpkgs/revdep_checks/broom.Rcheck' doesn't exist
(same results with revdep_check="../revdep_checks")
any hints/diagnostic ideas?
Maybe the question is: when pkgType is set to "both", why does it try installing source packages when a binary is available?
This is a good question, I am not sure of the answer but it is clearly not working as intended.
@bbolker I managed to get it to run for bbmle, at least partly, under the following condition (same as for my package):
revdep_check(libpath = "../revdep", check_dir = "../revdep_checks")install.packages("xergm", lib = "../revdep")revdep_check_resume()This gives (with the latest github master version):
Installing bbmle 1.0.19 and dependencies to ../revdep
Setting env vars ---------------------------------------------------------------------------------------
NOT_CRAN : false
RGL_USE_NULL: true
DISPLAY :
Checking 14 CRAN packages ==============================================================================
Results saved in ../revdep_checks
Installing dependencies --------------------------------------------------------------------------------
Determining available packages
Downloading source packages for checking
Downloading 14 packages
Checking packages --------------------------------------------------------------------------------------
Checked broom : 0 errors | 1 warning | 0 notes
Checked copula : 0 errors | 0 warnings | 2 notes
Checked emdbook : 0 errors | 0 warnings | 0 notes
Checked frair : 0 errors | 0 warnings | 0 notes
Checked glmmTMB : 0 errors | 0 warnings | 1 note
Checked Luminescence: 0 errors | 0 warnings | 0 notes
Checked metamisc : 0 errors | 0 warnings | 0 notes
Checked metaplus : 0 errors | 0 warnings | 0 notes
Checked primer : 0 errors | 0 warnings | 3 notes
Checked R2admb : 0 errors | 0 warnings | 1 note
Checked 10/14. Elapsed 00:15. Remaining ~00:06
Checked rstpm2 : 0 errors | 0 warnings | 1 note
Checked sads : 0 errors | 0 warnings | 0 notes
Checked SEERaBomb : 0 errors | 0 warnings | 0 notes
Checked ss3sim : 0 errors | 1 warning | 0 notes
Saving check results to `revdep/check.rds` -------------------------------------------------------------
Error in desc$Priority : $ operator is invalid for atomic vectors
In addition: Warning message:
In packageDescription(pkg) : no package 'emdbook' was found
Unfortunately, it seems that the error and warning in the end related to emdbook break the writing of the check.rds file so no compact output is saved. It seems one can only get th eoutput from the individual check folders.
Should be much better in revdepcheck please file issues there if not.
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/
Most helpful comment
One more note: This issue makes it very difficult to run revdep checks on Linux, because any package installation failure leads to the
revdep_check()exiting, and without any information about why. It would help to:revdep_checkeven if some package installations fail, because the user might not want to install every single system dependency required for all the packages to compile correctly.