[Bioc-devel] What to do about std::cerr/cout warnings in external libraries?
su.s at wehi.edu.au
Wed Jun 21 03:38:42 CEST 2017
My warning is
checking compiled code ... WARNING
Found ‘___stderrp’, possibly from ‘stderr’ (C)
Objects: ‘bgzf.o’, ‘hts.o’, ‘sam.o’
Found ‘_abort’, possibly from ‘abort’ (C)
Found ‘_exit’, possibly from ‘exit’ (C)
Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor the system RNG.
As far as I can tell my source files are identical to the ones in Rhtslib, how does Rhtslib avoid this warning? I feel safer with one less dependency but I’ll consider linking to Rhtslib, thanks!
On 20 Jun 2017, at 8:03 pm, Vincent Carey <stvjc at channing.harvard.edu<mailto:stvjc at channing.harvard.edu>> wrote:
Have you looked at the Bioconductor package Rhtslib?
Is your package's source visible on github? If so please provide the URL.
If not, please provide more details on the error messages observed.
It would seem to me that the best way to proceed would be to link to Rhtslib.
On Tue, Jun 20, 2017 at 2:29 AM, Shian Su <su.s at wehi.edu.au<mailto:su.s at wehi.edu.au>> wrote:
I am using parts of htslib in a new package. R CMD check gives me warnings about R terminating entry points and such resulting from htslib’s calls. Is there a way to get around this or do I have to go into the source code of htslib and change all their calls.
Also, Hadley’s best practices recommends using “error” instead of “exit” however I am using Rcpp to glue things together which only seems to provide “stop” for this purpose. Can exits be simply swapped out with Rcpp::stop?
Bioc-devel at r-project.org<mailto:Bioc-devel at r-project.org> mailing list
[[alternative HTML version deleted]]
More information about the Bioc-devel