[Rcpp-devel] Ancient Rcpp for OS X on CRAN [Was: Building/linking trouble with cxxfunction()]
baptiste auguie
baptiste.auguie at googlemail.com
Wed Feb 23 01:08:58 CET 2011
R CMD check now successfully completes on my machine with
.badOSX <- !( Sys.info()['sysname'] == "Darwin" &&
isTRUE(as.integer(gsub("\\..*","",Sys.info()['release'])) < 10L) )
if( Rcpp:::capabilities()[["Rcpp modules"]] && .badOSX ) {
Cheers,
baptiste
On 23 February 2011 00:56, Simon Urbanek <simon.urbanek at r-project.org> 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) and you got the test all wrong -- you're testing for anything but Darwin and you have the versions wrong (only major matters and "bad" is anything below 10). 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 ...
>
> 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
>>
>>
>
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
>
More information about the Rcpp-devel
mailing list