[Rd] Linking to the BH package introduces CRAN warnings

Romain François romain at r-enthusiasts.com
Tue Nov 4 22:01:31 CET 2014


> Le 4 nov. 2014 à 21:52, kaveh <vakili.kaveh.email at gmail.com> a écrit :
> 
> 
> Dear Romain, 
> 
> 
> 
> You’re kind of out of luck. These functions are both:
>  - used by the boost headers
>  - forbidden by R, well at least forbidden by CRAN
> 
> 
> Thanks for conforming my earlier fears. Since I only use 
> this header and would like my package to eventually be 
> on CRAN, I was thinking of bypassing BH and just putting 
> these headers in the /inst directory and modifying them 
> to remove the offending calls. I was wondering what your 
> view on this is. Or perhaps there is a simpler alternative?
> 
> Thanks in advance, 

If you go through the hoops of modifying these headers to fulfill R’s requirements, I’m sure it would be of interest to others if you contribute these back to BH. 

The danger obviously is that this gets out of sync with boost, which would create work for merging your changes to new boost files from the future. 

Some parts of boost (e.g. uBlas) have macros to control whether or not std::cerr is used at all. https://github.com/eddelbuettel/bh/blob/cb1427c27dc068c8328fd1d2f4b1b8a8da1957c2/inst/include/boost/numeric/ublas/exception.hpp#L215 <https://github.com/eddelbuettel/bh/blob/cb1427c27dc068c8328fd1d2f4b1b8a8da1957c2/inst/include/boost/numeric/ublas/exception.hpp#L215>

But I don’t think this is of any relevance to the files you want to use. 

Romain

> On 2014-11-04 21:46, Romain François wrote:
>>> Le 4 nov. 2014 à 15:42, Dirk Eddelbuettel <edd at debian.org> <mailto:edd at debian.org> a écrit :
>>> 
>>> 
>>> On 4 November 2014 at 14:37, kaveh wrote:
>>> | Dear all,
>>> | 
>>> | I'm working on a project that links to the BH package
>>> | (http://cran.r-project.org/web/packages/BH/index.html <http://cran.r-project.org/web/packages/BH/index.html>).
>>> | 
>>> | My packages doesn't call entry points which might terminate R nor
>>> | write to stdout/stderr instead of to the console.
>>> | 
>>> | However, it seems some of the codes in the BH package
>>> | might. At any rate, when I include some boost headers such as
>>> | boost/math/distributions/ through BH, I get the following warnings
>>> |   when  submitting to the win-builder page:
>>> | 
>>> | 
>>> |    Found '_ZSt4cerr', possibly from 'std::cerr' (C++)
>>> | 
>>> |    Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
>>> | 
>>> |    Found '_ZSt4cerr', possibly from 'std::cerr' (C++)
>>> | 
>>> |    Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
>> You’re kind of out of luck. These functions are both:
>>  - used by the boost headers
>>  - forbidden by R, well at least forbidden by CRAN
>> 
> 


	[[alternative HTML version deleted]]



More information about the R-devel mailing list