Re: Bug#697032: rcpp: FTBFS[kfreebsd]: #error "Rcpp::Timer not supported by your OS."
On 11 January 2013 at 00:31, Guillem Jover wrote:
| On Mon, 2012-12-31 at 17:41:52 +0000, Steven Chamberlain wrote:
| > On 31/12/12 17:06, Dirk Eddelbuettel wrote:
| > > https://r-forge.r-project.org/scm/viewvc.php/pkg/Rcpp/src/Timer.cpp?root=rcpp&r1=4182&r2=4181&pathrev=4182
| > Actually... presence of <time.h> rather depends on the libc, not the kernel?
| > So __GLIBC__ is perhaps more relevant than __FreeBSD_kernel__ in this
| > case - plus it should work for other GNU/k*BSD variants if/when they exist.
| Well, that's still suboptimal, the ideal solution in this kind of
| cases is to test for the feature at build time, which avoids all this
| ifdef whitelists, and subsequent updates.
Agreed in principle. This is however an R package and configure sometimes
gets in the way of multiarch builds (on non-Linux platforms).
Luckily, the Timer class is a pretty optional feature.
| > While here, I think I can explain the build failure on GNU/Hurd. The
| > test for __MACH__ applies to both Apple systems and GNU systems. I
| > suggest using mach/mach_time.h only for __APPLE__, and then adding
| > __GNU__ to the list for time.h
| For Mac OS X I'd test for __APPLE__ && __MACH__, otherwise that could
| trigger on other non Mach-based Apple systems.
Dirk Eddelbuettel | firstname.lastname@example.org | http://dirk.eddelbuettel.com