nolanlab / citrus

Citrus Development Code
GNU General Public License v3.0
31 stars 20 forks source link

can't install ("nolanlab/Rclusterpp") #112

Closed qinner closed 6 years ago

qinner commented 7 years ago

Windows 10, using R tool34, try both R3.4.0 and R 3.3.2 But cant install since install_github("nolanlab/Rclusterpp").

Rtool 34 with R3.4.0 ERROR: compilation failed for package 'Rclusterpp'

Rtool 34 with R3.3.2 ERROR: dependency 'RcppEigen' is not available for package 'Rclusterpp'

Is anyone here can help with the problem? Thanks!

SamGG commented 7 years ago

No problem with R 3.3.2 (output below). I don't know if it's possible, but did you try to install Rcpp and RcppEigen separately?

> library(devtools)
> install_github("nolanlab/Rclusterpp")
Downloading GitHub repo nolanlab/Rclusterpp@master
from URL https://api.github.com/repos/nolanlab/Rclusterpp/zipball/master
Installing Rclusterpp
Installing 1 package: Rcpp
Installing package into ‘C:/Users/myusername/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/Rcpp_0.12.11.zip'
Content type 'application/zip' length 3367049 bytes (3.2 MB)
downloaded 3.2 MB

package ‘Rcpp’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\myusername\AppData\Local\Temp\RtmpOq9K4Q\downloaded_packages
Installing 1 package: RcppEigen
Installing package into ‘C:/Users/myusername/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.3/RcppEigen_0.3.3.3.0.zip'
Content type 'application/zip' length 2666941 bytes (2.5 MB)
downloaded 2.5 MB

package ‘RcppEigen’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\myusername\AppData\Local\Temp\RtmpOq9K4Q\downloaded_packages
"C:/PROGRA~1/R/R-33~1.2/bin/x64/R" --no-site-file --no-environ --no-save --no-restore  \
  --quiet CMD INSTALL  \
  "C:/Users/myusername/AppData/Local/Temp/RtmpOq9K4Q/devtools81c709f4230/nolanlab-Rclusterpp-740cb0b"  \
  --library="C:/Users/myusername/Documents/R/win-library/3.3" --install-tests 

* installing *source* package 'Rclusterpp' ...
** libs
c:/Rtools/mingw_64/bin/g++  -I"C:/PROGRA~1/R/R-33~1.2/include" -DNDEBUG -Wall -I../inst/include/ -fopenmp   -I"C:/Users/myusername/Documents/R/win-library/3.3/Rcpp/include" -I"C:/Users/myusername/Documents/R/win-library/3.3/RcppEigen/include" -I"d:/Compiler/gcc-4.9.3/local330/include"     -O2 -Wall  -mtune=core2 -c hclust.cpp -o hclust.o
c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o Rclusterpp.dll tmp.def hclust.o -fopenmp -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.2/bin/x64 -lR
installing to C:/Users/myusername/Documents/R/win-library/3.3/Rclusterpp/libs/x64
** R
** inst
** tests
** preparing package for lazy loading
Warning: package 'Rcpp' was built under R version 3.3.3
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Warning: package 'Rcpp' was built under R version 3.3.3
* DONE (Rclusterpp)
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
rbruggner commented 7 years ago

Since it seems to be failing on RcppEigen, have you tried installing RcppEigen from source?

install.packages(c("RcppEigen"),type="source")

bc2zb commented 7 years ago

Usually when I get these types of errors it's because my c++ compiler is out of sync with my R install. Have you recently updated R or c++?