weizhouUMICH / SAIGE

GNU Lesser General Public License v3.0
191 stars 73 forks source link

Installation error on windows and Ubuntu (under windows) #116

Closed Ojami closed 5 years ago

Ojami commented 5 years ago

Hi

I've followed the instructions here (https://github.com/weizhouUMICH/SAIGE/wiki/Genetic-association-tests-using-SAIGE#installing-saige) to install SAGE. I am using windows 10, and have Ubuntu under windows.

  1. When I follow first way:
sudo R CMD INSTALL SAIGE_0.35.8.8_R_x86_64-pc-linux-gnu.tar.gz
* installing to library ‘/usr/local/lib/R/site-library’
* installing *binary* package ‘SAIGE’ ...
* DONE (SAIGE)

When I go into R (3.6.1), and typing: library(SAIGE)

I get the following error:

Error: package or namespace load failed for ‘SAIGE’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/SAIGE/libs/SAIGE.so':
  libboost_iostreams.so.1.58.0: cannot open shared object file: No such file or directory
  1. I then tried the second way on RStudio: devtools::install_github("weizhouUMICH/SAIGE") and got the following error (only copied the last parts):
problem copying .\weizhouUMICH-SAIGE-43e4e34\thirdParty\bgen\3rd_party\boost_1_55_0\libs\numeric\ublas\doc\html\structboost_1_1numeric_1_1ublas_1_1vector__temporary__traits_3_01vector__range_3_01_v_01_4_01_4.html to C:\Users\xjamov\AppData\Local\Temp\RtmpSWjbQ6\Rbuild488813a145ac\weizhouUMICH-SAIGE-43e4e34\thirdParty\bgen\3rd_party\boost_1_55_0\libs\numeric\ublas\doc\html\structboost_1_1numeric_1_1ublas_1_1vector__temporary__traits_3_01vector__range_3_01_v_01_4_01_4.html: No such file or directory
   Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
     problem copying .\weizhouUMICH-SAIGE-43e4e34\thirdParty\bgen\3rd_party\boost_1_55_0\libs\numeric\ublas\doc\html\structboost_1_1numeric_1_1ublas_1_1vector__temporary__traits_3_01vector__slice_3_01_v_01_4_01_4.html to C:\Users\xjamov\AppData\Local\Temp\RtmpSWjbQ6\Rbuild488813a145ac\weizhouUMICH-SAIGE-43e4e34\thirdParty\bgen\3rd_party\boost_1_55_0\libs\numeric\ublas\doc\html\structboost_1_1numeric_1_1ublas_1_1vector__temporary__traits_3_01vector__slice_3_01_v_01_4_01_4.html: No such file or directory
    ERROR
   copying to build directory failed
Error: Failed to install 'SAIGE' from GitHub:
  System command error, exit status: 1, stdout + stderr (last 10 lines):
E> Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
E>   over-long path length
E> Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
E>   over-long path length
E> Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
E>   problem copying .\weizhouUMICH-SAIGE-43e4e34\thirdParty\bgen\3rd_party\boost_1_55_0\libs\numeric\ublas\doc\html\structboost_1_1numeric_1_1ublas_1_1vector__temporary__traits_3_01vector__range_3_01_v_01_4_01_4.html to C:\Users\xjamov\AppData\Local\Temp\RtmpSWjbQ6\Rbuild488813a145ac\weizhouUMICH-SAIGE-43e4e34\thirdParty\bgen\3rd_party\boost_1_55_0\libs\numeric\ublas\doc\html\structboost_1_1numeric_1_1ublas_1_1vector__temporary__traits_3_01vector__range_3_01_v_01_4_01_4.html: No such file or directory
E> Warning in file.copy(pkgname, Tdir, recursive = TRUE, copy.date = TRUE) :
E> 
  1. I then tried third way:
    
    src_branch=master
    repo_src_url=https://github.com/weizhouUMICH/SAIGE
    git clone --depth 1 -b $src_branch $repo_src_url

R CMD INSTALL SAIGE

which threw the following error (only copied the last parts)

** libs g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o SAIGE.so RcppExports.o test.o matrixMultiEigen.o SAIGE_fitGLMM_fast.o SAIGE_readDosage_bgen.o SAIGE_readDosage_plain.o SAIGE_readDosage_vcf.o SAIGE_GENE_readDosageMatrix_vcf.o ../thirdParty/bgen/build/src/MissingValue.cpp.2.o ../thirdParty/bgen/build/src/bgen.cpp.2.o ../thirdParty/bgen/build/src/zlib.cpp.2.o ../thirdParty/bgen/build/src/IndexQuery.cpp.2.o ../thirdParty/bgen/build/src/View.cpp.2.o ../thirdParty/bgen/build/db/libdb.a ../thirdParty/bgen/build/3rd_party/zstd-1.1.0/libzstd.a ../thirdParty/bgen/build/3rd_party/sqlite3/libsqlite3.a ../thirdParty/bgen/build/3rd_party/boost_1_55_0/libboost.a -llapack -lblas -lgfortran -lm -lquadmath -L../bgen/3rd_party/boost_1_55_0/boost/iostreams -lboost_iostreams -L../thirdParty/cget/lib/ -L../thirdParty/cget/lib64/ -lsavvy -lhts -lsuperlu -L/usr/lib/R/lib -lR /usr/bin/ld: cannot find -lsavvy /usr/bin/ld: cannot find -lhts /usr/bin/ld: cannot find -lsuperlu collect2: error: ld returned 1 exit status /usr/share/R/share/make/shlib.mk:6: recipe for target 'SAIGE.so' failed make: *** [SAIGE.so] Error 1 ERROR: compilation failed for package ‘SAIGE’

So, can you please let me know what's wrong?

Thanks in advance Oveis

Ojami commented 5 years ago

SOLVED: It turned out that the problem was due to savvy. So after installation of savvy , SAIGE was successfully installed using: devtools::install_github("weizhouUMICH/SAIGE")

wym0072003 commented 4 years ago

@Ojami could you please specify what is savvy and how to install it? Thanks very much!

Best,

Yiming

Ojami commented 4 years ago

Dear Yiming,

My problem was savvy which is one of SAIGE dependencies. I didn't have cmake for building savvy, and that's why I was getting errors. Please note that I'm using Ubuntu under windows 10 (WSL), so my Linux subsystem didn't have cmake. If this is the case also for you, you can install (or upgrade) cmake using this link. Also don't forget to install cget on your system using pip (which is already on SAIGE installation page). sudo -H pip install cget

After that, you can simply install SAIGE in R: devtools::install_github("weizhouUMICH/SAIGE")

Best/Oveis

wym0072003 commented 4 years ago

@Ojami Thanks for your help!

Best,

Yiming