immunogenomics / harmony

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

HARMONY installation error #191

Closed Citugulia40 closed 9 months ago

Citugulia40 commented 1 year ago

Hi, I am facing error in installing harmony with R-4.1 version. I have tried to install from CRAN and as well as github.

trying URL 'https://cloud.r-project.org/src/contrib/harmony_0.1.1.tar.gz'
Content type 'application/x-gzip' length 1351250 bytes (1.3 MB)
==================================================
downloaded 1.3 MB

* installing *source* package ‘harmony’ ...
** package ‘harmony’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -std=gnu++11 -I"/usr/local/lib64/R/include" -DNDEBUG  -I'/home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include' -I'/home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/RcppArmadillo/include' -I'/usr/local/lib64/R/library/RcppProgress/include' -I/usr/local/include   -fpic  -g -O2  -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"/usr/local/lib64/R/include" -DNDEBUG  -I'/home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/Rcpp/include' -I'/home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/RcppArmadillo/include' -I'/usr/local/lib64/R/library/RcppProgress/include' -I/usr/local/include   -fpic  -g -O2  -c harmony.cpp -o harmony.o
g++ -std=gnu++11 -shared -L/usr/local/lib64/R/lib -L/usr/local/lib64 -o harmony.so RcppExports.o harmony.o -lopenblas -lgfortran -lm -lquadmath -L/usr/local/lib64/R/lib -lR
installing to /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-harmony/00new/harmony/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** 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
*** Error in `/usr/local/lib64/R/bin/exec/R': free(): invalid pointer: 0x00007fc1315da3e0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x81299)[0x7fc1373c8299]
/home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-harmony/00new/harmony/libs/harmony.so(_Z32_rcpp_module_harmony_module_initv+0x1740)[0x7fc12a500f10]
/home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-harmony/00new/harmony/libs/harmony.so(_rcpp_module_boot_harmony_module+0x28)[0x7fc12a5013e8]
/usr/local/lib64/R/lib/libR.so(+0xfe1d4)[0x7fc137c621d4]
/usr/local/lib64/R/lib/libR.so(+0x13eb3c)[0x7fc137ca2b3c]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x14af1f)[0x7fc137caef1f]
/usr/local/lib64/R/lib/libR.so(Rf_applyClosure+0x1c7)[0x7fc137cafcb7]
/usr/local/lib64/R/lib/libR.so(+0x13f4b4)[0x7fc137ca34b4]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
/usr/local/lib64/R/lib/libR.so(+0x13d677)[0x7fc137ca1677]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
/usr/local/lib64/R/lib/libR.so(+0x13d677)[0x7fc137ca1677]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
/usr/local/lib64/R/lib/libR.so(+0x13d677)[0x7fc137ca1677]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
/usr/local/lib64/R/lib/libR.so(+0x13d677)[0x7fc137ca1677]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x14af1f)[0x7fc137caef1f]
/usr/local/lib64/R/lib/libR.so(Rf_applyClosure+0x1c7)[0x7fc137cafcb7]
/usr/local/lib64/R/lib/libR.so(+0x13f4b4)[0x7fc137ca34b4]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x14af1f)[0x7fc137caef1f]
/usr/local/lib64/R/lib/libR.so(Rf_applyClosure+0x1c7)[0x7fc137cafcb7]
/usr/local/lib64/R/lib/libR.so(+0x13f4b4)[0x7fc137ca34b4]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x14af1f)[0x7fc137caef1f]
/usr/local/lib64/R/lib/libR.so(Rf_applyClosure+0x1c7)[0x7fc137cafcb7]
/usr/local/lib64/R/lib/libR.so(+0x13f4b4)[0x7fc137ca34b4]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x14af1f)[0x7fc137caef1f]
/usr/local/lib64/R/lib/libR.so(Rf_applyClosure+0x1c7)[0x7fc137cafcb7]
/usr/local/lib64/R/lib/libR.so(+0x13f4b4)[0x7fc137ca34b4]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x14af1f)[0x7fc137caef1f]
/usr/local/lib64/R/lib/libR.so(Rf_applyClosure+0x1c7)[0x7fc137cafcb7]
/usr/local/lib64/R/lib/libR.so(+0x13f4b4)[0x7fc137ca34b4]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x14af1f)[0x7fc137caef1f]
/usr/local/lib64/R/lib/libR.so(Rf_applyClosure+0x1c7)[0x7fc137cafcb7]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x333)[0x7fc137cad383]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
/usr/local/lib64/R/lib/libR.so(+0x13d677)[0x7fc137ca1677]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
/usr/local/lib64/R/lib/libR.so(+0x13d677)[0x7fc137ca1677]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
/usr/local/lib64/R/lib/libR.so(+0x13d677)[0x7fc137ca1677]
/usr/local/lib64/R/lib/libR.so(Rf_eval+0x160)[0x7fc137cad1b0]
/usr/local/lib64/R/lib/libR.so(+0x149b42)[0x7fc137cadb42]
/usr/local/lib64/R/lib/libR.so(+0x149f64)[0x7fc137cadf64]
======= Memory map: ========
00400000-00401000 r-xp 00000000 fd:00 1664090482                         /usr/local/lib64/R/bin/exec/R
00600000-00601000 r--p 00000000 fd:00 1664090482                         /usr/local/lib64/R/bin/exec/R
00601000-00602000 rw-p 00001000 fd:00 1664090482                         /usr/local/lib64/R/bin/exec/R
01c83000-0760e000 rw-p 00000000 00:00 0                                  [heap]
7fc120000000-7fc120021000 rw-p 00000000 00:00 0 
7fc120021000-7fc124000000 ---p 00000000 00:00 0 
7fc1278d9000-7fc127b4f000 r-xp 00000000 fd:00 884100                     /usr/lib64/libgfortran.so.5.0.0
7fc127b4f000-7fc127d4e000 ---p 00276000 fd:00 884100                     /usr/lib64/libgfortran.so.5.0.0
7fc127d4e000-7fc127d4f000 r--p 00275000 fd:00 884100                     /usr/lib64/libgfortran.so.5.0.0
7fc127d4f000-7fc127d51000 rw-p 00276000 fd:00 884100                     /usr/lib64/libgfortran.so.5.0.0
7fc127d51000-7fc127d9b000 r-xp 00000000 fd:00 537128991                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/utf8/libs/utf8.so
7fc127d9b000-7fc127f9a000 ---p 0004a000 fd:00 537128991                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/utf8/libs/utf8.so
7fc127f9a000-7fc127f9b000 r--p 00049000 fd:00 537128991                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/utf8/libs/utf8.so
7fc127f9b000-7fc127f9c000 rw-p 0004a000 fd:00 537128991                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/utf8/libs/utf8.so
7fc127f9c000-7fc127fb3000 r-xp 00000000 fd:00 297581                     /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/fansi/libs/fansi.so
7fc127fb3000-7fc1281b2000 ---p 00017000 fd:00 297581                     /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/fansi/libs/fansi.so
7fc1281b2000-7fc1281b3000 r--p 00016000 fd:00 297581                     /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/fansi/libs/fansi.so
7fc1281b3000-7fc1281b4000 rw-p 00017000 fd:00 297581                     /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/fansi/libs/fansi.so
7fc1281b4000-7fc1281b7000 r-xp 00000000 fd:00 21385158                   /usr/local/lib64/R/library/magrittr/libs/magrittr.so
7fc1281b7000-7fc1283b6000 ---p 00003000 fd:00 21385158                   /usr/local/lib64/R/library/magrittr/libs/magrittr.so
7fc1283b6000-7fc1283b7000 r--p 00002000 fd:00 21385158                   /usr/local/lib64/R/library/magrittr/libs/magrittr.so
7fc1283b7000-7fc1283b8000 rw-p 00003000 fd:00 21385158                   /usr/local/lib64/R/library/magrittr/libs/magrittr.so
7fc1283b8000-7fc1283c3000 r-xp 00000000 fd:00 537161760                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/colorspace/libs/colorspace.so
7fc1283c3000-7fc1285c3000 ---p 0000b000 fd:00 537161760                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/colorspace/libs/colorspace.so
7fc1285c3000-7fc1285c4000 r--p 0000b000 fd:00 537161760                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/colorspace/libs/colorspace.so
7fc1285c4000-7fc1285c5000 rw-p 0000c000 fd:00 537161760                  /home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/colorspace/libs/colorspace.so
7fc1285c5000-7fc1285c7000 r-xp 00000000 fd:00 18076621                   /usr/local/lib64/R/library/glue/libs/glue.so
7fc1285c7000-7fc1287c7000 ---p 00002000 fd:00 18076621                   /usr/local/lib64/R/library/glue/libs/glue.so
7fc1287c7000-7fc1287c8000 r--p 00002000 fd:00 18076621                   /usr/local/lib64/R/library/glue/libs/glue.sosh: line 1: 44505 Aborted                 (core dumped) R_TESTS= '/usr/local/lib64/R/bin/R' --no-save --no-restore --no-echo 2>&1 < '/tmp/Rtmp3g0jpC/fileabe8108c00c0'
ERROR: loading failed
* removing ‘/home/ccitu/R/x86_64-pc-linux-gnu-library/4.1/harmony’

The downloaded source packages are in
    ‘/tmp/Rtmpo9RkyH/downloaded_packages’
Warning message:
In install.packages("harmony", version = "0.1.0") :
  installation of package ‘harmony’ had non-zero exit status

Please help.

Thanks in advance

pati-ni commented 12 months ago

Sorry for the delayed response, but it looks like there might be a problem with your R setup. Can you install other packages using CRAN and/or github?

michellemeier27 commented 10 months ago

I have the same issue. I am recomputing an R environment (renv v 1.0.3), so I've been installing packages from github and CRAN all afternoon and this suddenly happened. I am on R-4.3.2 and trying to install harmony v 1.1.0 though.

pati-ni commented 10 months ago

Hi @michellemeier27,

please post full installation log and your sessionInfo().

michellemeier27 commented 10 months ago

Hi @pati-ni I'm going to try and give you all the information I have, but please let me know if there is anything else you need. I'm attaching the build.log which is the output of R -e 'renv::restore(); install.packages("harmony")' 2>&1 | tee build.log. Then I have a README.md file that I used to store notes when I was generating the r environment, it also contains the modules I load on our cluster (gcc version etc) and the contents of my Makevars.The sessioninfo.log contains sessionInfo() and I'm attaching my renv_lock.log which contains all the versions of the packages that I've downloaded.

pati-ni commented 10 months ago

Thanks for sharing such a detailed overview of your environment.

I see that your workflow is rather complicated. I would start simple by reproducing a minimum failing example. For example, try to only module load R/4.3.2.Core and then try to install harmony. I would also check that there is no other R in the path already...

EDIT: avoid to set the C++ flags. Remove any Makevars files interfering with these

michellemeier27 commented 10 months ago

Hi @pati-ni So I tried installing harmony without my Makevars and only running module load R/4.3.2.Core but still within my r environment which unfortunately still fails. However, if I move outside of my environment it installs without issues. It must be something in the environment that's bothering it during installation. So doesn't seem to be related to harmony itself :) If you have any ideas what it could be clashing with let me know, but I understand that this is not related to your package anymore. My guess is that it might fail because I used my Makevars file to compile packages harmony needs for installation like Rcpp. If I get time this week I will try and recompute everything again without a Makevars file to see if that fixes the issue and update here.

pati-ni commented 10 months ago

It is a wild guess but judging from the messages you are getting I would expect to link your compiler to different library of armadillo compared to what R is loading. Some further investigation of R system-wide Makevars, linked libraries and LD_LIBRARY_PATH and LIBRARY_PATH environment cars could help with this.

Please post here if you get a resolution

On Mon, Nov 20, 2023, 19:27 michellemeier27 @.***> wrote:

Hi @pati-ni https://github.com/pati-ni So I tried installing harmony without my Makevars and only running module load R/4.3.2.Core but still within my r environment which unfortunately still fails. However, if I move outside of my environment it installs without issues. It must be something in the environment that's bothering it during installation. So doesn't seem to be related to harmony itself :) If you have any ideas what it could be clashing with let me know, but I understand that this is not related to your package anymore. My guess is that it might fail because I used my Makevars file to compile packages harmony needs for installation like Rcpp. If I get time this week I will try and recompute everything again without a Makevars file to see if that fixes the issue and update here.

— Reply to this email directly, view it on GitHub https://github.com/immunogenomics/harmony/issues/191#issuecomment-1820022258, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSFW2GUT4I6Q553CSH2OB3YFPYOVAVCNFSM6AAAAAAWEJEKBCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQGAZDEMRVHA . You are receiving this because you were mentioned.Message ID: @.***>