[Rcpp-devel] Debugging Rcpp for Solaris

Serguei Sokol serguei.sokol at gmail.com
Wed Jan 9 15:35:04 CET 2019


On 09/01/2019 15:03, mike guggis wrote:
> Hello,
> 
> I submitted a package to CRAN that passed all checks in RStudio but 
> failed when it was tested on Solaris (after it was on CRAN). Now I need 
> to correct the error and resubmit to CRAN. I would like to avoid using 
> CRAN as a debugging tool. Is there a way to check packages on Solaris? I 
> am using Windows 10.
> 
> The packages checks are here 
> https://cran.r-project.org/web/checks/check_results_BiProbitPartial.html
> 
> An excerpt of the error is below
> 
> BiProbitPartialMCMC.cpp:424:49: error: call of overloaded ‘log(bool)’ is ambiguous
>           double SupportRatio = log(abs(rhoStar)<1) - log(abs(rho)<1);
>                                                   ^
> 
> There is a similar error for the second log function. It seems I can 
> simply fix it with an if/else statement, but I would like to check it 
> before submitting back to CRAN.
It does not respond to your question about Solaris but I am just curios 
about the logic behind this line of code. Do you really mean to 
calculate a log() of Boolean variable with a result -Inf (for false) and 
0 (for true)? Or is it a typo and you meant (log(abs(rhoStar)) < 1)? 
Then what would be the meaning of a difference between two booleans? Can 
it really be a "SupportRatio" with only three possible values: -1, 0 and 1?

You can just ignore all these questions if you cannot afford spare time.

Best,
Serguei.


More information about the Rcpp-devel mailing list