immunogenomics / harmony

Fast, sensitive and accurate integration of single-cell data with Harmony
https://portals.broadinstitute.org/harmony/
Other
526 stars 100 forks source link

Installation issue MacOS Monterey #213

Closed SalimMegat closed 9 months ago

SalimMegat commented 1 year ago

Hi,

I am trying to install harmony on MacOS Monterey. Getting this error

installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-harmony-master/00new/harmony/libs R data moving datasets to lazyload DB byte-compile and prepare package for lazy loading help installing help indices * copying figures building package indices installing vignettes testing if installed package can be loaded from temporary location sh: line 1: 81021 Abort trap: 6 R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/9m/x38vkwtx06d2lyn8b8l0tr0c0000gn/T//RtmpxTEPhU/file13c4c1e59e8b' ERROR: loading failed

I can compile other packages (ggrepel, glue, presto) without any issue. Here is my session Info.

setting value version R version 4.2.1 (2022-06-23) os macOS Monterey 12.6.8 system x86_64, darwin17.0 ui RStudio language (EN) collate en_US.UTF-8 ctype en_US.UTF-8 tz Europe/Paris date 2023-10-13 rstudio 2022.07.2+576 Spotted Wakerobin (desktop) pandoc NA

I have tried many things as reinstalling gfortran but did not solve the issue.

pati-ni commented 1 year ago

Hi @SalimMegat,

Rather cryptic message..

Can you share the exact sessionInfo() output from the R environment?

Also, how are you trying to install the package? Through CRAN or github? You may want to try the complementary method

Also, does your machine have Intel or Apple silicon?

pati-ni commented 1 year ago

Also please post full command output of the installation

SalimMegat commented 1 year ago

Hi,

Sorry I just saw that a lot of info was missing :) My machine has an intel and I installed it via CRAN and github (same error) see below :

devtools::install_github("immunogenomics/harmony", build_vignettes=TRUE)

✔ checking for file ‘/private/var/folders/9m/x38vkwtx06d2lyn8b8l0tr0c0000gn/T/RtmpCbahT0/remotes130ae2ee281e5/immunogenomics-harmony-91ba142/DESCRIPTION’ ... ─ preparing ‘harmony’: ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ installing the package to build vignettes (382ms)

─ installing source package ‘harmony’ ... using staged installation libs /usr/local/gfortran/bin/g++ -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppProgress/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:168 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony_types.h:1 from RcppExports.cpp:4 /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:n function ‘const char Rcpp::internal::coerce_to_string(typename Rcpp::traits::storage_type::type) [with int RTYPE = 24; typename Rcpp::traits::storage_type::type = unsigned char] /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:255:7:warning: int sprintf(char, const char, ...)deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations 255 | ::sprintf, "%02x", from); | ^~~ In file included from /usr/local/include/wchar.h:90 from /usr/local/gfortran/include/c++/11.2.0/cwchar:44 from /usr/local/gfortran/include/c++/11.2.0/bits/postypes.h:40 from /usr/local/gfortran/include/c++/11.2.0/bits/char_traits.h:40 from /usr/local/gfortran/include/c++/11.2.0/string:40 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/macros/macros.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:64 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony_types.h:1 from RcppExports.cpp:4 /usr/local/include/stdio.h:190:10:note: red here 190 | int sprintf restrict, const char * restrict, ...) printflike(2, 3); | ^~~ In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:168 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony_types.h:1 from RcppExports.cpp:4 /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:255:14:warning: int sprintf(char, const char, ...)deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations 255 | ::sprintf(buff, "%02x", from) | ~~~^~~~~~ In file included from /usr/local/include/wchar.h:90 from /usr/local/gfortran/include/c++/11.2.0/cwchar:44 from /usr/local/gfortran/include/c++/11.2.0/bits/postypes.h:40 from /usr/local/gfortran/include/c++/11.2.0/bits/char_traits.h:40 from /usr/local/gfortran/include/c++/11.2.0/string:40 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/macros/macros.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:64 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony_types.h:1 from RcppExports.cpp:4 /usr/local/include/stdio.h:190:10:note: red here 190 | int sprintf * restrict, const char restrict, ...) printflike(2, 3); | ^~~ /usr/local/gfortran/bin/g++ -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppProgress/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c harmony.cpp -o harmony.o In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:168 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony.h:1 from harmony.cpp:4 /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:n function ‘const char Rcpp::internal::coerce_to_string(typename Rcpp::traits::storage_type::type) [with int RTYPE = 24; typename Rcpp::traits::storage_type::type = unsigned char] /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:255:7:warning: int sprintf(char, const char, ...)deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations 255 | ::sprintf, "%02x", from); | ^~~ In file included from /usr/local/include/wchar.h:90 from /usr/local/gfortran/include/c++/11.2.0/cwchar:44 from /usr/local/gfortran/include/c++/11.2.0/bits/postypes.h:40 from /usr/local/gfortran/include/c++/11.2.0/bits/char_traits.h:40 from /usr/local/gfortran/include/c++/11.2.0/string:40 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/macros/macros.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:64 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony.h:1 from harmony.cpp:4 /usr/local/include/stdio.h:190:10:note: red here 190 | int sprintf __restrict, const char restrict, ...) printflike(2, 3); | ^~~ In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:168 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony.h:1 from harmony.cpp:4 /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:255:14:warning: int sprintf(char, const char, ...)deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations 255 | ::sprintf(buff, "%02x", from) | ~~~^~~~~~ In file included from /usr/local/include/wchar.h:90 from /usr/local/gfortran/include/c++/11.2.0/cwchar:44 from /usr/local/gfortran/include/c++/11.2.0/bits/postypes.h:40 from /usr/local/gfortran/include/c++/11.2.0/bits/char_traits.h:40 from /usr/local/gfortran/include/c++/11.2.0/string:40 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/macros/macros.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:64 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from harmony.h:1 from harmony.cpp:4 /usr/local/include/stdio.h:190:10:note: red here 190 | int sprintf __restrict, const char restrict, ...) printflike(2, 3); | ^~~ /usr/local/gfortran/bin/g++ -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include' -I'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppProgress/include' -I/usr/local/include -fPIC -Wall -g -O2 -Wall -pedantic -fdiagnostics-color=always -c utils.cpp -o utils.o In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:168 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from utils.h:2 from utils.cpp:1 /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:n function ‘const char Rcpp::internal::coerce_to_string(typename Rcpp::traits::storage_type::type) [with int RTYPE = 24; typename Rcpp::traits::storage_type::type = unsigned char] /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:255:7:warning: int sprintf(char, const char, ...)deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations 255 | ::sprintf, "%02x", from); | ^~~ In file included from /usr/local/include/wchar.h:90 from /usr/local/gfortran/include/c++/11.2.0/cwchar:44 from /usr/local/gfortran/include/c++/11.2.0/bits/postypes.h:40 from /usr/local/gfortran/include/c++/11.2.0/bits/char_traits.h:40 from /usr/local/gfortran/include/c++/11.2.0/string:40 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/macros/macros.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:64 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from utils.h:2 from utils.cpp:1 /usr/local/include/stdio.h:190:10:note: red here 190 | int sprintf restrict, const char * restrict, ...) printflike(2, 3); | ^~~ In file included from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:168 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from utils.h:2 from utils.cpp:1 /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/internal/r_coerce.h:255:14:warning: int sprintf(char, const char, ...)deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations 255 | ::sprintf(buff, "%02x", from) | ~~~^~~~~~ In file included from /usr/local/include/wchar.h:90 from /usr/local/gfortran/include/c++/11.2.0/cwchar:44 from /usr/local/gfortran/include/c++/11.2.0/bits/postypes.h:40 from /usr/local/gfortran/include/c++/11.2.0/bits/char_traits.h:40 from /usr/local/gfortran/include/c++/11.2.0/string:40 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/macros/macros.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/Rcpp/r/headers.h:64 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/Rcpp/include/RcppCommon.h:30 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadilloForward.h:25 from /Library/Frameworks/R.framework/Versions/4.2/Resources/library/RcppArmadillo/include/RcppArmadillo.h:29 from types.h:3 from utils.h:2 from utils.cpp:1 /usr/local/include/stdio.h:190:10:note: red here 190 | int sprintf * restrict, const char * restrict, ...) printflike(2, 3); | ^~~ /usr/local/gfortran/bin/g++ -fopenmp -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 utils.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin20/11.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /private/var/folders/9m/x38vkwtx06d2lyn8b8l0tr0c0000gn/T/RtmpL0VUed/Rinst13e3f468f68f0/00LOCK-harmony/00new/harmony/libs R data moving datasets to lazyload DB byte-compile and prepare package for lazy loading help installing help indices * copying figures building package indices installing vignettes testing if installed package can be loaded from temporary location sh: line 1: 81539 Abort trap: 6 R_TESTS= '/Library/Frameworks/R.framework/Resources/bin/R' --no-save --no-restore --no-echo 2>&1 < '/var/folders/9m/x38vkwtx06d2lyn8b8l0tr0c0000gn/T//RtmpGBYlPQ/file13e4c45a76025' ERROR: loading failed ─ removing ‘/private/var/folders/9m/x38vkwtx06d2lyn8b8l0tr0c0000gn/T/RtmpL0VUed/Rinst13e3f468f68f0/harmony’

ERROR: package installation failed Error: Failed to install 'harmony' from GitHub: ! System command 'R' failed

SessionInfo() R version 4.2.1 (2022-06-23) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Monterey 12.6.8

Matrix products: default LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.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

other attached packages: [1] devtools_2.4.5 usethis_2.1.6 presto_1.0.0 data.table_1.14.2 sf_1.0-14 Rcpp_1.0.9

loaded via a namespace (and not attached): [1] pkgload_1.3.0 tidyr_1.3.0 splines_4.2.1 shiny_1.7.2 assertthat_0.2.1 remotes_2.4.2.1 sessioninfo_1.2.2 globals_0.16.1 Rttf2pt1_1.3.12 pillar_1.8.1
[11] backports_1.4.1 lattice_0.20-45 glue_1.6.2.9000 extrafontdb_1.0 digest_0.6.29 promises_1.2.0.1 colorspace_2.0-3 htmltools_0.5.3 httpuv_1.6.6 Matrix_1.6-1.1
[21] plyr_1.8.9 pkgconfig_2.0.3 broom_1.0.4 listenv_0.8.0 purrr_1.0.2 xtable_1.8-4 scales_1.2.1 processx_3.7.0 later_1.3.0 proxy_0.4-27
[31] tibble_3.2.1 generics_0.1.3 ggplot2_3.4.3 ellipsis_0.3.2 cachem_1.0.6 withr_2.5.0 lazyeval_0.2.2 cli_3.6.1 survival_3.4-0 magrittr_2.0.3
[41] crayon_1.5.1 mime_0.12 memoise_2.0.1 ps_1.7.1 fs_1.5.2 future_1.33.0 fansi_1.0.3 parallelly_1.36.0 class_7.3-20 pkgbuild_1.3.1
[51] profvis_0.3.7 tools_4.2.1 prettyunits_1.1.1 lifecycle_1.0.3 stringr_1.5.0 munsell_0.5.0 callr_3.7.2 e1071_1.7-13 compiler_4.2.1 rlang_1.1.1
[61] units_0.8-1 classInt_0.4-8 grid_4.2.1 rstudioapi_0.14 htmlwidgets_1.5.4 igraph_1.5.0.1 miniUI_0.1.1.1 gtable_0.3.1 codetools_0.2-18 DBI_1.1.3
[71] curl_4.3.2 ggforestplot_0.1.0 reshape2_1.4.4 R6_2.5.1 dplyr_1.0.10 fastmap_1.1.0 future.apply_1.9.1 extrafont_0.19 utf8_1.2.2 rprojroot_2.0.3
[81] KernSmooth_2.23-20 stringi_1.7.8 parallel_4.2.1 vctrs_0.6.3 tidyselect_1.2.0 urlchecker_1.0.1

pati-ni commented 1 year ago

Thanks for the complete output. Still unable to understand the problem. One thing that is not there is BLAS so it may be causing problems.

Do you get the same error when installing from CRAN with install.packages('harmony')?

SalimMegat commented 1 year ago

Hi,

Yes I do have the same problem when installing with install.packages('harmony').

SalimMegat commented 1 year ago

Here is the error :

install.packages('harmony')

There is a binary version available but the source version is later: binary source needs_compilation harmony 0.1.1 1.0.3 TRUE

Do you want to install from sources the package which needs compilation? (Yes/no/cancel) yes installing the source package ‘harmony’

trying URL 'https://cloud.r-project.org/src/contrib/harmony_1.0.3.tar.gz' Content type 'application/x-gzip' length 5193251 bytes (5.0 MB)

downloaded 5.0 MB

The downloaded source packages are in ‘/private/var/folders/9m/x38vkwtx06d2lyn8b8l0tr0c0000gn/T/RtmpCbahT0/downloaded_packages’

pati-ni commented 1 year ago

The error message looks unfamiliar. I am not sure how specific this is to harmony or if you are having trouble installing this with other R packages.

Also, OSX Darwin 17 goes all the way back to 2017 according to Wikipedia. Is this system up to date/still supported?

One thing I would recommend trying out is a fresh and recent R environment, perhaps through conda? This comes bundled with new compilers and all the toolchains needed for harmony.

pati-ni commented 9 months ago

Feel free to re-open if this is still an issue