[Rcpp-devel] Rcpp installation fails on Cygwin: Rcpp::Timer not supported by your OS.

Dirk Eddelbuettel edd at debian.org
Wed Jul 31 21:04:57 CEST 2013


On 31 July 2013 at 19:29, Enrico Ferrero wrote:
| When trying to install the Rcpp R package from CRAN on Cygwin,
| compilation aborts with the following error:
| Timer.cpp:35:6: error: #error "Rcpp::Timer not supported by your OS."

We tend to have #ifdef statements around (known) platform dependent
pieces. Rcpp::Timer is a relatively new one.

Regarding Cygwin, the "official" position in R circles is that it is not
supported.  Because R does not come 'as a Cygwin build' from CRAN, not too
many people use it. That said, we do try to help provided ...

| Is there anything I can do to get it to install?

... you can help yourself.  I would suspect that you can work out a proper
solution using the standard combination of compiler and os defines.  If so,
please send us a patch.  If the patch does not break anything, we'd be happy
to carry it forward.

Concretely, src/timer.cpp is a pretty short file which starts with

#if defined(_WIN32) 
    #define WIN32_LEAN_AND_MEAN
    #include <windows.h>
#elif defined(__APPLE__)
    #include <mach/mach_time.h>
#elif defined(linux) || defined(__linux) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__)
    #include <time.h>
#elif defined(sun) || defined(__sun) || defined(_AIX)
    #include <sys/time.h>
#else /* Unsupported OS */
    #error "Rcpp::Timer not supported by your OS."
#endif

which shows that your error message 

| g++ -I/usr/lib/R/include -DNDEBUG -I../inst/include/       -ggdb -O2
| -pipe -fdebug-prefix-map=/pub/devel/R/R-3.0.1-1/build=/usr/src/debug/R-3.0.1-1
| -fdebug-prefix-map=/pub/devel/R/R-3.0.1-1/src/R-3.0.1=/usr/src/debug/R-3.0.1-1
|  -c Timer.cpp -o Timer.o
| Timer.cpp:35:6: error: #error "Rcpp::Timer not supported by your OS."
| Timer.cpp:94:6: error: #error "Rcpp::Benchmark::Timer not supported by your OS."

worked as intended -- nobody had yet worked out a supported setting, so by
default we stop.

Hope this helps,  Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com


More information about the Rcpp-devel mailing list