velocyto-team / velocyto.R

RNA velocity estimation in R
http://velocyto.org
177 stars 219 forks source link

velocyto.R installation error : velocyto.R_0.6.tar.gz’ had non-zero exit status #86

Open zonglunli7515 opened 5 years ago

zonglunli7515 commented 5 years ago

I'm now trying to install velocyto.R in Rstudio on windows. I managed to install pcaMethods using **if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager")

BiocManager::install("pcaMethods")**

However, when I executed library(devtools), install_github("velocyto-team/velocyto.R"), I got another error message:

Error in i.p(...) : (converted from warning) installation of package ‘C:~/Rtmpuy59CA/file53a0182817cd/velocyto.R_0.6.tar.gz’ had non-zero exit status

Anyone knows the solution?

Thanks in advance

Allen

whelena commented 5 years ago

i have the same problem when I try it on Rstudio in Linux and windows

cswoboda commented 5 years ago

Also struggling with the same thing!

cohenp05 commented 5 years ago

I am having the same problem with Rstudio on Mac. Has anyone been able to install velocyto.R in Rstudio?

ShanSabri commented 5 years ago

BUMP. I'm also having the same issues.

> devtools::install_github("velocyto-team/velocyto.R")
Downloading GitHub repo velocyto-team/velocyto.R@master
Skipping 1 packages not available: pcaMethods
✔  checking for file ‘/private/var/folders/5m/jlrrrsfd719d0ks0qg48_pg80000gn/T/RtmpyBdTKN/remotes94d3403f7c22/velocyto-team-velocyto.R-d779034/DESCRIPTION’ ...
─  preparing ‘velocyto.R’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘velocyto.R_0.6.tar.gz’

* installing *source* package ‘velocyto.R’ ...
** libs
clang++ -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.5/Resources/library/RcppArmadillo/include" -I/usr/local/include  -fopenmp -fPIC  -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o
clang: error: unsupported option '-fopenmp'
make: *** [RcppExports.o] Error 1
ERROR: compilation failed for package ‘velocyto.R’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/velocyto.R’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/var/folders/5m/jlrrrsfd719d0ks0qg48_pg80000gn/T//RtmpyBdTKN/file94d319bd99b4/velocyto.R_0.6.tar.gz’ had non-zero exit status
danmoore1987 commented 5 years ago

I am having the same issue too! Windows on R.

In my case, its a Rtools compiler issue, not being able to find -lboost_filesystem collect2.exe:

c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o velocyto.R.dll tmp.def RcppExports.o points_within.o routines.o -lboost_filesystem -lboost_system -lstdc++ -LC:/PROGRA~1/R/R-3.6.0/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-3.6.0/bin/x64 -lRblas -fopenmp -lgfortran -lm -lquadmath -LC:/PROGRA~1/R/R-3.6.0/bin/x64 -lR C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lboost_filesystem C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lboost_system collect2.exe: error: ld returned 1 exit status no DLL was created ERROR: compilation failed for package 'velocyto.R'

gloriabk commented 5 years ago

I also have the same problem!

cemalley commented 5 years ago

brew install gcc brew install boost

As per https://stackoverflow.com/questions/35999874/mac-os-x-r-error-ld-warning-directory-not-found-for-option Then I added to the file ~/.R/Makevars:

SHLIB_OPENMP_CFLAGS=-Xpreprocessor -fopenmp SHLIB_OPENMP_CXXFLAGS=-Xpreprocessor -fopenmp VER=-9.1.0 CC=gcc$(VER) CXX=g++$(VER) CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion FLIBS=-L/usr/local/Cellar/gcc/9.1.0/lib/gcc/9

I tried a bunch of other libraries and with conda also, but ran into trouble since I am not running as root. I think this is the approximate minimal solution.

cswoboda commented 5 years ago

Bump

BeppuAN commented 5 years ago

Bump - I'm also running into the same problem.

vim15 commented 5 years ago

I've been having the same problem, can not seem to install Velocyto.R in R studio. I have downloaded all the dependencies and keep running into the issues above. I have also tried installing it on Rstudio on a Mac. Get the same issues with a warning saying that extra "R tools" are needed but when I click ok for them to be installed a blank page opens (probably an Rstudio bug).

HenrikThurfjell commented 5 years ago

I had the same basic issue (found this thread by googling "Error: Failed to install 'rlpi' from GitHub: (converted from warning) installation of package ‘C:/Users/HETH/AppData/Local/Temp/RtmpQl8FUJ/filef8c28454cd2/rlpi_0.1.0.tar.gz’ had non-zero exit statustrying to download rlpi i R studio."

I did get it to work when I just copy-pasted directly into R, so the issue (at least for me) seemed related to R-studio

evaknichols commented 4 years ago

Hi! Same issue here as the original poster zl7515/Allen (also did the exact same thing, but on Mac not Windows; Rstudio).

Still experiencing problems with installation--has anyone resolved the issue since and would like to share how?

Thanks! From, Eva

cemalley commented 4 years ago

As you can see from the large number of unresolved issues and little to no response from the devs, this method is not mature or stable, despite the publications. I suggest we wait for a major update or until another RNA velocity method is available. Even if you can install it, there are reports of non-reproducible results and sketchy interpretation. If you still want to try, on one machine I ended up using the conda package manager instead of brew. You can also try running in command line R instead of RStudio. If you get the "R tools" needed message, you need to make sure you have the latest R and gcc compilers and that R can find it. If you have IT support services, let them know you need these updates. It would be nice to have a Docker repo for people to use since it is so tricky to install. Best of luck.

cohenp05 commented 4 years ago

If you're comfortable coding in python, I've heard scVelo is faster and generally seems better supported. I think part of the problem with the R implementation of velocyto is the R package is written and managed by a distinct lab from the one that developed the python library. What's more challenging is that the R package depends on the python library, so any bugs present in the python library may be carried into the R package. scVelo is managed by the Theis lab who's also responsible for scanpy, and (while I don't have my own experience to support it) it sounds like it is more stable.

evaknichols commented 4 years ago

Thanks so much for your quick insights! How unfortunate. I do like the idea of having this tool (or a similar one) for my system....I also have limited python skills, which is problematic for the short time frame I have to analyze my data....I'll try 1-2 more things and report back if I have a success with installation!

naumenko-sa commented 4 years ago

Hello everyone!

I was lucky to install with:

  1. Install development version of R4.0 (not sure if that helps installing velocyto.R, but I needed it because one of the packages from this tutorials needed it: https://bustools.github.io/BUS_notebooks_R/velocity.html )
  2. on the cluster I loaded newer gcc to support c++ and openmp, boost, and hdf5 libraries if you don't have them, you have to install with conda or OS package manager. I inserted module loading commands into my Rdev starting script:
    
    #!/bin/bash

module load gcc/6.2.0 module load boost/1.62.0 module load hdf5/1.10.1

export RDEVEL=/where/tools/R-devel export PATH="$RDEVEL/bin/:$PATH" export R_LIBS=$RDEVEL/library R "$@"

3. I cloned velocyto.R repo locally:
```git clone https://github.com/velocyto-team/velocyto.R```

4. I noted where are my boost include and lib:

module show boost ... prepend_path("PATH","/n/app/boost/1.62.0/include") prepend_path("LD_LIBRARY_PATH","/n/app/boost/1.62.0/lib") prepend_path("CPLUS_INCLUDE_PATH","/n/app/boost/1.62.0/include") ...


5. I modified  `velocyto.R/src/Makevars`:

CXX_STD = CXX11 PKG_CXXFLAGS= $(SHLIB_OPENMP_CXXFLAGS) PKG_CFLAGS=$(SHLIB_OPENMP_CFLAGS) PKG_LIBS=-lboost_filesystem -lboost_system -lstdc++ $(LAPACK_LIBS) $(BLAS_LIBS) $(SHLIB_OPENMP_CFLAGS) $(FLIBS) -I'/n/app/boost/1.62.0/include' -L/n/app/boost/1.62.0/lib

(I explicitly added the location of boost libraries on my system)

6. I built from within Rdev:

devtools::install_local("velocyto.R")



Sergey
zonglunli7515 commented 4 years ago

Hi guys,

I have left the RNA velocity for 3 months. Thank you all for your confirmation of the issue and the insight provided. As for the package installation itself, I guess Python would be a better choice. However, some functions in Python Velocyto seem to be underdeveloped.

swatibiswas86 commented 4 years ago

I think this is the most worst package ever made in R. No maintenance. No reply how to solve the problem. All unmet dependencies in ubuntu. I have wasted almost my two weeks after this. even the python version is also not working. If any one thinking to use this package for your analysis. Please dont waste your time. It is almost obsolete. We must wait for other packages

vim15 commented 4 years ago

Can someone please please please make this public knowledge!!! This package does not work and no one is maintaining it and the things it produces are not reproducible. Someone with a wider exposure on platforms such as twitter should make this wider knowledge!! The maintenance by the creators is appalling.

pkharchenko commented 4 years ago

Yes, unfortunately we haven’t had the time or resources to maintain it, to keep up with evolving dependencies, especially across platforms. Obviously the docker still works if you don’t want to spend time on installation issues. We hope to release a simpler implementation based on a different model that won’t need genome scans, etc. I’ll try to use some of the current hiatus to fix immediate ubuntu install problems on the current package, but as others have pointed out, scVelo at this point should provide more robust estimates.

On Mar 29, 2020, at 16:44, aloke206 notifications@github.com wrote:

I think this is the most worst package ever made in R. No maintenance. No reply how to solve the problem. All unmet dependencies in ubuntu. I have wasted almost my two weeks after this. even the python version is also not working. If any one thinking to use this package for your analysis. Please dont waste your time. It is almost obsolete. We must wait for other packages

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

swatibiswas86 commented 4 years ago

@pkharchenko, if you have tried with docker recently, u would not have told this :( Work on the latest OS with latest packages and you will come to know about the real problem. Why not to mention about the problem, as suggested by @valie15, on the webpage of Velocyto so that common users like us don't waste our time.

naumenko-sa commented 4 years ago

Hello everyone!

Disclaimer: I'm not a part of velocyto-team

See above I was able to install on Rdev.

Now I installed on a Desktop Fedora 30 5.2.9-200.fc30.x86_64 with the latest R3.6.3:

bash:

sudo dnf update R
sudo dnf install boost boost-devel hdf5 hdf5-devel
git clone https://github.com/velocyto-team/velocyto.R

rstudio/R:

BiocManager::install("pcaMethods")
setwd("/where/you/cloned/velocyto.R")
devtools::install_local("velocyto.R")

sessionInfo():

R version 3.6.3 (2020-02-29)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 30 (Workstation Edition)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

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

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

other attached packages:
 [1] velocyto.R_0.6              scales_1.1.0                Rcpp_1.0.4                  plotly_4.9.2               
 [5] GGally_1.5.0                DropletUtils_1.4.3          SingleCellExperiment_1.6.0  SummarizedExperiment_1.16.1
 [9] DelayedArray_0.12.2         BiocParallel_1.20.1         matrixStats_0.56.0          Biobase_2.46.0             
[13] GenomicRanges_1.38.0        GenomeInfoDb_1.22.0         IRanges_2.20.2              S4Vectors_0.24.3           
[17] zeallot_0.1.0               AnnotationHub_2.16.1        BiocFileCache_1.10.2        dbplyr_1.4.2               
[21] BiocGenerics_0.32.0         SeuratWrappers_0.1.0        Seurat_3.1.4                BUSpaRse_1.1.1             
[25] writexl_1.2                 readxl_1.3.1                forcats_0.5.0               stringr_1.4.0              
[29] dplyr_0.8.5                 purrr_0.3.3                 readr_1.3.1                 tidyr_1.0.2                
[33] tibble_3.0.0                ggplot2_3.3.0               tidyverse_1.3.0             knitr_1.28                 
[37] eulerr_6.1.0                VennDiagram_1.6.20          futile.logger_1.4.3         Matrix_1.2-18              

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.1                rtracklayer_1.46.0            R.methodsS3_1.8.0             bit64_0.9-7                  
  [5] irlba_2.3.3                   multcomp_1.4-12               R.utils_2.9.2                 data.table_1.12.8            
  [9] RCurl_1.98-1.1                AnnotationFilter_1.10.0       generics_0.0.2                metap_1.3                    
 [13] GenomicFeatures_1.38.2        callr_3.4.3                   cowplot_1.0.0                 lambda.r_1.2.4               
 [17] TH.data_1.0-10                usethis_1.5.1                 RSQLite_2.2.0                 RANN_2.6.1                   
 [21] future_1.16.0                 bit_1.1-15.2                  mutoss_0.1-12                 xml2_1.2.5                   
 [25] lubridate_1.7.4               httpuv_1.5.2                  assertthat_0.2.1              xfun_0.12                    
 [29] hms_0.5.3                     promises_1.1.0                fansi_0.4.1                   progress_1.2.2               
 [33] caTools_1.18.0                igraph_1.2.5                  DBI_1.1.0                     htmlwidgets_1.5.1            
 [37] reshape_0.8.8                 ellipsis_0.3.0                RSpectra_0.16-0               crosstalk_1.1.0.1            
 [41] backports_1.1.5               gbRd_0.4-11                   RcppParallel_5.0.0            biomaRt_2.42.1               
 [45] vctrs_0.2.4                   remotes_2.1.1                 ensembldb_2.10.2              ROCR_1.0-7                   
 [49] withr_2.1.2                   BSgenome_1.54.0               sctransform_0.2.1             GenomicAlignments_1.22.1     
 [53] prettyunits_1.1.1             RcppProgress_0.4.2            mnormt_1.5-6                  cluster_2.1.0                
 [57] ape_5.3                       lazyeval_0.2.2                crayon_1.3.4                  labeling_0.3                 
 [61] edgeR_3.26.8                  pkgconfig_2.0.3               pkgload_1.0.2                 nlme_3.1-144                 
 [65] ProtGenerics_1.18.0           devtools_2.2.2                rlang_0.4.5                   globals_0.12.5               
 [69] lifecycle_0.2.0               sandwich_2.5-1                modelr_0.1.6                  rsvd_1.0.3                   
 [73] rprojroot_1.3-2               cellranger_1.1.0              polyclip_1.10-0               lmtest_0.9-37                
 [77] Rhdf5lib_1.6.3                zoo_1.8-7                     reprex_0.3.0                  processx_3.4.2               
 [81] ggridges_0.5.2                png_0.1-7                     viridisLite_0.3.0             bitops_1.0-6                 
 [85] R.oo_1.23.0                   KernSmooth_2.23-16            Biostrings_2.54.0             blob_1.2.1                   
 [89] memoise_1.1.0                 magrittr_1.5                  plyr_1.8.6                    ica_1.0-2                    
 [93] gplots_3.0.3                  bibtex_0.4.2.2                gdata_2.18.0                  zlibbioc_1.32.0              
 [97] compiler_3.6.3                lsei_1.2-0                    dqrng_0.2.1                   RColorBrewer_1.1-2           
[101] pcaMethods_1.76.0             plotrix_3.7-7                 fitdistrplus_1.0-14           Rsamtools_2.2.3              
[105] cli_2.0.2                     XVector_0.26.0                listenv_0.8.0                 ps_1.3.2                     
[109] patchwork_1.0.0               pbapply_1.4-2                 formatR_1.7                   mgcv_1.8-31                  
[113] MASS_7.3-51.5                 tidyselect_1.0.0              stringi_1.4.6                 yaml_2.2.1                   
[117] locfit_1.5-9.4                askpass_1.1                   ggrepel_0.8.2                 tools_3.6.3                  
[121] future.apply_1.4.0            rstudioapi_0.11               gridExtra_2.3                 farver_2.0.3                 
[125] plyranges_1.6.10              Rtsne_0.15                    digest_0.6.25                 BiocManager_1.30.10          
[129] shiny_1.4.0.2                 broom_0.5.5                   later_1.0.0                   RcppAnnoy_0.0.16             
[133] httr_1.4.1                    AnnotationDbi_1.48.0          npsurv_0.4-0                  Rdpack_0.11-1                
[137] colorspace_1.4-1              polylabelr_0.1.0              rvest_0.3.5                   XML_3.99-0.3                 
[141] fs_1.3.2                      reticulate_1.14               splines_3.6.3                 uwot_0.1.8                   
[145] sn_1.6-0                      multtest_2.42.0               sessioninfo_1.1.1             xtable_1.8-4                 
[149] jsonlite_1.6.1                futile.options_1.0.1          testthat_2.3.2                R6_2.4.1                     
[153] TFisher_0.2.0                 pillar_1.4.3                  htmltools_0.4.0               mime_0.9                     
[157] glue_1.3.2                    fastmap_1.0.1                 interactiveDisplayBase_1.22.0 codetools_0.2-16             
[161] pkgbuild_1.0.6                tsne_0.1-3                    mvtnorm_1.1-0                 lattice_0.20-38              
[165] numDeriv_2016.8-1.1           curl_4.3                      leiden_0.3.3                  gtools_3.8.1                 
[169] openssl_1.4.1                 limma_3.40.6                  survival_3.1-11               desc_1.2.0                   
[173] munsell_0.5.0                 rhdf5_2.28.1                  GenomeInfoDbData_1.2.2        HDF5Array_1.12.3             
[177] haven_2.2.0                   reshape2_1.4.3                gtable_0.3.0

SN

swatibiswas86 commented 4 years ago

Thanks to @naumenko-sa. Information to another new user who is planning to use this waste package.. please don't use it. Try alevin (https://salmon.readthedocs.io/en/latest/alevin.html). Result obtained here is better in comparison to the velocyto. Even the installation and tutorial explained is very easy in comparison to velocyto.

mpverhagen commented 4 years ago

Hi everyone!

@ other Windows users that are still struggling to get this package installed and are committed to get it to work. Perhaps not the easiest way, but this is how I got it to work on my Windows laptop:

  1. Install Windows Subsystem for Linux (WSL), Ubuntu via Microsoft Store, and R (e.g. https://johnmuschelli.com/neuroc/windows_wsl/index.html)
  2. Install velocyto.R dependencies in bash (see https://github.com/velocyto-team/velocyto.R/blob/master/dockers/debian9/Dockerfile)
  3. Drop '.loom' files in your WSL folder (e.g. by typing "explorer.exe ." in bash), and start analysis!
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Best, Mathijs

beverlyn commented 4 years ago

After a lot of trouble shooting, I managed to install velocytyo.R by cloning the repository locally, and installing some packages (openmp and other boost packages) via conda. This is what i used in the command line:

git clone https://github.com/velocyto-team/velocyto.R
conda install -c conda-forge boost
conda install -c conda-forge openmp
R CMD build velocyto.R
R CMD INSTALL velocyto.R_0.6.tar.gz

Note: I don't think this will solve everyone's problem - but if your error message has the line "cannot find -lboost_filesystem" or "cannot find -lboost_system" in it, this hopefully should work

TSun-tech commented 3 years ago

Thanks to beverlyn, I successfully installed velocyto.R by following your instruction!

diyang1354 commented 2 years ago

beverlyn's method still didn't work for me. I solved the 'cannot find -lboost_filesystem' issue by sudo apt-get install libboost-all-dev

RavenGan commented 2 years ago

I am using MacBook with system info macOS Monterey Version 12.2. I successfully downloaded the R package velocyto.R in my PC and I hope my methods can help.

Step 1: git clone https://github.com/velocyto-team/velocyto.R However, I found that I cannot use 'git' on my mac, so I download Xcode from app store and then it worked.

Step2: conda install -c conda-forge boost I used Annaconda. Miniconda should also work.

Step3: conda install -c conda-forge llvm-openmp In the previous post, people recommend conda install -c conda-forge openmp but it does not work for me.

Step4: R CMD build velocyto.R

Step5: R CMD INSTALL velocyto.R_0.6.tar.gz In the last step, I met problems like cannot find -lboost_filesystem. So I first download HomeBrew on my Mac with this link https://brew.sh/ and the type brew install boost in my terminal. This step is to install the boost library in my system. After that, I export the boost library to my local library with export LIBRARY_PATH=/opt/homebrew/Cellar/boost/1.76.0/lib. After all the set-up, I rerun R CMD INSTALL velocyto.R_0.6.tar.gz and I can use it in my R studio.

archana433 commented 1 year ago

Hi, I am also getting same error in windows R. Still struggling with installtion.