Dear all, I'm working on a project that links to the BH package (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) Furthermore, these warnings disappear when remove the boost headers and replace the call to boost functions by constants. Looking at the CRAN-check diagnostics of some other packages that link to BH, I do not see similar warnings, so I suppose it is possible to fix this issue. Looking at their source code, it is not clear to me how these authors have managed to do this, but this might be because I'm not that familiar with boost to begin with. Can someone point me to some solution to this problem? Thanks in advance,
Dirk Eddelbuettel
2014-Nov-04 14:42 UTC
[Rd] Linking to the BH package introduces CRAN warnings
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). | | 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) | | | Furthermore, these warnings disappear when remove the boost | headers and replace the call to boost functions by constants. | | Looking at the CRAN-check diagnostics of some other packages that link to | BH, I do not see similar warnings, so I suppose it is possible to fix | this issue. | Looking at their source code, it is not clear to me how these authors have | managed to do this, but this might be because I'm not that familiar with | boost to begin with. Can someone point me to some solution to this problem? Briefly: i) Your subject line is wrong. You do not "link" to BH, you use it to include headers at compile time. That may seem like a small difference, but it is not. You generally want to avoid linking as much as you can, if only for cross-OS portability, ii) This the R-devel list for R question. You have a package question. You are generally advised to contact __the package authors__ and/or the package mailing list. And yes, BH has one in http://lists.r-forge.r-project.org/pipermail/boostheaders-devel/ though I grant you that it is not as well advertised as it should be. I just opened a ticket at https://github.com/eddelbuettel/bh/issues/3 to remind myself to improve that. iii) As for your problem, only you and some careful bisections can help you there as we do not have your sources. I too have packages including BH headers, but they do not pull in abort() or other things the CRAN gatekeepers prohibit us from deploying. Dirk aka your friendly neighborhood BH maintainer -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Apparently Analagous Threads
- a question about sort and BH
- BH correction with p.adjust
- Assertion failure in journal_commit_transaction() at commit.c:535: "buffer_jdirty(bh)"
- Kernel bug in RedHat 7.3 -- Assertion failure in journal_commit_transaction() at commit.c:535: "buffer_jdirty(bh)"
- Re:Kernel bug in RedHat 7.3 -- Assertion failure in journal_commit_transaction() at commit.c:535: "buffer_jdirty(bh)"