r-lib / usethis

Set up commonly used 📦 components
https://usethis.r-lib.org/
Other
854 stars 284 forks source link

Bump glue dependency to 1.3.0 #752

Closed xrobin closed 5 years ago

xrobin commented 5 years ago

I could not install usethis with glue 1.2.0

> install.packages("usethis")
* installing *source* package ‘usethis’ ...
** package ‘usethis’ successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
Error : object ‘glue_collapse’ is not exported by 'namespace:glue'
ERROR: lazy loading failed for package ‘usethis’

This is because glue_collapse is new in glue 1.3.0. Could you please update the version in the DESCRIPTION file to reflect that?

hblanks commented 5 years ago

It'd be nice to push a new tag for this - installing devtools fresh right now fails because latest usethis can't be built due to this bug.

sritchie73 commented 5 years ago

And of course you can't use devtools::install("r-lib/usethis") to get the latest version, because devtools depends on usethis. This needs to be pushed to CRAN.

sritchie73 commented 5 years ago

For anyone else finding this issue by searching for the error; the explicit workaround is to manually install the glue package first:

install.packages("glue")
install.packages("usethis") # Now won't fail with error above
install.packages("devtools") # will hopefully work barring any problems with other dependencies
ashleymaeconard commented 4 years ago

Installing glue did not work for me in R 3.6.1. I am still getting the same error. Do you have any ideas?

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS/LAPACK: /Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/lib/libRblas.dylib

Random number generation:
 RNG:     Mersenne-Twister 
 Normal:  Inversion 
 Sample:  Rounding 

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
[1] BiocManager_1.30.10 compiler_3.6.1      tools_3.6.1   `
> install.packages("usethis")
Installing package into ‘/Users/ashleymaeconard/Library/R/3.6/library’
(as ‘lib’ is unspecified)
also installing the dependency ‘fs’

trying URL 'https://ftp.gwdg.de/pub/misc/cran/src/contrib/fs_1.3.1.tar.gz'
Content type 'application/octet-stream' length 812680 bytes (793 KB)
==================================================
downloaded 793 KB

trying URL 'https://ftp.gwdg.de/pub/misc/cran/src/contrib/usethis_1.5.1.tar.gz'
Content type 'application/octet-stream' length 620225 bytes (605 KB)
==================================================
downloaded 605 KB

* installing *source* package ‘fs’ ...
** package ‘fs’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c error.cc -o error.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c dir.cc -o dir.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c utils.cc -o utils.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c link.cc -o link.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c path.cc -o path.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c file.cc -o file.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c fs.cc -o fs.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c id.cc -o id.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c unix/getmode.cc -o unix/getmode.o
x86_64-apple-darwin13.4.0-clang++ -std=gnu++11 -I"/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib/R/include" -DNDEBUG -I./libuv/include -I. -pthread -I"/Users/ashleymaeconard/Library/R/3.6/library/Rcpp/include" -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9  -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include  -fPIC  -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden  -fmessage-length=0 -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -c RcppExports.cpp -o RcppExports.o
cp -p -f libuv/m4/lt_obsolete.m4 libuv/m4/lt~obsolete.m4
(cd libuv \
        && touch aclocal.m4 \
        && touch -r aclocal.m4 configure Makefile.in \
&& CC="x86_64-apple-darwin13.4.0-clang" CFLAGS="-march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -I/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/include -fdebug-prefix-map=/opt/concourse/worker/volumes/live/59b7f007-fada-42cf-7435-5bbd0518eaa4/volume/r-base_1570124919999/work=/usr/local/src/conda/r-base-3.6.1 -fdebug-prefix-map=/Users/ashleymaeconard/anaconda2/envs/environment_jan122020=/usr/local/src/conda-prefix  -fPIC " AR="x86_64-apple-darwin13.4.0-ar" RANLIB="x86_64-apple-darwin13.4.0-ranlib" LDFLAGS="-Wl,-dead_strip_dylibs  -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib -L/Users/ashleymaeconard/anaconda2/envs/environment_jan122020/lib" ./configure --quiet)
configure: error: in `/private/var/folders/yj/0tv0rdpj1wl59w2sp889m4640000gn/T/RtmpafCUJZ/R.INSTALL122ce19aa21f3/fs/src/libuv':
configure: error: C compiler cannot create executables
See `config.log' for more details
make: *** [Makevars:32: libuv/Makefile] Error 77
ERROR: compilation failed for package ‘fs’
* removing ‘/Users/ashleymaeconard/Library/R/3.6/library/fs’
* installing *source* package ‘usethis’ ...
** package ‘usethis’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace ‘fs’ 1.2.7 is being loaded, but >= 1.3.0 is required
Calls: <Anonymous> ... withCallingHandlers -> loadNamespace -> namespaceImport -> loadNamespace
Execution halted
ERROR: lazy loading failed for package ‘usethis’
* removing ‘/Users/ashleymaeconard/Library/R/3.6/library/usethis’

The downloaded source packages are in
        ‘/private/var/folders/yj/0tv0rdpj1wl59w2sp889m4640000gn/T/Rtmp8qgtMx/downloaded_packages’
Warning messages:
1: In install.packages("usethis") :
  installation of package ‘fs’ had non-zero exit status
2: In install.packages("usethis") :
  installation of package ‘usethis’ had non-zero exit status`
jennybc commented 4 years ago

@ashleymaeconard I note that you seem to be using anaconda? If that's how you've installed R, that's generally how you must install packages, which means you are very constrained re: installing packages and esp. dev packages. You can't really mix and match between conda managed packages, CRAN, and GitHub.

https://rstats.wtf/set-up-an-r-dev-environment.html#what-about-conda

HemersonTacon commented 4 years ago

For anyone else finding this issue by searching for the error; the explicit workaround is to manually install the glue package first:

install.packages("glue")
install.packages("usethis") # Now won't fail with error above
install.packages("devtools") # will hopefully work barring any problems with other dependencies

I followed this in RStudio and still cannot manage to make devtools work properly

> install.packages("glue")
Installing package into ‘/Users/hemerson.tacon/Library/R/3.6/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/glue_1.3.1.tgz'
Content type 'application/x-gzip' length 161354 bytes (157 KB)
==================================================
downloaded 157 KB

The downloaded binary packages are in
    /var/folders/mz/qzcmf1ld0kd41_fscwqmw7sr0000gq/T//Rtmpkp1vLy/downloaded_packages
> install.packages("usethis")
Installing package into ‘/Users/hemerson.tacon/Library/R/3.6/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/usethis_1.5.1.tgz'
Content type 'application/x-gzip' length 912856 bytes (891 KB)
==================================================
downloaded 891 KB

The downloaded binary packages are in
    /var/folders/mz/qzcmf1ld0kd41_fscwqmw7sr0000gq/T//Rtmpkp1vLy/downloaded_packages
> install.packages("devtools")
Installing package into ‘/Users/hemerson.tacon/Library/R/3.6/library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/devtools_2.2.1.tgz'
Content type 'application/x-gzip' length 339075 bytes (331 KB)
==================================================
downloaded 331 KB

The downloaded binary packages are in
    /var/folders/mz/qzcmf1ld0kd41_fscwqmw7sr0000gq/T//Rtmpkp1vLy/downloaded_packages
> library(devtools)
Loading required package: usethis
Error: package or namespace load failed for ‘usethis’ in get(Info[i, 1], envir = env):
 lazy-load database '/Users/hemerson.tacon/Library/R/3.6/library/glue/R/glue.rdb' is corrupt
Error: package ‘usethis’ could not be loaded
In addition: Warning message:
In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1

Here is the sessionInfo dump:

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
[1] compiler_3.6.1 tools_3.6.1    fs_1.3.1       Rcpp_1.0.3    

EDIT: Weirdly enough, using packrat to create an R env works 🤔 The difference in the sessionInfo dump is in the BLAS location and some other package that are loaded in the namespace

sessionInfo of this env:

> sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

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

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3        magrittr_1.5      usethis_1.5.1     devtools_2.2.1
 [5] pkgload_1.0.2     R6_2.4.1          rlang_0.4.2       fansi_0.4.1
 [9] tools_3.6.1       pkgbuild_1.0.6    packrat_0.5.0     sessioninfo_1.1.1
[13] cli_2.0.1         withr_2.1.2       ellipsis_0.3.0    remotes_2.1.0
[17] assertthat_0.2.1  digest_0.6.23     rprojroot_1.3-2   crayon_1.3.4
[21] processx_3.4.1    callr_3.4.0       fs_1.3.1          ps_1.3.0
[25] testthat_2.3.1    memoise_1.1.0     glue_1.3.1        compiler_3.6.1
[29] desc_1.2.0        backports_1.1.5   prettyunits_1.1.0
xrobin commented 4 years ago

@HemersonTacon @ashleymaeconard your errors are pretty different (a compilation error with the fs package and a corrupted glue.rdb). They should be opened in separate issues.