saigegit / SAIGE

Development for SAIGE and SAIGE-GENE(+)
GNU General Public License v3.0
64 stars 27 forks source link

Installation from the source code Step 3 Issue: leeshawn/MetaSKAT and Rcpp #121

Closed Lloyd-LiuSiyi closed 10 months ago

Lloyd-LiuSiyi commented 11 months ago

Hi, I was installing SAIGE from the source code and encountered these error messages during step 3 Rscript ./SAIGE/extdata/install_packages.R

Loading required package: leeshawn/MetaSKAT
Skipping install of 'MetaSKAT' from a github remote, the SHA1 (c0b63c19) has not changed since last install.
  Use `force = TRUE` to force installation
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘leeshawn/MetaSKAT’
Warning: unable to access index for repository http://cran.us.r-project.org/src/contrib:
  download from 'http://cran.us.r-project.org/src/contrib/PACKAGES' failed
Error in download_version_url(package, version, repos, type) :
  couldn't find package 'Rcpp'
Calls: <Anonymous> -> <Anonymous> -> download_version_url
Execution halted

However, I have successfully installed MetaSKAT and Rcpp in R.

> devtools::install_github("leeshawn/MetaSKAT", force=TRUE)
Downloading GitHub repo leeshawn/MetaSKAT@HEAD
── R CMD build ─────────────────────────────────────────────────────────────────────────────────────────────────────────
✔  checking for file ‘/tmp/RtmpNHFNSL/remotes59eb1c9872aa/leeshawn-MetaSKAT-c0b63c1/DESCRIPTION’ ...
─  preparing ‘MetaSKAT’:
✔  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 ‘MetaSKAT_0.81.tar.gz’

Installing package into ‘/home/lloyd/R/x86_64-pc-linux-gnu-library/4.3’
(as ‘lib’ is unspecified)
* installing *source* package ‘MetaSKAT’ ...
** using staged installation
** libs
using C++ compiler: ‘g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0’
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c Interface_Meta.cpp -o Interface_Meta.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c MatFile.cpp -o MatFile.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c Meta.cpp -o Meta.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c Permutation.cpp -o Permutation.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c RFunc.cpp -o RFunc.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c Read_BED.cpp -o Read_BED.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c Read_Dosage.cpp -o Read_Dosage.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG   -I/usr/local/include    -fpic  -g -O2  -c crc32.cpp -o crc32.o
g++ -std=gnu++17 -shared -L/opt/R/4.3.1/lib/R/lib -L/usr/local/lib -o MetaSKAT.so Interface_Meta.o MatFile.o Meta.o Permutation.o RFunc.o Read_BED.o Read_Dosage.o crc32.o -L/opt/R/4.3.1/lib/R/lib -lR
installing to /home/lloyd/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-MetaSKAT/00new/MetaSKAT/libs
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (MetaSKAT)

and

* installing *source* package ‘Rcpp’ ...
** package ‘Rcpp’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
using C++ compiler: ‘g++ (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0’
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c api.cpp -o api.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c attributes.cpp -o attributes.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c barrier.cpp -o barrier.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c date.cpp -o date.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c module.cpp -o module.o
g++ -std=gnu++17 -I"/opt/R/4.3.1/lib/R/include" -DNDEBUG -I../inst/include/  -I/usr/local/include    -fpic  -g -O2  -c rcpp_init.cpp -o rcpp_init.o
g++ -std=gnu++17 -shared -L/opt/R/4.3.1/lib/R/lib -L/usr/local/lib -o Rcpp.so api.o attributes.o barrier.o date.o module.o rcpp_init.o -L/opt/R/4.3.1/lib/R/lib -lR
installing to /home/lloyd/R/x86_64-pc-linux-gnu-library/4.3/00LOCK-Rcpp/00new/Rcpp/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
DONE (Rcpp)

My system is Ubuntu 20.04.3 LTS in Windows subsystem for Linux (wsl). What could the problem be? Many thanks!

Lloyd-LiuSiyi commented 11 months ago

Plus on a different Ubuntu 20.04 terminal I somehow passed Step 3 magically and encountered the following error in Step 4:

R CMD INSTALL SAIGE
* installing to library ‘/home/lloyd/R/x86_64-pc-linux-gnu-library/4.3’
* installing *source* package ‘SAIGE’ ...
** using staged installation
cget must be installed to build SAIGE. Run Requirement already satisfied: cget in /home/lloyd/.local/lib/python3.8/site-packages (0.2.0)
Requirement already satisfied: six>=1.10 in /usr/lib/python3/dist-packages (from cget) (1.14.0)
Requirement already satisfied: click>=6.6 in /usr/lib/python3/dist-packages (from cget) (7.0).
ERROR: configuration failed for package ‘SAIGE’
* removing ‘/home/lloyd/R/x86_64-pc-linux-gnu-library/4.3/SAIGE’

Seems I have satisfied all dependencies and requirements but the configuration still fails. Does anybody know how to fix it?