eddelbuettel / bh

R package providing Boost Header files
85 stars 32 forks source link

std::cout in R package BH #22

Closed jkim82133 closed 9 years ago

jkim82133 commented 9 years ago

Hello. This is Jisu KIM, a maintainer of R package TDA (https://cran.r-project.org/web/packages/TDA/index.html)

I used to hold local copy of boost for my R package, but I decided to use R package BH. Then CRAN check started to complain that my package produces '_ZSt4cout', which is from std::cout. (e.g. https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-gcc/TDA-00check.html)

I checked my source code and verified that I commented out all std::cout from my code. I used to comment out all std::cout from boost code as well. I looked at source code of R package BH, and I found out that many std::cout lines are not commented out.

Is there any ways that my R package ignore those std::cout code in your R package BH? Or do you have any plans to comment out std::cout in next version?

Thanks,

Jisu KIM

eddelbuettel commented 9 years ago

We should be able to narrow this down to somewhere in your package / its use of BH.

By way of background:

So can I suggest that you try a minimal usage case, and build it up until you reach the full complexity of your package. Somewhere on the way we will probably find the Boost component tickling this.

Patching BH itself is somewhat out of the question, and as mentioned above, has not been needed.

jkim82133 commented 9 years ago

I will try to analyze my package in detail. Thank you!

Could you point me to the package you mentioned above? I would like to check their source and how they overrided with Rcpp::Rcout.

eddelbuettel commented 9 years ago

It was RcppStreams and this change -- but I consider this to be somewhat specific to the package.

eddelbuettel commented 9 years ago

Also, when I grep for std::cout in your sources I still see some not-commented out uses (though I did only look very briefly and may have missed #define statements around them). But if that is the case, you may want to make sure you take care of those before turning to Boost...

jkim82133 commented 9 years ago

I see. Thanks! I will try to analyze my code more carefully.

eddelbuettel commented 9 years ago

No worries. I will close this now, please do feel free to re-open it when you find something needing a change in BH.