[Rcpp-devel] Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()]

Dirk Eddelbuettel edd at debian.org
Wed Feb 23 01:52:17 CET 2011


On 22 February 2011 at 19:42, Simon Urbanek wrote:
| > Based on the extensive discussion here it appears that
| > 
| >  10.5.0 fails as evidenced by your setup and confirmation by other
| > 
| >  10.6.0 passes
| > 
| > so I want a test that screams if I 10.5 or lower.  I don't care about major
| > 8, 9, ... 
| > 
| > | Why don't you just use my code ? ;) You can just copy my condition in verbatim just after Rcpp:::capabilities()[["Rcpp modules"]] && - it was designed that way ...
| > 
| > I tested your code on static strings here and I fail to see how it
| > differentiates between 10.5.0 ("bad") and 10.6.0 ("good").
| > 
| > What am I missing here?
| > 
| 
| The e-mailI sent about version numbers ;). OS X 10.5.n results in Sys.info()['release'] == 9.n and OS X 10.6.n in Sys.info()['release'] == 10.n because Sys.info() reports the Darwin version, not OS X version. Ken had 10.6.6 so incidentally that corresponds to Darwin (6+4).6 = 10.6 so the 6 there has nothing to do with the first 6 in 10.6.6  ;). Ah, don't we all love riddles? ;)

Ouch, that is sick.

New version based in part on Baptiste's tests too:

@@ -22,8 +22,14 @@
 	gc()
 }
 
-if( Rcpp:::capabilities()[["Rcpp modules"]] ) {
+## The unit test in this file fails on OS X 10.5.* but pass on 10.6.*
+## Sys.info release comes back with 10.* for the latter but 9.* for the former
+## Thanks to Simon Urbanek and Baptiste Auguie for suggesting and testing this
+.badOSX <- (Sys.info()['sysname'] == "Darwin" &&
+            isTRUE(as.integer(gsub("\\..*","",Sys.info()['release'])) < 10L) )
 
+if( Rcpp:::capabilities()[["Rcpp modules"]] && ! .badOSX ) {
+
 test.Module.package <- function( ){
 
     td <- tempfile()

With a bit of luck I don't have too many typos and condition inversions in
here.

Dirk

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


More information about the Rcpp-devel mailing list