Bioconductor / DelayedArray

A unified framework for working transparently with on-disk and in-memory array-like datasets
https://bioconductor.org/packages/DelayedArray
24 stars 9 forks source link

Install Errors #83

Closed Samantha-Czn closed 3 years ago

Samantha-Czn commented 3 years ago

Hi, I'm having trouble installing DelayedArray for R version 4.0.2. These are the errors and warnings I get:

Warning messages:
1: multiple methods tables found for ‘mstack’ 
2: multiple methods tables found for ‘which’ 
Warning: replacing previous import ‘S4Vectors::mstack’ by ‘IRanges::mstack’ when loading ‘DelayedArray’
Creating a new generic function for ‘rowsum’ in package ‘DelayedArray’
Creating a new generic function for ‘aperm’ in package ‘DelayedArray’
Error in reconcilePropertiesAndPrototype(name, slots, prototype, superClasses,  : 
  no definition was found for superclass “DataTable” in the specification of class “DelayedMatrix”
Error: unable to load R code in package ‘DelayedArray’

It installs fine on R/3.6.3 but not on 4.0.2. Is there anything I can do to fix this?

Thank you

(The full input and output is:

> BiocManager::install("DelayedArray")
Bioconductor version 3.11 (BiocManager 1.30.10), R 4.0.2 (2020-06-22)
Installing package(s) 'DelayedArray'
trying URL 'https://bioconductor.org/packages/3.11/bioc/src/contrib/DelayedArray_0.14.1.tar.gz'
Content type 'application/x-gzip' length 563219 bytes (550 KB)
==================================================
downloaded 550 KB

* installing *source* package ‘DelayedArray’ ...
** using staged installation
** libs
gcc -std=gnu99 -I"/apps/R/4.0.2/lib64/R/include" -DNDEBUG  -I'/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/S4Vectors/include' -I/usr/local/include   -fpic  -g -O2  -c R_init_DelayedArray.c -o R_init_DelayedArray.o
gcc -std=gnu99 -I"/apps/R/4.0.2/lib64/R/include" -DNDEBUG  -I'/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/S4Vectors/include' -I/usr/local/include   -fpic  -g -O2  -c S4Vectors_stubs.c -o S4Vectors_stubs.o
gcc -std=gnu99 -I"/apps/R/4.0.2/lib64/R/include" -DNDEBUG  -I'/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/S4Vectors/include' -I/usr/local/include   -fpic  -g -O2  -c abind.c -o abind.o
gcc -std=gnu99 -I"/apps/R/4.0.2/lib64/R/include" -DNDEBUG  -I'/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/S4Vectors/include' -I/usr/local/include   -fpic  -g -O2  -c array_selection.c -o array_selection.o
gcc -std=gnu99 -I"/apps/R/4.0.2/lib64/R/include" -DNDEBUG  -I'/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/S4Vectors/include' -I/usr/local/include   -fpic  -g -O2  -c compress_atomic_vector.c -o compress_atomic_vector.o
gcc -std=gnu99 -I"/apps/R/4.0.2/lib64/R/include" -DNDEBUG  -I'/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/S4Vectors/include' -I/usr/local/include   -fpic  -g -O2  -c dgCMatrix_utils.c -o dgCMatrix_utils.o
gcc -std=gnu99 -shared -L/apps/R/4.0.2/lib64/R/lib -Wl,-rpath=/apps/R/4.0.2/lib64/R/lib -o DelayedArray.so R_init_DelayedArray.o S4Vectors_stubs.o abind.o array_selection.o compress_atomic_vector.o dgCMatrix_utils.o -L/apps/R/4.0.2/lib64/R/lib -lR
installing to /home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/00LOCK-DelayedArray/00new/DelayedArray/libs
** R
** inst
** byte-compile and prepare package for lazy loading
Warning messages:
1: multiple methods tables found for ‘mstack’ 
2: multiple methods tables found for ‘which’ 
Warning: replacing previous import ‘S4Vectors::mstack’ by ‘IRanges::mstack’ when loading ‘DelayedArray’
Creating a new generic function for ‘rowsum’ in package ‘DelayedArray’
Creating a new generic function for ‘aperm’ in package ‘DelayedArray’
Error in reconcilePropertiesAndPrototype(name, slots, prototype, superClasses,  : 
  no definition was found for superclass “DataTable” in the specification of class “DelayedMatrix”
Error: unable to load R code in package ‘DelayedArray’
Execution halted
ERROR: lazy loading failed for package ‘DelayedArray’
* removing ‘/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/DelayedArray’
* restoring previous ‘/home/z5259715/R/x86_64-pc-linux-gnu-library/4.0/DelayedArray’

The downloaded source packages are in
        ‘/scratch/pbs.928507.kman.restech.unsw.edu.au/RtmpkJZ3Ok/downloaded_packages’
Installation path not writeable, unable to update packages: ade4, ape,
  argparse, backports, bibtex, bit64, callr, car, chron, circlize, cli, clipr,
  clusterGeneration, coda, colorspace, colourpicker, conquer, covr, cowplot,
  cplexAPI, cpp11, data.table, deldir, Deriv, devtools, digest, dismo,
  distillery, doMC, doParallel, dplyr, DT, e1071, extRemes, fields,
  fitdistrplus, foreach, Formula, future, generics, ggplot2, ggrepel, gh,
  glinternet, gllvm, globals, glue, googleVis, gplots, GWmodel, htmlTable,
  htmlwidgets, igraph, inline, isoband, iterators, jsonlite, knitr, labeling,
  lava, leiden, lme4, lmtest, loo, lubridate, magick, magrittr, maptools,
  matrixStats, mclust, mnormt, multcomp, mvabund, mvnfast, openssl, openxlsx,
  patchwork, pbapply, pbdZMQ, pbkrtest, phytools, pillar, pkgbuild, pkgmaker,
  plotly, processx, ps, quantreg, R.methodsS3, R.oo, R.utils, R6, raster,
  RcppAnnoy, RcppArmadillo, RcppEigen, Rdpack, readr, recipes, rentrez,
  reticulate, rgdal, rgeos, rgl, rlang, rmarkdown, rotl, rprojroot, rredlist,
  rstudioapi, sandwich, sctransform, segmented, seqinr, Seurat, sf, shape,
  shinyjs, sp, spam, spatstat.data, SQUAREM, StanHeaders, statmod, stringi,
  taxize, testthat, tibble, tidyr, tinytex, unix, usethis, uwot, vctrs, vegan,
  withr, xfun, xlsx, xts, zip, codetools, foreign, KernSmooth, MASS, Matrix,
  mgcv, nlme, survival
Warning message:
In install.packages(...) :
  installation of package ‘DelayedArray’ had non-zero exit status

)

hpages commented 3 years ago

Hi,

What the output of sessionInfo() after you get the error? My guess is that you have version mismatches, that is, you have packages with incompatible versions e.g. some packages belong to BioC 3.12 or 3.10 (e.g. S4Vectors and/or IRanges) while others belong to BioC 3.11 (e.g. BiocManager). Calling BiocManager::valid() will report this kind of issue.

Also please note that only the current release version of Bioconductor is supported. This is BioC 3.12. Older versions are not.

Best, H.

Samantha-Czn commented 3 years ago

Yep I think you're right - I think it was S4Vectors that was creating the issue. When I ran BiocManager::valid() it told me that S4Vectors was "too new", so reinstalling the version previous to the current release fixed the issue. Thank you for your help

prototypevito commented 1 year ago

I am still getting a similar issue when trying to install DelayedArray.

The code I run is: BiocManager::install("DelayedArray") The output I get is:

'getOption("repos")' replaces Bioconductor standard repositories, see 'help("repositories", package = "BiocManager")' for details. Replacement repositories: CRAN: http://cran.rstudio.com/ Bioconductor version 3.16 (BiocManager 1.30.20), R 4.2.3 (2023-03-15 ucrt) Installing package(s) 'DelayedArray'

There is a binary version available but the source version is later: binary source needs_compilation DelayedArray 0.23.2 0.24.0 TRUE

installing the source package ‘DelayedArray’

trying URL 'https://bioconductor.org/packages/3.16/bioc/src/contrib/DelayedArray_0.24.0.tar.gz' Content type 'application/x-gzip' length 642972 bytes (627 KB) downloaded 627 KB

The downloaded source packages are in ‘C:\Users\91836\AppData\Local\Temp\RtmpCeowqc\downloaded_packages’ Installation paths not writeable, unable to update packages path: C:/Program Files/R/R-4.2.3/library packages: lattice, MASS, Matrix, survival Warning message: In install.packages(...) : installation of package ‘DelayedArray’ had non-zero exit status

When I run BiocManager::valid() I get; [1] TRUE

What should I try next?

hpages commented 1 year ago

I am still getting a similar issue when trying to install DelayedArray.

What I see is that you're getting a compilation error on Windows. This has not much to do with the original issue.

Installing packages from source on Windows requires that your machine has been carefully set up for that. Are you able to install from source any package at all that has C/C++ code? Maybe you could try with CRAN packages like zoo and Rcpp:

install.packages("zoo", type="source")
install.packages("Rcpp", type="source")

This will confirm that you have the correct setup.

Otherwise, just install the Windows binary for DelayedArray, even if its version is slightly behind the source version.

prototypevito commented 1 year ago

Are you able to install from the source any package at all that has C/C++ code?

You're right. I cannot install any package from the source that has C/C++ code. How can I correct the Setup so that I can install these packages correctly?

Otherwise, just install the Windows binary for DelayedArray, even if its version is slightly behind the source version.

I did this, but this is causing as an error when I run certain Bioconductor packages since DelayedArray is not up to date. Is there a way I can bypass this issue and still make it work, even with a binary version of DelayedArray

hpages commented 1 year ago

Unfortunately, for some reason the binary version available in BioC 3.16 is lagging behind the source version: https://bioconductor.org/packages/3.16/DelayedArray (see Package Archives at bottom of page)

However, if you were to switch to BioC 3.17 (which I highly recommend), then the DelayedArray binary for Windows is up to date: https://bioconductor.org/packages/3.17/DelayedArray (see Package Archives at bottom of page)

Note that BioC 3.17 will officially be released next week but you can already install and use it. It requires R 4.3.0 which will be released in the next couple of days (the release candidate for Windows is available here).

Cheers, H.