willpearse / MADtraits

Make A Database of trait data
Other
10 stars 39 forks source link

Installation fails with devtools::install_github('willpearse/MADtraits') #97

Open AlbanSagouis opened 4 years ago

AlbanSagouis commented 4 years ago

Hi,

In an R project using renv, I just tried installing MADtraits with devtools::install_github('willpearse/MADtraits') but it failed, the error message being:

* installing *source* package 'MADtraits' ...
** using staged installation
** R
Error in load(srcFile, e) : 
  (converted from warning) strings not representable in native encoding will be translated to UTF-8
ERROR: unable to build sysdata DB for package 'MADtraits'
* removing 'C:/Users/as80fywe/idiv/sTeTra/sTeTra/renv/library/R-4.0/x86_64-w64-mingw32/MADtraits'
Error: Failed to install 'MADtraits' from GitHub:
  (converted from warning) installation of package ‘C:/Users/as80fywe/AppData/Local/Temp/Rtmpqalzq5/file1fd479567573/MADtraits_1.0-0.tar.gz’ had non-zero exit status
In addition: Warning messages:
1: In untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers
2: In untar2(tarfile, files, list, exdir, restore_times) :
  skipping pax global extended headers

After a search online, installation succeeded using:

> withr::with_envvar(c(R_REMOTES_NO_ERRORS_FROM_WARNINGS="true"), 
+                    remotes::install_github('willpearse/MADtraits')
+ )

Using this method, the same warnings appeared but no error:

* installing *source* package 'MADtraits' ...
** using staged installation
** R
Warning in load(srcFile, e) :
  strings not representable in native encoding will be translated to UTF-8
Warning in load(srcFile, e) :
  input string 'diplopylidium_nü¾¦˜¼lleri' cannot be translated to UTF-8, is it valid in 'UTF-8' ?
** inst
** byte-compile and prepare package for lazy loading
n*** Successfully loaded .Rprofile ***n
** help
*** installing help indices
  converting help for package 'MADtraits'
    finding HTML links ... done
    MADtraits                               html  
    MADtraits_citations                     html  
    MADtraits_datasets                      html  
    citations                               html  
    clean.MADtraits                         html  
    datasets                                html  
** building package indices
n*** Successfully loaded .Rprofile ***n
** installing vignettes
   'MADtraits-intro.Rnw' 
** testing if installed package can be loaded from temporary location
n*** Successfully loaded .Rprofile ***n
** testing if installed package can be loaded from final location
n*** Successfully loaded .Rprofile ***n
** testing if installed package keeps a record of temporary installation path
* DONE (MADtraits)

Sorry that I have no clue about what the problem is...

Cheers,

Alban

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
[1] drake_7.12.5    MADtraits_1.0-0

loaded via a namespace (and not attached):
  [1] nlme_3.1-149      fs_1.5.0          bold_1.1.0        usethis_1.6.3    
  [5] lubridate_1.7.9   devtools_2.3.2    progress_1.2.2    filelock_1.0.2   
  [9] httr_1.4.2        rprojroot_1.3-2   tools_4.0.2       backports_1.1.10 
 [13] R6_2.4.1          DT_0.15           withr_2.3.0       tidyselect_1.1.0 
 [17] prettyunits_1.1.1 processx_3.4.4    curl_4.3          compiler_4.0.2   
 [21] cli_2.0.2         xml2_1.3.2        desc_1.2.0        triebeard_0.3.0  
 [25] mvtnorm_1.1-1     callr_3.4.4       handlr_0.2.0      convertr_0.1     
 [29] stringr_1.4.0     digest_0.6.25     txtq_0.2.3        rmarkdown_2.4    
 [33] pkgconfig_2.0.3   htmltools_0.5.0   bibtex_0.4.2.3    sessioninfo_1.1.1
 [37] fastmap_1.0.1     htmlwidgets_1.5.2 rlang_0.4.7       readxl_1.3.1     
 [41] rstudioapi_0.11   httpcode_0.3.0    shiny_1.5.0       generics_0.0.2   
 [45] zoo_1.8-8         jsonlite_1.7.1    gtools_3.8.2      dplyr_1.0.2      
 [49] magrittr_1.5      Rcpp_1.0.5        fansi_0.4.1       ape_5.4-1        
 [53] RefManageR_1.2.12 lifecycle_0.2.0   stringi_1.5.3     yaml_2.2.1       
 [57] storr_1.2.1       MASS_7.3-53       pkgbuild_1.1.0    plyr_1.8.6       
 [61] grid_4.0.2        parallel_4.0.2    gdata_2.18.0      promises_1.1.1   
 [65] crayon_1.3.4      miniUI_0.1.1.1    lattice_0.20-41   conditionz_0.1.0 
 [69] hms_0.5.3         knitr_1.30        ps_1.3.4          pillar_1.4.6     
 [73] uuid_0.1-4        taxize_0.9.98     igraph_1.2.5      caper_1.0.1      
 [77] base64url_1.4     codetools_0.2-16  reshape2_1.4.4    pkgload_1.1.0    
 [81] crul_1.0.0        glue_1.4.2        rcrossref_1.1.0   evaluate_0.14    
 [85] data.table_1.13.0 remotes_2.2.0     renv_0.12.0       foreach_1.5.0    
 [89] vctrs_0.3.4       httpuv_1.5.4      urltools_1.7.3    testthat_2.3.2   
 [93] cellranger_1.1.0  purrr_0.3.4       tidyr_1.1.2       reshape_0.8.8    
 [97] assertthat_0.2.1  xfun_0.18         mime_0.9          xtable_1.8-4     
[101] later_1.1.0.1     tibble_3.0.3      iterators_1.0.12  suppdata_1.1-4   
[105] tinytex_0.26      memoise_1.1.0     ellipsis_0.3.1   
willpearse commented 4 years ago

Thanks for this, Alban. This is under development (indeed, I advertise on the GitHub landing page that the build fails) but I am grateful that you're using the package!

This error is likely because some of your dependencies were built under different R versions (see here https://github.com/r-lib/remotes/issues/403). The fix you've described is likely working because the installation process is warning you that some packages were built under different versions of R, and install_github's default is to fail if there are warnings (unlike base R's install.packages).

I hope that helps; thanks again for using the package!