[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:35:47 CET 2011
On 22 February 2011 at 18:56, Simon Urbanek wrote:
|
| On Feb 22, 2011, at 6:28 PM, Dirk Eddelbuettel wrote:
|
| >
| > Ken,
| >
| > Could you test the 0.9.1 tarball? Then in
| > inst/unitTests/runit.Module.client.package.R, apply the diff below:
| >
| > -- ie add the new .badOSX function (maybe I'll rename it 'oldOSX')
| >
|
| You have a typo in the call (.basOSX vs .badOSX)
Yes, just corrected thanks to Baptiste.
| and you got the test all wrong -- you're testing for anything but Darwin
Ooops. Now corrected too.
| and you have the versions wrong (only major matters and "bad" is anything below 10).
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?
Dirk
|
| Cheers,
| S
|
|
| > -- change the test to add a && ! .badOSX()
| >
| > so that the test that barfs under g++ 4.2.1 is not getting run.
| >
| > If that passes everything, yet failed before, we would have ourselves a new
| > version which may things better.
| >
| > Dirk
| >
| >
| > Index: runit.Module.client.package.R
| > ===================================================================
| > --- runit.Module.client.package.R (revision 2902)
| > +++ runit.Module.client.package.R (working copy)
| > @@ -22,8 +22,18 @@
| > gc()
| > }
| >
| > -if( Rcpp:::capabilities()[["Rcpp modules"]] ) {
| > +.badOSX <- function() { # the unit test in this file fails on OS X 10.5
| > + val <- FALSE # assume we are not on an old OS X
| > + if (Sys.info()['sysname'] != "Darwin") { # if on Darwin, let's test
| > + vertxt <- Sys.info()['release'] # 10.5.0 or 10.6.0 or ....
| > + osx <- as.numeric(strsplit(vertxt, "\\.")[[1]])
| > + val <- osx[1] == 10 && osx[2] <= 5 # 10 and le 5 will mark as bad
| > + }
| > + val
| > +}
| >
| > +if( Rcpp:::capabilities()[["Rcpp modules"]] && ! .basOSX() ) {
| > +
| > test.Module.package <- function( ){
| >
| > td <- tempfile()
| >
| > On 22 February 2011 at 16:58, Ken.Williams at thomsonreuters.com wrote:
| > |
| > |
| > |
| > |
| > | On 2/22/11 4:54 PM, "Dirk Eddelbuettel" <edd at debian.org> wrote:
| > |
| > | >What is in Sys.info(), particularly fields 1 and 2:
| > | >
| > | >R> Sys.info()[1:2]
| > | > sysname release
| > | > "Linux" "2.6.32-25-generic"
| > |
| > | That's probably the right way to do it, as Simon suggested too in the
| > | meantime.
| > |
| > | > Sys.info()[1:2]
| > | sysname release
| > | "Darwin" "10.6.0"
| > |
| > |
| > |
| > |
| > |
| > | >
| > | >
| > | >Else, .Platform() starts with 'Darwin', right?
| > |
| > | Nope:
| > |
| > | > .Platform[1]
| > | $OS.type
| > | [1] "unix"
| > |
| > |
| > |
| > | --
| > | Ken Williams
| > | Senior Research Scientist
| > | Thomson Reuters
| > | http://labs.thomsonreuters.com
| > |
| > |
| >
| > --
| > Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
| >
| >
|
--
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
More information about the Rcpp-devel
mailing list