<div dir="ltr">That worked! Thanks Dirk.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 24, 2022 at 1:14 PM Dirk Eddelbuettel <<a href="mailto:edd@debian.org">edd@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
On 24 January 2022 at 12:55, Toby Hocking wrote:<br>
| Hi Rcpp Devs,<br>
| Does anyone know how to fix this warning in a package with LinkingTo:<br>
| RcppArmadillo? My package plotHMM<br>
| <a href="https://www.stats.ox.ac.uk/pub/bdr/LTO/plotHMM.out" rel="noreferrer" target="_blank">https://www.stats.ox.ac.uk/pub/bdr/LTO/plotHMM.out</a> got this message on CRAN<br>
<br>
Worth stressing that this happens under link-time optimziation (lto) which I<br>
am not yet that familiar with.<br>
<br>
>From _really briefly_ glancing at your package I see that you include<br>
RcppArmadillo.h in some files (good !) but also include armadillo<br>
directly. It's just a hunch and guess at this point but that may lead to<br>
different 'settings' and #define values. Maybe try using only RcppArmadillo.h ?<br>
<br>
Dirk<br>
<br>
| Additional Checks LTO flavor,<br>
| <a href="https://www.stats.ox.ac.uk/pub/bdr/LTO/README.txt" rel="noreferrer" target="_blank">https://www.stats.ox.ac.uk/pub/bdr/LTO/README.txt</a><br>
| <br>
| g++ -std=gnu++14 -shared -L/usr/local/lib64 -o plotHMM.so<br>
| RcppExports.o backward.o eln.o forward.o interface.o multiply.o<br>
| pairwise.o transition.o viterbi.o<br>
| /data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:84:10:<br>
| warning: type ‘struct opts’ violates the C++ One Definition Rule<br>
| [-Wodr]<br>
| 84 | struct opts<br>
| | ^<br>
| /data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:84:10:<br>
| note: a different type is defined in another translation unit<br>
| 84 | struct opts<br>
| | ^<br>
| /data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:86:17:<br>
| note: the first difference of corresponding definitions is field<br>
| ‘flags’<br>
| 86 | const uword flags;<br>
| | ^<br>
| /data/gannet/ripley/R/test-4.2/RcppArmadillo/include/armadillo_bits/glue_solve_bones.hpp:86:17:<br>
| note: a field of same name but different type is defined in another<br>
| translation unit<br>
| 86 | const uword flags;<br>
| | ^<br>
| _______________________________________________<br>
| Rcpp-devel mailing list<br>
| <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank">Rcpp-devel@lists.r-forge.r-project.org</a><br>
| <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br>
-- <br>
<a href="https://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">https://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a><br>
</blockquote></div>