openpharma / mmrm

Mixed Models for Repeated Measures (MMRM) in R.
https://openpharma.github.io/mmrm/
Other
128 stars 22 forks source link

Last steps before CRAN submission #126

Closed danielinteractive closed 2 years ago

danielinteractive commented 2 years ago

To do:

pawelru commented 2 years ago

When running R CMD CHECK on one of our internal systems I got following warning:

* checking whether package ‘mmrm’ can be installed ... WARNING
Found the following significant warnings:
  init.h:11:13: warning: ‘run_testthat_tests’ violates the C++ One Definition Rule  [-Wodr]
See ‘/tmp/ansible._opQOYbuild/install_rpkgs_with_log/buildfiles/check/mmrm.Rcheck/00install.out’ for details.

It might be good to resolve it before CRAN submission

danielinteractive commented 2 years ago

Interesting thanks @pawelru - did not see that yet

danielinteractive commented 2 years ago

@pawelru if you still have it, can you maybe send me the log file (/tmp/ansible._opQOYbuild/install_rpkgs_with_log/buildfiles/check/mmrm.Rcheck/00install.out) ? I am having a hard time to reproduce this :-) thx

pawelru commented 2 years ago

This file is 4k+ lines long but I think it's this part:

init.h:11:13: warning: ‘run_testthat_tests’ violates the C++ One Definition Rule  [-Wodr]
 extern SEXP run_testthat_tests();
             ^
/opt/bee/share/nest-packages/2022_10_13/4.1.1/libs/testthat/include/testthat/testthat.h:165:17: note: type mismatch in parameter 1
 extern "C" SEXP run_testthat_tests(SEXP use_xml_sxp) {
                 ^
/opt/bee/share/nest-packages/2022_10_13/4.1.1/libs/testthat/include/testthat/testthat.h:165:17: note: type ‘struct SEXPREC *’ should match type ‘void’
/opt/bee/share/nest-packages/2022_10_13/4.1.1/libs/testthat/include/testthat/testthat.h:165:17: note: ‘run_testthat_tests’ was previously declared here
/usr/bin/nm: /tmp/ansible.CJ24uwbuild/install_rpkgs_with_log/buildfiles/check/mmrm.Rcheck/00_pkg_src/mmrm/src/mmrm.o: plugin needed to handle lto object
/usr/bin/nm: /tmp/ansible.CJ24uwbuild/install_rpkgs_with_log/buildfiles/check/mmrm.Rcheck/00_pkg_src/mmrm/src/test-runner.o: plugin needed to handle lto object
installing to /tmp/ansible.CJ24uwbuild/install_rpkgs_with_log/buildfiles/check/mmrm.Rcheck/00LOCK-mmrm/00new/mmrm/libs
danielinteractive commented 2 years ago

Thanks Pawel, fortunately on CRAN pretest this did not come up ... I guess because LTO checks were not run. Investigating further now.

danielinteractive commented 2 years ago

I think https://github.com/openpharma/mmrm/pull/139 fixes it