Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install package #18

Closed
Eomesodermin opened this issue Jul 22, 2020 · 21 comments
Closed

Unable to install package #18

Eomesodermin opened this issue Jul 22, 2020 · 21 comments

Comments

@Eomesodermin
Copy link

running

devtools::install_github("ncborcherding/scRepertoire")

I get the following output

✓ checking for file ‘/private/var/folders/bc/npspjlyx025bzz77sn2qb38c0000gn/T/RtmpDpR0mA/remotes76b07e658473/ncborcherding-scRepertoire-5b4506e/DESCRIPTION’ ...
─ preparing ‘scRepertoire’:
✓ checking DESCRIPTION meta-information ...
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building ‘scRepertoire_0.99.4.tar.gz’

  • installing source package ‘scRepertoire’ ...
    ** using staged installation
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** byte-compile and prepare package for lazy loading
    sh: line 1: 34803 Killed: 9 R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/bc/npspjlyx025bzz77sn2qb38c0000gn/T//Rtmp1ALZPE/file87ec153b2769'
    ERROR: lazy loading failed for package ‘scRepertoire’
  • removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/scRepertoire’
    Error: Failed to install 'scRepertoire' from GitHub:
    (converted from warning) installation of package ‘/var/folders/bc/npspjlyx025bzz77sn2qb38c0000gn/T//RtmpDpR0mA/file76b03adadad9/scRepertoire_0.99.4.tar.gz’ had non-zero exit status

This is not an error unique to this package. I have encountered this error with a number of packages ever since upgrading to R > 4

using MacOS with R 4.0.2

any advice would be amazing.

@ncborcherding
Copy link
Owner

I have seen this issue and experienced, seems to be related to Seurat and other single-cell wrappers from the search of github issues.

This thread is particularly interesting, maybe need to reinstall gtfortran?

This is purely speculative, I am running R 4.01 without any issues. I can try my home computer with 4.02 when I get done with work today to see if that is the issue.

@Eomesodermin
Copy link
Author

I'll look through the thread and see if reinstalling gfortran helps.

I first got hit with this error trying to install Seurat-wrappers package.

@Eomesodermin
Copy link
Author

Tried many things. removed and reinstalled Clag++, gfortran, etc but nothing has worked.

I cheated the system, cloned the repo and loaded with

devtools::load_all("file.path/scRepertoire/")

Less than ideal but at least can access functions from the package and proceed with analysis.

I'm not sure if its a result of my clumsy method of loading the package but I had trouble using expression2List().

Error in [.data.frame(meta, , group) : undefined columns selected

fixed by editing the function as follows:

Original

subset <- subset(meta, meta[,group] == unique[i])

Modified line

subset <- meta[meta[,group] == unique[i], ]

Open to any ideas for a better solve to package installation problem.

@ncborcherding
Copy link
Owner

Eomesdermin,

First of not your fault for the expression2list(), noticed that as well and am in the process of a commit for bioconductor that will fix the issue.

My one other thought was from this thread: satijalab/seurat#2945

I had a user of another package have the same issue and was able to solve the problem by uninstalling/reinstalling conda. Not sure if that will work?

@Eomesodermin
Copy link
Author

I tried uninstall of conda, no change to error message.

Problem is effecting numerous packages I have tried to install over last couple months. Unfortunately, can't remember if I encountered the problem in R < 4.

I don't know if it would be helpful to see what is on line 34803 (sh: line 1: 34803 Killed: 9) but I am not sure how to access this info.

My gut says there is an error in which compiler the installing package is being pointed to.

@ncborcherding
Copy link
Owner

ncborcherding commented Jul 24, 2020

The other thing I just found was reinstalling
homebrew

I tried on my home computer with R 4.02 and there was no issue, so I can't even replicate whats going on. However, it seems you are definitely not alone based on github issues.

@Eomesodermin
Copy link
Author

The other thing I just found was reinstalling
homebrew

I tried on my home computer with R 4.02 and there was no issue, so I can't even replicate whats going on. However, it seems you are definitely not alone based on github issues.

I'll try a reinstall of homebrew.

Are you running latest MacOS?

@ncborcherding
Copy link
Owner

I am running MacOS Catalina 10.15.4 for all my systems right now.

@ncborcherding
Copy link
Owner

Update: Ironically I am now having the error message on the Bioconductor builds checks when I push. I found I can replicate the issue using the R CMD check, but not devtools::check(). So from my end, I can compile and install the package locally or from GitHub. However, it fails the R CMD check in bioconductor and the R CMD check locally. Very interesting problem.

I'll keep updating when I find new facets, just because I see a lot more of these "Killed: 9" errors appearing in GitHub issues.

@ncborcherding
Copy link
Owner

I was able to recreate the issue finally!!!

Solve it on my laptop by updating xcode - which makes me think it might be a clang/compiler issue.

@Eomesodermin
Copy link
Author

I tried update of xcode - didnt change anything. I may have messed up my system by installing clang/gfortan/compilers seperate and newer versions etc. I'll try work along these lines and see if i can fix this issue. thanks for your insight.

@massonix
Copy link

Hi

I'm having the same issue as @Eomesodermin:

Error: Failed to install 'scRepertoire' from GitHub:
  (converted from warning) installation of package ‘/var/folders/wd/1hh952ld20df7x0tpkb16c_r0000gn/T//RtmpBFcY5p/file8d8ea2962/scRepertoire_0.99.9.tar.gz’ had non-zero exit status

Could you find the root cause?

Thanks!

@ncborcherding
Copy link
Owner

Hey Massonix,

This seems to be an issue with a compiler on the user system - it is a growing issue with packages that interact with Seurat or other single-cell R packages.

Can you tell me more about your system?
What is your OS?
What version of R are you running?
What version of gfrotran and clang?
Have you tried any of the above suggestions?

I am getting off clinical service this week and my goal is to troubleshoot the issue more - this is an issue for the submission to bioconductor as well.

For now, I would recommend

  • Updated gfortran/gcc and clang (if using a Mac, this would be in xcode) if your versions are out of date
  • Remove older versions of gfortran/gcc and clang, this is a good site for the commands
  • Update to R 4.0.2 if not there
  • Some have suggested miniconda may be the issue if installed – try removing or moving it?

Thanks,
Nick

@massonix
Copy link

massonix commented Aug 19, 2020

Hi,

Thanks for the reply. This is the output of the sessionInfo() command:

R version 4.0.1 (2020-06-06)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS High Sierra 10.13.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/4.0/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     

other attached packages:
[1] immunarch_0.6.5         patchwork_1.0.1         data.table_1.12.8      
[4] dtplyr_1.0.1            dplyr_1.0.0             ggplot2_3.3.2          
[7] CellaRepertorium_0.98.3

loaded via a namespace (and not attached):
  [1] colorspace_1.4-1    ggsignif_0.6.0      ellipsis_0.3.1      class_7.3-17       
  [5] modeltools_0.2-23   rio_0.5.16          mclust_5.4.6        rprojroot_1.3-2    
  [9] circlize_0.4.10     XVector_0.28.0      GlobalOptions_0.1.2 fs_1.4.2           
 [13] rstudioapi_0.11     ggpubr_0.4.0        remotes_2.1.1       ggrepel_0.8.2      
 [17] flexmix_2.3-15      fansi_0.4.1         robustbase_0.93-6   shinythemes_1.1.2  
 [21] pkgload_1.1.0       broom_0.5.6         cluster_2.1.0       kernlab_0.9-29     
 [25] pheatmap_1.0.12     shiny_1.5.0         readr_1.3.1         compiler_4.0.1     
 [29] backports_1.1.8     fastmap_1.0.1       assertthat_0.2.1    cli_2.0.2          
 [33] later_1.1.0.1       htmltools_0.5.0     prettyunits_1.1.1   tools_4.0.1        
 [37] gtable_0.3.0        glue_1.4.1          reshape2_1.4.4      Rcpp_1.0.5         
 [41] carData_3.0-4       cellranger_1.1.0    vctrs_0.3.1         Biostrings_2.56.0  
 [45] nlme_3.1-148        fpc_2.2-7           ggseqlogo_0.1       ggalluvial_0.12.1  
 [49] stringr_1.4.0       ps_1.3.3            openxlsx_4.1.5      testthat_2.3.2     
 [53] mime_0.9            lifecycle_0.2.0     devtools_2.3.0      rstatix_0.6.0      
 [57] factoextra_1.0.7    DEoptimR_1.0-8      zlibbioc_1.34.0     MASS_7.3-51.6      
 [61] scales_1.1.1        airr_1.3.0          hms_0.5.3           promises_1.1.1     
 [65] parallel_4.0.1      RColorBrewer_1.1-2  yaml_2.2.1          curl_4.3           
 [69] memoise_1.1.0       gridExtra_2.3       UpSetR_1.4.0        stringi_1.4.6      
 [73] S4Vectors_0.26.1    desc_1.2.0          BiocGenerics_0.34.0 pkgbuild_1.0.8     
 [77] zip_2.0.4           shape_1.4.4         rlang_0.4.6         pkgconfig_2.0.3    
 [81] prabclus_2.3-2      lattice_0.20-41     purrr_0.3.4         processx_3.4.3     
 [85] tidyselect_1.1.0    plyr_1.8.6          magrittr_1.5        R6_2.4.1           
 [89] IRanges_2.22.2      generics_0.0.2      pillar_1.4.4        haven_2.3.1        
 [93] foreign_0.8-80      withr_2.2.0         abind_1.4-5         nnet_7.3-14        
 [97] tibble_3.0.2        crayon_1.3.4        car_3.0-8           utf8_1.1.4         
[101] usethis_1.6.1       grid_4.0.1          readxl_1.3.1        callr_3.4.3        
[105] forcats_0.5.0       digest_0.6.25       diptest_0.75-7      xtable_1.8-4       
[109] tidyr_1.1.0         httpuv_1.5.4        stats4_4.0.1        munsell_0.5.0      
[113] sessioninfo_1.1.1  

@ncborcherding
Copy link
Owner

Hey Massonix,

Any info on:

  1. your version of clang gcc/gfrotran?
  2. do you have miniconda installed?
  3. Have you tried troubleshooting the problem with any of the above thread.

This is not so much an issue with scRepertoire itself, so there won't be an easy step for me to commit to the repo.

@massonix
Copy link

Hey @ncborcherding ,

  1. I have the following clang version
clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
  1. I have anaconda3 installed, but I'm running r outside of any container.

  2. The thing is that trying some these suggestions might break other pipelines that are working fine (ie that use a conda container), or have unexpected consequences...

Thanks for the help

Ramon

@ncborcherding
Copy link
Owner

@massonix

I am not sure how to proceed troubleshooting this issue with you - miniconda was the last item on the list of suggestions and was speculative. This is not an issue with the package itself, it is an issue stemming from some incompatibility between compiler and R vers >= 4.0.

Please try updating your compilers and removing previous versions - ignore the conda suggestion.

If you are not comfortable with that, you can download the repo and use it locally?

@massonix
Copy link

massonix commented Aug 21, 2020

Hi,

Finally, I was able to install scRepertoire! I was also having trouble installing other packages (like Signac), so these are the steps I took:

  1. Updata OS from High Sierra to Catalina
  2. Update xcode: at this point I was getting a new error "xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools)". So, I executed the command suggested here and followed this blog post.
  3. With that, I was able to install Signac, but scRepertoire was giving an error like "Error (converted from warning): dplyr was built under R 4.0.2" (something like that). Since this should be just a warning, I executed the following line as suggested here:
Sys.setenv(R_REMOTES_NO_ERRORS_FROM_WARNINGS=TRUE)

I can start having fun with scRepertoire now :) Thanks a lot for your help!

Best

Ramon

@ncborcherding
Copy link
Owner

Great! Glad you figured it out.

@Eomesodermin
Copy link
Author

satijalab/seurat-wrappers#32 (comment)

This fixed the Killed:9 error for me

@ncborcherding
Copy link
Owner

Hey glad to hear it!

I know you were experiencing this on several packages, any idea if the conda suggestion allowed for all the packages to be installed?

I ask because I commited a new version of scRepertoire last night that changed some of the required vs imported packages in hopes to change the compiling requirements for the install.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants