harmony icon indicating copy to clipboard operation
harmony copied to clipboard

Error installing harmony in R

Open shaln opened this issue 5 years ago • 4 comments

Hello.

I am having problems installing harmony and I get the following error. I updated my R by downloading the pkg from CRAN and then manually re-installing all the packages I needed. Have not had any issues with other GitHub packages that I was installing. My sessionInfo() is included below too.

> library(devtools)
Loading required package: usethis
> install_github("immunogenomics/harmony")
Downloading GitHub repo immunogenomics/harmony@HEAD
✓  checking for file ‘/private/var/folders/tn/9np01dtn13dgk_k10m3f92j80000gp/T/RtmpwyRbTN/remotes20a159c14d2b/immunogenomics-harmony-88b1e2a/DESCRIPTION’ ...
─  preparing ‘harmony’:
✓  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
─  looking to see if a ‘data/datalist’ file should be added
─  building ‘harmony_1.0.tar.gz’
   
* installing *source* package ‘harmony’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppProgress/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.0/Resources/library/RcppProgress/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c harmony.cpp -o harmony.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o harmony.so RcppExports.o harmony.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Library/Frameworks/R.framework/Versions/4.0/Resources/library/00LOCK-harmony/00new/harmony/libs
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
sh: line 1:  8448 Killed: 9               R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/tn/9np01dtn13dgk_k10m3f92j80000gp/T//RtmpOunzZq/file20e64b206157'
ERROR: installing package indices failed
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/harmony’
Error: Failed to install 'harmony' from GitHub:
  (converted from warning) installation of package ‘/var/folders/tn/9np01dtn13dgk_k10m3f92j80000gp/T//RtmpwyRbTN/file20a1835c5a2/harmony_1.0.tar.gz’ had non-zero exit status
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.5

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_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

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

other attached packages:
[1] devtools_2.3.1 usethis_1.6.1 

loaded via a namespace (and not attached):
 [1] rstudioapi_0.11   magrittr_1.5      pkgload_1.1.0     R6_2.4.1          rlang_0.4.7      
 [6] fansi_0.4.1       tools_4.0.2       pkgbuild_1.1.0    xfun_0.16         sessioninfo_1.1.1
[11] tinytex_0.25      cli_2.0.2         withr_2.2.0       ellipsis_0.3.1    remotes_2.2.0    
[16] assertthat_0.2.1  digest_0.6.25     rprojroot_1.3-2   crayon_1.3.4      processx_3.4.3   
[21] callr_3.4.3       fs_1.4.2          ps_1.3.3          curl_4.3          testthat_2.3.2   
[26] memoise_1.1.0     glue_1.4.1        compiler_4.0.2    desc_1.2.0        backports_1.1.8  
[31] prettyunits_1.1.1

shaln avatar Jul 27 '20 16:07 shaln

Dear Harmony team, I am also having an issue installing harmony after transitioning to R 4.0.1.

sh: line 1: 196346 Segmentation fault      R_TESTS= '/pstore/apps/R/4.0.1-foss-2018b/lib64/R/bin/R' --no-save --no-restore --no-echo 2>&1 < '/tmp/RtmpmKjbQn/file2fd60337a9c42'

 *** caught segfault ***
address 0x20, cause 'memory not mapped'

Traceback:
 1: Module(module, mustStart = TRUE, where = env)
 2: doTryCatch(return(expr), name, parentenv, handler)
 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
 4: tryCatchList(expr, classes, parentenv, handlers)
 5: tryCatch(Module(module, mustStart = TRUE, where = env), error = function(e) e)
 6: loadModule(module = "AnnoyAngular", what = TRUE, env = ns, loadNow = TRUE)
 7: (function (ns) loadModule(module = "AnnoyAngular", what = TRUE, env = ns, loadNow = TRUE))(<environment>)
 8: doTryCatch(return(expr), name, parentenv, handler)
 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: tryCatchList(expr, classes, parentenv, handlers)
11: tryCatch((function (ns) loadModule(module = "AnnoyAngular", what = TRUE, env = ns, loadNow = TRUE))(<environment>),     error = function(e) e)
12: eval(substitute(tryCatch(FUN(WHERE), error = function(e) e),     list(FUN = f, WHERE = where)), where)
13: eval(substitute(tryCatch(FUN(WHERE), error = function(e) e),     list(FUN = f, WHERE = where)), where)
14: .doLoadActions(where, attach)
15: methods::cacheMetaData(ns, TRUE, ns)
16: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]])
17: asNamespace(ns)
18: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc,     .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package)
19: loadNamespace(name)
20: doTryCatch(return(expr), name, parentenv, handler)
21: tryCatchOne(expr, names, parentenv, handlers[[1L]])
22: tryCatchList(expr, classes, parentenv, handlers)
23: tryCatch(loadNamespace(name), error = function(e) {    warning(gettextf("namespace %s is not available and has been replaced\nby .GlobalEnv when processing object %s",         sQuote(name)[1L], sQuote(where)), domain = NA, call. = FALSE,         immediate. = TRUE)    .GlobalEnv})
24: ..getNamespace(c("Seurat", "3.0.0"), "cell_lines_small_seurat_v3")
25: load(zfile, envir = tmp_env)
26: utils::data(list = f, package = package, lib.loc = lib.loc, envir = dataEnv)
27: withCallingHandlers(expr, warning = function(w) if (inherits(w,     classes)) tryInvokeRestart("muffleWarning"))
28: suppressWarnings(utils::data(list = f, package = package, lib.loc = lib.loc,     envir = dataEnv))
29: withCallingHandlers(expr, message = function(c) if (inherits(c,     classes)) tryInvokeRestart("muffleMessage"))
30: suppressMessages(suppressWarnings(utils::data(list = f, package = package,     lib.loc = lib.loc, envir = dataEnv)))
31: doTryCatch(return(expr), name, parentenv, handler)
32: tryCatchOne(expr, names, parentenv, handlers[[1L]])
33: tryCatchList(expr, classes, parentenv, handlers)
34: tryCatch(suppressMessages(suppressWarnings(utils::data(list = f,     package = package, lib.loc = lib.loc, envir = dataEnv))),     error = identity)
35: list_data_in_pkg(dataDir = dataDir)
36: .build_data_index(dataDir, contents)
37: saveRDS(.build_data_index(dataDir, contents), file.path(outDir,     "Meta", "data.rds"))
38: .install_package_Rd_indices(dir, outDir)
39: tools:::.install_package_indices(".", "/pstore/home/tosevskv/R/x86_64-pc-linux-gnu-library/4.0.1-foss/00LOCK-harmony/00new/harmony")
An irrecoverable exception occurred. R is aborting now ...
ERROR: installing package indices failed
* removing ‘/pstore/home/tosevskv/R/x86_64-pc-linux-gnu-library/4.0.1-foss/harmony’

Is there a way around this? Is the fault with harmony or my cluster?

Thanks, Vinko

vtosevski avatar Sep 10 '20 16:09 vtosevski

Good morning everyone :)

I am having similar issues:

> library(devtools)
Loading required package: usethis
> install_github("immunogenomics/harmony")
Downloading GitHub repo immunogenomics/harmony@HEAD
   checking DESCRIPTION meta-information ...f/mxk7z9d93s97hygvdgh66knh5tlp8z/T/Rtmp2NWN4D/remotes7f0e32126d68/immunogenomics-harmony-88b1e2a/DESCRIPTION’ ...
Installing package into ‘/Users/milanezdelimap/Library/R/4.0/library’
(as ‘lib’ is unspecified)
* installing *source* package ‘harmony’ ...
** using staged installation
** libs
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Users/milanezdelimap/Library/R/4.0/library/Rcpp/include' -I'/Users/milanezdelimap/Library/R/4.0/library/RcppArmadillo/include' -I'/Users/milanezdelimap/Library/R/4.0/library/RcppProgress/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c RcppExports.cpp -o RcppExports.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I'/Users/milanezdelimap/Library/R/4.0/library/Rcpp/include' -I'/Users/milanezdelimap/Library/R/4.0/library/RcppArmadillo/include' -I'/Users/milanezdelimap/Library/R/4.0/library/RcppProgress/include' -I/usr/local/include   -fPIC  -Wall -g -O2  -c harmony.cpp -o harmony.o
clang++ -mmacosx-version-min=10.13 -std=gnu++11 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o harmony.so RcppExports.o harmony.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/milanezdelimap/Library/R/4.0/library/00LOCK-harmony/00new/harmony/libs
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
sh: line 1: 32653 Killed: 9               R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/1f/mxk7z9d93s97hygvdgh66knh5tlp8z/T//RtmpFCXLJw/file7f581c51094b'
ERROR: installing package indices failed
* removing ‘/Users/milanezdelimap/Library/R/4.0/library/harmony’
Error: Failed to install 'harmony' from GitHub:
  (converted from warning) installation of package ‘/var/folders/1f/mxk7z9d93s97hygvdgh66knh5tlp8z/T//Rtmp2NWN4D/file7f0e4af6bfa1/harmony_1.0.tar.gz’ had non-zero exit status
sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRblas.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] devtools_2.3.2 usethis_1.6.3 

loaded via a namespace (and not attached):
 [1] magrittr_1.5      pkgload_1.1.0     R6_2.4.1          rlang_0.4.7       fansi_0.4.1       tools_4.0.2       pkgbuild_1.1.0    sessioninfo_1.1.1 cli_2.0.2         withr_2.3.0       ellipsis_0.3.1   
[12] remotes_2.2.0     assertthat_0.2.1  digest_0.6.25     rprojroot_1.3-2   crayon_1.3.4      processx_3.4.4    callr_3.4.4       fs_1.5.0          ps_1.3.4          curl_4.3          testthat_2.3.2   
[23] memoise_1.1.0     glue_1.4.2        compiler_4.0.2    desc_1.2.0        backports_1.1.10  prettyunits_1.1.1
$ gfortran --version
GNU Fortran (GCC) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

PedroMilanezAlmeida avatar Sep 24 '20 15:09 PedroMilanezAlmeida

i finished it: R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-conda_cos6-linux-gnu (64-bit)

library(harmony) packageVersion('harmony') [1] ‘1.0’

by: wget https://github.com/immunogenomics/harmony/archive/master.zip # or download by webpage library(devtools) install_local('yourpath/harmony-master.zip')

good luck to you !!!

coffeeCowLu avatar Oct 14 '20 09:10 coffeeCowLu

Thanks for your comment! All three comments above use R4 though, while you are on R3. Hope Harmony will get implemented in R4 as well.

PedroMilanezAlmeida avatar Oct 14 '20 11:10 PedroMilanezAlmeida