Skip to content

Install Rcpp 0.12.12 from Source R 3.5.1 #915

@adamrobinson361

Description

@adamrobinson361

I am trying to install Rcpp 0.12.12 from source using the devtools::install_version on R 3.5.1 on Windows as follows:

devtools::install_version('Rcpp', '0.12.12')

This is resulting in the following error:

Downloading package from url: https://cran.rstudio.com//src/contrib/Archive/Rcpp/Rcpp_0.12.12.tar.gz
Installing Rcpp
"C:/PROGRA~1/R/R-35~1.1/bin/x64/R" --no-site-file --no-environ --no-save  \
  --no-restore --quiet CMD INSTALL  \
  "C:/Users/adamrobinson361/AppData/Local/Temp/RtmpMdPYR8/devtools424ceb379d/Rcpp"  \
  --library="C:/Program Files/R/R-3.5.1/library" --install-tests 

* installing *source* package 'Rcpp' ...
** package 'Rcpp' successfully unpacked and MD5 sums checked
Warning in as.POSIXlt.POSIXct(x, tz) :
  unable to identify current timezone 'C':
please set environment variable 'TZ'
** libs

*** arch - i386
c:/Rtools/mingw32/bin/g++  -I"C:/PROGRA~1/R/R-35~1.1/include" -DNDEBUG -I../inst/include/         -O2 -Wall  -mtune=generic -c Date.cpp -o Date.o
In file included from ../inst/include/RcppCommon.h:67,
                 from ../inst/include/Rcpp.h:27,
                 from Date.cpp:31:
../inst/include/Rcpp/sprintf.h: In function 'std::__cxx11::string Rcpp::sprintf(const char*, ...)':
../inst/include/Rcpp/sprintf.h:30:12: warning: unnecessary parentheses in declaration of 'ap' [-Wparentheses]
     va_list(ap);
            ^
In file included from ../inst/include/Rcpp.h:77,
                 from Date.cpp:31:
../inst/include/Rcpp/Rmath.h: In function 'double R::pythag(double, double)':
../inst/include/Rcpp/Rmath.h:222:57: error: '::Rf_pythag' has not been declared
     inline double pythag(double a, double b) { return ::Rf_pythag(a, b); }
                                                         ^~~~~~~~~
../inst/include/Rcpp/Rmath.h:222:57: note: suggested alternative: 'pythag'
     inline double pythag(double a, double b) { return ::Rf_pythag(a, b); }
                                                         ^~~~~~~~~
                                                         pythag
make: *** [C:/PROGRA~1/R/R-35~1.1/etc/i386/Makeconf:215: Date.o] Error 1
ERROR: compilation failed for package 'Rcpp'
* removing 'C:/Program Files/R/R-3.5.1/library/Rcpp'
In R CMD INSTALL

I understand from #826 that Rf_pythag has since been commented out and having tested with the latest version from cran with install.packages('Rcpp', type = 'source') I no longer have this problem.

Is this a known problem and should I be able to install from source for the specified version?

Session info as follows:

R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
 [1] httr_1.3.1      compiler_3.5.1  R6_2.3.0        tools_3.5.1    
 [5] withr_2.1.2     curl_3.2        yaml_2.1.14     memoise_1.1.0  
 [9] digest_0.6.18   packrat_0.4.8-1 devtools_1.13.6

Thanks for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions