xinhe-lab / GSFA

R package that performs sparse factor analysis and differential gene expression discovery simultaneously on single-cell CRISPR screening data.
https://xinhe-lab.github.io/GSFA/
MIT License
19 stars 2 forks source link

Install problem #3

Open Juneil-Jang opened 1 year ago

Juneil-Jang commented 1 year ago

Hi, I have a problem with my Ubuntu system after trying to install GSFA with docker. Actually, It doesn't work, (devtool install also didn't work) My computer cannot reboot anymore with a broken GNOME display manager. How can I fix this problem? Please let me know if you have any ideas!

LifanLiang commented 12 months ago

Hi, I'm sorry to hear what happened to your computer system. But I don't think installing GSFA will cause that much damage though... My random guess is that installing GSFA in Ubuntu may require additional C++ compiler toolkits. Please post the detailed error message when devtool install failed so we may be able to spot related issues.

hanhuajun40 commented 6 months ago

Hi, Lifan,

I also had an issue when installing GFSA package. The error is below:

Updating HTML index of packages in '.Library' Making 'packages.html' ... done checking for file ‘/tmp/RtmpJqXqOr/remotesc32347216eed/xinhe-lab-GSFA-8e7cf03✔ checking for file ‘/tmp/RtmpJqXqOr/remotesc32347216eed/xinhe-lab-GSFA-8e7cf03/DESCRIPTION’ (1.2s) ─ preparing ‘GSFA’: ✔ checking DESCRIPTION meta-information ... ─ cleaning src ─ installing the package to build vignettes E creating vignettes (47m 55.8s) --- re-building ‘gsfa_intro.Rmd’ using rmarkdown Using Factor as id variables Loading required package: dplyr

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

   filter, lag

The following objects are masked from 'package:base':

   intersect, setdiff, setequal, union

Loading required package: ggplot2 Using gene as id variables Using gene as id variables Warning: Using size for a discrete variable is not advised. Warning: The vignette title specified in \VignetteIndexEntry{} is different from the title in the YAML metadata. The former is "gsfa_intro", and the latter is "Applying GSFA in a simulated dataset". If that is intentional, you may set options(rmarkdown.html_vignette.check_title = FALSE) to suppress this check. Warning in file(con, "r") : cannot open file 'gsfa_intro.Rmd': No such file or directory Error: tangling vignette 'gsfa_intro.Rmd' failed with diagnostics: cannot open the connection --- failed re-building ‘gsfa_intro.Rmd’

SUMMARY: processing the following file failed: ‘gsfa_intro.Rmd’

Error: Vignette re-building failed. Execution halted Error: Failed to install 'GSFA' from GitHub: ! System command 'R' failed

Do you have some suggestions. Thanks!

Best,

LifanLiang commented 6 months ago

Thanks for your feedback. We are still figuring out what happened.

Meanwhile, you may first try installing GSFA with build_vignettes set to false. If installation finish without errors, you can download and run the Rmd file stored here: https://github.com/xinhe-lab/GSFA/blob/master/vignettes/gsfa_intro.Rmd and see what the problem is.

THLDo commented 4 months ago

Dear Lifan,

I tried installing GSFA with devtools::install_github("xinhe-lab/GSFA", build_vignettes = TRUE) as suggested on my windows computer. However, I ran into the following error:

> devtools::install_github("xinhe-lab/GSFA", build_vignettes = TRUE)
Registered S3 method overwritten by 'htmlwidgets':
  method           from         
  print.htmlwidget tools:rstudio
Downloading GitHub repo xinhe-lab/GSFA@HEAD
── R CMD build ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file 'C:\Users\Do\AppData\Local\Temp\RtmpCmgIJ7\remotes731c75827fa\xinhe-lab-GSFA-8e7cf03/DESCRIPTION'
─  preparing 'GSFA': (414ms)
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  installing the package to build vignettes
         -----------------------------------
─  installing *source* package 'GSFA' ...
   ** using staged installation
   ** libs
   using C++ compiler: 'G__~1.EXE (GCC) 13.2.0'
   g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG  -I'C:/Users/Do/Documents/R/win-library/4.2/Rcpp/include' -I'C:/Users/Do/Documents/R/win-library/4.2/RcppArmadillo/include'   -I"C:/RBuildTools/4.4/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -fdiagnostics-color=always -c GSFA_gibbs_inference.cpp -o GSFA_gibbs_inference.o
   g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG  -I'C:/Users/Do/Documents/R/win-library/4.2/Rcpp/include' -I'C:/Users/Do/Documents/R/win-library/4.2/RcppArmadillo/include'   -I"C:/RBuildTools/4.4/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -fdiagnostics-color=always -c GSFA_gibbs_two_groups.cpp -o GSFA_gibbs_two_groups.o
   g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG  -I'C:/Users/Do/Documents/R/win-library/4.2/Rcpp/include' -I'C:/Users/Lan Do/Documents/R/win-library/4.2/RcppArmadillo/include'   -I"C:/RBuildTools/4.4/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
   g++ -std=gnu++17  -I"C:/PROGRA~1/R/R-44~1.0/include" -DNDEBUG  -I'C:/Users/Do/Documents/R/win-library/4.2/Rcpp/include' -I'C:/Users/Do/Documents/R/win-library/4.2/RcppArmadillo/include'   -I"C:/RBuildTools/4.4/x86_64-w64-mingw32.static.posix/include"     -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -fdiagnostics-color=always -c sampling_functions.cpp -o sampling_functions.o
   sampling_functions.cpp:n function ' move_seed_rbinom()
   sampling_functions.cpp:16:10:warning: used variable 'tmp-Wunused-variable]
      16 |   double tmp:rbinom(1, 0.5);
         |          ^~~
   sampling_functions.cpp:n function ' initialize_given_Z(int, arma::mat, arma::mat&, arma::mat&, arma::mat&)
   sampling_functions.cpp:333:8:warning: mparison of integer expressions of different signedness: 'intand 'const arma::uword{aka 'const unsigned int-Wsign-compare
     333 |   if(K != Z.n_cols
         |      ~~^~~~~~~~~~~
   g++ -std=gnu++17 -shared -s -static-libgcc -o GSFA.dll tmp.def GSFA_gibbs_inference.o GSFA_gibbs_two_groups.o RcppExports.o sampling_functions.o -LC:/RBuildTools/4.4/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/RBuildTools/4.4/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-44~1.0/bin/x64 -lR
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x2a60): undefined reference to `ddot_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x4395): undefined reference to `ddot_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x6753): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x6e9f): undefined reference to `ddot_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x7018): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x764b): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x79ab): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0xdbcc): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0xdd73): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0xe5bb): more undefined references to `dgemv_' follow
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text+0x1086f): undefined reference to `dtrtri_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x4d1): undefined reference to `dgemm_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x5d0): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x6b5): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0xc27): undefined reference to `dgemm_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0xd2c): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0xf76): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x1144): undefined reference to `dsyrk_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x1a19): undefined reference to `dgemm_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x1b27): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x1c05): undefined reference to `dgemv_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text.hot+0x2024): undefined reference to `dsyrk_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6op_dot10direct_dotIdEENS_14arma_real_onlyIT_E6resultEjPKS3_S7_[_ZN4arma6op_dot10direct_dotIdEENS_14arma_real_onlyIT_E6resultEjPKS3_S7_]+0xa4): undefined reference to `ddot_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib6svd_dcIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_[_ZN4arma6auxlib6svd_dcIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_]+0x26b): undefined reference to `dgesdd_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib6svd_dcIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_[_ZN4arma6auxlib6svd_dcIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_]+0x4c7): undefined reference to `dgesdd_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib3svdIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_[_ZN4arma6auxlib3svdIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_]+0x23f): undefined reference to `dgesvd_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib3svdIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_[_ZN4arma6auxlib3svdIdEEbRNS_3MatIT_EERNS_3ColIS3_EES5_S5_]+0x4a8): undefined reference to `dgesvd_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib16chol_band_commonIdEEbRNS_3MatIT_EEjj[_ZN4arma6auxlib16chol_band_commonIdEEbRNS_3MatIT_EEjj]+0x18b): undefined reference to `dpbtrf_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib9inv_sympdIdEEbRNS_3MatIT_EERb[_ZN4arma6auxlib9inv_sympdIdEEbRNS_3MatIT_EERb]+0x79): undefined reference to `dpotrf_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib9inv_sympdIdEEbRNS_3MatIT_EERb[_ZN4arma6auxlib9inv_sympdIdEEbRNS_3MatIT_EERb]+0xa4): undefined reference to `dpotri_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib10eig_sym_dcIdEEbRNS_3ColIT_EERNS_3MatIS3_EERKS7_[_ZN4arma6auxlib10eig_sym_dcIdEEbRNS_3ColIT_EERNS_3MatIS3_EERKS7_]+0x21e): undefined reference to `dsyevd_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib10eig_sym_dcIdEEbRNS_3ColIT_EERNS_3MatIS3_EERKS7_[_ZN4arma6auxlib10eig_sym_dcIdEEbRNS_3ColIT_EERNS_3MatIS3_EERKS7_]+0x355): undefined reference to `dsyevd_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib7eig_symIdEEbRNS_3ColIT_EERNS_3MatIS3_EERKS7_[_ZN4arma6auxlib7eig_symIdEEbRNS_3ColIT_EERNS_3MatIS3_EERKS7_]+0x1b4): undefined reference to `dsyev_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma7op_chol12apply_directINS_3MatIdEEEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEj[_ZN4arma7op_chol12apply_directINS_3MatIdEEEEbRNS2_INT_9elem_typeEEERKNS_4BaseIS5_S4_EEj]+0x2c1): undefined reference to `dpotrf_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma11glue_mvnrnd13apply_noaliasIdEEbRNS_3MatIT_EERKS4_S7_j[_ZN4arma11glue_mvnrnd13apply_noaliasIdEEbRNS_3MatIT_EERKS4_S7_j]+0x3d9): undefined reference to `dnrm2_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma11glue_mvnrnd13apply_noaliasIdEEbRNS_3MatIT_EERKS4_S7_j[_ZN4arma11glue_mvnrnd13apply_noaliasIdEEbRNS_3MatIT_EERKS4_S7_j]+0xa50): undefined reference to `dnrm2_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE[_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE]+0x96): undefined reference to `dgetrf_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE[_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE]+0xf9): undefined reference to `dgetri_'
   C:\RBuildTools\4.4\x86_64-w64-mingw32.static.posix\bin/ld.exe: sampling_functions.o:sampling_functions.cpp:(.text$_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE[_ZN4arma6auxlib3invIdEEbRNS_3MatIT_EE]+0x1ec): undefined reference to `dgetri_'
   collect2.exe: error: ld returned 1 exit status
   keine DLL erzeugt
   ERROR: compilation failed for package 'GSFA'
─  removing 'C:/Users/DO~1/AppData/Local/Temp/RtmpU3Yka3/Rinst2dd8a3502a/GSFA'
         -----------------------------------
   ERROR: package installation failed
Fehler: Failed to install 'GSFA' from GitHub:
  ! System command 'Rcmd.exe' failed

I have tried various potential solutions suggested by other users with this type of errors, but none have worked. The only hint I have left is, that it could have something to do with the Windows C compiler having troubles to process the C code part.

Do you have any idea?

> sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.utf8  LC_CTYPE=German_Germany.utf8    LC_MONETARY=German_Germany.utf8 LC_NUMERIC=C                    LC_TIME=German_Germany.utf8    

time zone: Europe/Berlin
tzcode source: internal