Re: [R-pkg-devel] How ton print in the console from Rcpp

2022-11-14 Thread Elysée Aristide
Hello,

I was convinced that the issue is local. The warning message only appears
on MAC.
I did not try with another computer. I used CRAN macbuilder service and got
the warning message. I guess this is also the computer CRAN uses.

Best regards,

Aristide Elysée HOUNDETOUNGAN
*Assistant Professor of Economics*
*Website: *www.ahoundetoungan.com




On Mon, Nov 14, 2022 at 4:09 PM Dirk Eddelbuettel  wrote:

>
> Ivan,
>
> Thanks for following-up but I think this issue is local to the OP as R is
> already setup exactly that way to skip `assert()` in builds (in perfect
> congruence with the CRAN Repository Policy)
>
>   edd@rob:~$ grep NDEBUG /etc/R/Makeconf
>   R_XTRA_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG
>   ALL_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG $(PKG_CPPFLAGS)
> $(CLINK_CPPFLAGS) $(CPPFLAGS)
>   edd@rob:~$
>
> Armadillo (upstream) is very widely used, RcppArmadillo is now used by over
> 1000 packages and had (by partial counts from the subset of CRAN mirrors
> offering logs) over 25 million downloads. I would be rather surprised if
> there were a systemic issue we have not seen. So per Occam's Razor, I would
> look under a different street light.
>
> Best, Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] How ton print in the console from Rcpp

2022-11-14 Thread Dirk Eddelbuettel


Ivan,

Thanks for following-up but I think this issue is local to the OP as R is
already setup exactly that way to skip `assert()` in builds (in perfect
congruence with the CRAN Repository Policy)

  edd@rob:~$ grep NDEBUG /etc/R/Makeconf 
  R_XTRA_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG
  ALL_CPPFLAGS =  -I"$(R_INCLUDE_DIR)" -DNDEBUG $(PKG_CPPFLAGS) 
$(CLINK_CPPFLAGS) $(CPPFLAGS) 
  edd@rob:~$ 

Armadillo (upstream) is very widely used, RcppArmadillo is now used by over
1000 packages and had (by partial counts from the subset of CRAN mirrors
offering logs) over 25 million downloads. I would be rather surprised if
there were a systemic issue we have not seen. So per Occam's Razor, I would
look under a different street light.

Best, Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] How ton print in the console from Rcpp

2022-11-14 Thread Ivan Krylov
В Sun, 13 Nov 2022 11:29:21 +
Elysée Aristide  пишет:

> The only difference I saw is that all those packages put
> 
> #define NDEBUG
> 
> after #include .
> I did the same thing without understanding :)

Glad you got it working! If you're curious why it helped, see
.

I wouldn't have guessed this to be the problem, because I "knew" that R
CMD INSTALL defines NDEBUG during compilation in order to prevent
assert() from crashing the process. Indeed, it's easy to verify that
RcppArmadillo removes the NDEBUG preprocessor symbol:

https://github.com/RcppCore/RcppArmadillo/search?q=NDEBUG=code

Seeing the search results, I can't help but wonder whether Armadillo
still makes any decisions based on this preprocessor definition,
though. Is the whole of Armadillo included as part of the package?
Shouldn't there be other mentions of NDEBUG besides the "#undef NDEBUG"
and the package changelog?

I don't see NDEBUG mentioned in the Armadillo source repo, either:
https://gitlab.com/search?search=NDEBUG_source=navbar_id=6604173_code=true_ref=11.4.x

Could the #undef NDEBUG line be safely removed now without affecting
the debugging tests performed by Armadillo?

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel