skgrange / threadr

Tools to Thread Pieces Of Data Analysis Together
GNU General Public License v3.0
31 stars 7 forks source link

Error in i.p(...) : (converted from warning) installation of package #5

Closed nagdevAmruthnath closed 4 years ago

nagdevAmruthnath commented 4 years ago

Issue installing package

There is an issue installing the latest version of the package.

> devtools::install_github("skgrange/threadr", dependencies = c("Depends", "Imports"))
Downloading GitHub repo skgrange/threadr@master
✔  checking for file ‘/tmp/Rtmp6SKBdU/remotes5d03bb59d13/skgrange-threadr-9ff43f3/DESCRIPTION’ ...
─  preparing ‘threadr’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘threadr_0.9.002.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Error in i.p(...) : 
  (converted from warning) installation of package ‘/tmp/Rtmp6SKBdU/file5d02f6890c7/threadr_0.9.002.tar.gz’ had non-zero exit status

Session Info

Below is my session info

> sessionInfo()
R version 3.5.2 (2018-12-20)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)

Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=C              LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.0        rstudioapi_0.9.0  magrittr_1.5      usethis_1.4.0     devtools_2.0.1    pkgload_1.0.2     R6_2.3.0          rlang_0.3.1      
 [9] tools_3.5.2       pkgbuild_1.0.2    parallel_3.5.2    sessioninfo_1.1.1 cli_1.0.1         withr_2.1.2       remotes_2.0.2     yaml_2.2.0       
[17] assertthat_0.2.0  rprojroot_1.3-2   digest_0.6.18     crayon_1.3.4      processx_3.2.1    callr_3.1.1       fs_1.2.6          ps_1.3.0         
[25] testthat_2.0.1    curl_3.3          glue_1.3.0        memoise_1.1.0     compiler_3.5.2    desc_1.2.0        backports_1.1.3   prettyunits_1.0.2

Steps to reproduce

I used docker from rocker and tried to install threadr package and it did not work.

Alternatives solution for time being

> devtools::install_github("skgrange/threadr@a0f80e9035f78048adf7e9371c204e148dff5073", dependencies = c("Depends", "Imports"))
Downloading GitHub repo skgrange/threadr@a0f80e9035f78048adf7e9371c204e148dff5073
Installing 2 packages: fuzzyjoin, geosphere
Installing packages into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2019-02-02/src/contrib/fuzzyjoin_0.1.4.tar.gz'
Content type 'application/octet-stream' length 101076 bytes (98 KB)
==================================================
downloaded 98 KB

trying URL 'https://mran.microsoft.com/snapshot/2019-02-02/src/contrib/geosphere_1.5-7.tar.gz'
Content type 'application/octet-stream' length 758133 bytes (740 KB)
==================================================
downloaded 740 KB

gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c dist.c -o dist.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c geodesic.c -o geodesic.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c geolib.c -o geolib.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c geosphere_init.c -o geosphere_init.o
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c util.c -o util.o
gcc -shared -L/usr/local/lib/R/lib -L/usr/local/lib -o geosphere.so dist.o geodesic.o geolib.o geosphere_init.o util.o -L/usr/local/lib/R/lib -lR

The downloaded source packages are in
    ‘/tmp/Rtmp6SKBdU/downloaded_packages’
✔  checking for file ‘/tmp/Rtmp6SKBdU/remotes5d01cff0bf3/skgrange-threadr-a0f80e9/DESCRIPTION’ ...
─  preparing ‘threadr’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘threadr_0.8.716.tar.gz’

Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
nagdevAmruthnath commented 4 years ago

Alright! so, i did a pull of the package and did a build and came across this error Error : object ‘across’ is not exported by 'namespace:dplyr' along with Packages suggested but not available for checking: ‘jpeg’ ‘systemr’ warning.

I looked up the recent Travis-CI build and found that dplyr version used in here is 1.0.1. Also, the packages hms and ggplot2 had to be updated. For some reason, my Rstudio from Rocker tries to pull packages from https://mran.microsoft.com/ and they usually have older and stable version of the packages. Apparently this needed a new version.

To solve the above issues, did the following:

# the reason repos is cloud.r-project is because, this is what was used for build
install.packages("dplyr", version = "1.0.1", repos = "https://cloud.r-project.org")
install.packages("hms", repos = "https://cloud.r-project.org")
install.packages("ggplot2", repos = "https://cloud.r-project.org")

Package check

I did a complete check of the package and was successfully built with few warnings (no Biggie!)

==> devtools::check()

Updating threadr documentation
Warning: Version of roxygen2 last used with this package is 7.1.1.  You only have version 6.1.1
Writing NAMESPACE
Loading threadr
Loading required package: stringr
Loading required package: lubridate

Attaching package: ‘lubridate’

The following object is masked from ‘package:base’:

    date

Loading required package: dplyr

Attaching package: ‘dplyr’

The following objects are masked from ‘package:lubridate’:

    intersect, setdiff, union

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

Warning: dplyr_re_exports.R:7: Missing name
Warning: dplyr_re_exports.R:24: Missing name
Warning: stats_and_utils_re_exports.R:4: Missing name
Warning: stats_and_utils_re_exports.R:10: Missing name
Warning: stats_and_utils_re_exports.R:16: Missing name
Warning: zzz.R:3: Missing name
Writing NAMESPACE
── Building ─────────────────────────────────────────────────────────────────────────────────────────────────────── threadr ──
Setting env vars:
● CFLAGS    : -Wall -pedantic -fdiagnostics-color=always
● CXXFLAGS  : -Wall -pedantic -fdiagnostics-color=always
● CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/home/rstudio/threadr/DESCRIPTION’ (335ms)
─  preparing ‘threadr’:
✔  checking DESCRIPTION meta-information ...
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘threadr_0.9.002.tar.gz’

── Checking ─────────────────────────────────────────────────────────────────────────────────────────────────────── threadr ──
Setting env vars:
● _R_CHECK_CRAN_INCOMING_REMOTE_: FALSE
● _R_CHECK_CRAN_INCOMING_       : FALSE
● _R_CHECK_FORCE_SUGGESTS_      : FALSE
── R CMD check ─────────────────────────────────────────────────────────────────
─  using log directory ‘/home/rstudio/threadr.Rcheck’ (367ms)
─  using R version 3.5.2 (2018-12-20)
─  using platform: x86_64-pc-linux-gnu (64-bit)
─  using session charset: UTF-8
─  using options ‘--no-manual --as-cran’
✔  checking for file ‘threadr/DESCRIPTION’
─  checking extension type ... Package
─  this is package ‘threadr’ version ‘0.9.002’
─  package encoding: UTF-8
✔  checking package namespace information ...
N  checking package dependencies (3.4s)
   Packages suggested but not available for checking: ‘jpeg’ ‘systemr’
✔  checking if this is a source package
✔  checking if there is a namespace
✔  checking for executable files (1.2s)
✔  checking for hidden files and directories
✔  checking for portable file names ...
✔  checking for sufficient/correct file permissions
✔  checking serialization versions
✔  checking whether package ‘threadr’ can be installed (4.3s)
✔  checking installed package size ...
✔  checking package directory ...
✔  checking DESCRIPTION meta-information (401ms)
✔  checking top-level files
✔  checking for left-over files
✔  checking index information
✔  checking package subdirectories ...
✔  checking R files for non-ASCII characters ...
✔  checking R files for syntax errors ...
✔  checking whether the package can be loaded (867ms)
✔  checking whether the package can be loaded with stated dependencies (892ms)
✔  checking whether the package can be unloaded cleanly (853ms)
✔  checking whether the namespace can be loaded with stated dependencies (595ms)
✔  checking whether the namespace can be unloaded cleanly (704ms)
✔  checking loading without being on the library search path (923ms)
N  checking dependencies in R code (2.4s)
   Package in Depends field not imported from: ‘lubridate’
     These packages need to be imported from (in the NAMESPACE file)
     for when this namespace is loaded but not attached.
   Missing or unexported object: ‘stringr::str_to_sentence’
✔  checking S3 generic/method consistency (1.8s)
✔  checking replacement functions (817ms)
✔  checking foreign function calls (1.1s)
✔  checking R code for possible problems (8s)
✔  checking Rd files (542ms)
✔  checking Rd metadata ...
✔  checking Rd line widths (377ms)
N  checking Rd cross-references (3.7s)
   Package unavailable to check Rd xrefs: ‘openair’
✔  checking for missing documentation entries (885ms)
✔  checking for code/documentation mismatches (2.9s)
✔  checking Rd \usage sections (2.7s)
✔  checking Rd contents (424ms)
✔  checking for unstated dependencies in examples (479ms)
✔  checking examples (5.4s)
✔  checking for unstated dependencies in ‘tests’ ...
─  checking tests ...
✔  Running ‘testthat.R’

   See
     ‘/home/rstudio/threadr.Rcheck/00check.log’
   for details.

── R CMD check results ──────────────────────────────────── threadr 0.9.002 ────
Duration: 50.4s

❯ checking package dependencies ... NOTE
  Packages suggested but not available for checking: ‘jpeg’ ‘systemr’

❯ checking dependencies in R code ... NOTE
  Package in Depends field not imported from: ‘lubridate’
    These packages need to be imported from (in the NAMESPACE file)
    for when this namespace is loaded but not attached.
  Missing or unexported object: ‘stringr::str_to_sentence’

❯ checking Rd cross-references ... NOTE
  Package unavailable to check Rd xrefs: ‘openair’

0 errors ✔ | 0 warnings ✔ | 3 notes ✖

R CMD check succeeded

Package install

==> R CMD INSTALL --no-multiarch --with-keep.source threadr

* installing to library ‘/usr/local/lib/R/site-library’
* installing *source* package ‘threadr’ ...
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** testing if installed package can be loaded
* DONE (threadr)