Hi Ivan, Thanks, this is very helpful! You are completely right that I misread the message.
I will try including that header in `cpp11.cpp`. Unfortunately, that’s supposed to be programmatically generated, so I’m not sure what the “right" fix is: most likely there’s some error on my part in how I’ve set up cpp11, but it also seems possible that cpp11 should have detected that that header needs to be included and added it automatically. Best, Hans > Ivan Krylov <ikry...@disroot.org> 於 2024年1月20日 下午3:02 寫道: > > В Sat, 20 Jan 2024 14:38:55 -0500 > Johann Gaebler <m...@jgaeb.com> пишет: > >> The issue is that the compiled libraries are too large. > > Was it in the e-mail? As you quite correctly observed, many other > packages get the NOTE about shared library size. > > It may be not exactly obvious, but the red link saying "LTO" on the > check page that points to > <https://www.stats.ox.ac.uk/pub/bdr/LTO/rar.out> is hiding a more > serious issue: > >> cpp11.cpp:18:13: warning: 'run_testthat_tests' violates the C++ One >> Definition Rule [-Wodr] >> 18 | extern SEXP run_testthat_tests(void *); >> | ^ >> /data/gannet/ripley/R/test-dev/testthat/include/testthat/testthat.h:172:17: >> note: 'run_testthat_tests' was previously declared here >> 172 | extern "C" SEXP run_testthat_tests(SEXP use_xml_sxp) { >> | ^ > > Modern C++ compilers are painfully pedantic about undefined behaviour > and can optimise away large sections of code if they think they have a > proof that your code causes it [*]. If you edit cpp11.cpp to provide the > correct declaration (#include the testthat header if possible), the > error should go away. > > -- > Best regards, > Ivan > > [*] For example, see this issue in R: > https://bugs.r-project.org/show_bug.cgi?id=18430 ______________________________________________ R-package-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-package-devel