<div dir="ltr">Hi Dirk, Simon, Nik,<div><br></div><div>I found the roots for the failed checks. I used a virtual method and then overloaded it in derived classes. Furthermore I used the inline keyword and that produced some undefined symbols. Now all checks run through on all platforms. </div><div><br></div><div>Thanks again to each one of you for giving me comments that helped me to find out what the problem was. </div><div><br></div><div>Best, Simon</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Mo., 8. Nov. 2021 um 11:36 Uhr schrieb Simon Zehnder <<a href="mailto:simon.zehnder@googlemail.com">simon.zehnder@googlemail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Simon, <div><br></div><div>thank you for bringing this up. As mentioned in the answer to Dirk, I am at this point not anymore that fluent in C++ as I was some years ago. I am looking through the classes and I am not yet sure what to look for. What I see is an error message: </div><div><br></div><div>./PriorStudentInd.h:31:14: warning: 'PriorStudentInd::update' hides overloaded virtual function [-Woverloaded-virtual]<br></div><div><br></div><div>When I look into the <a href="https://github.com/simonsays1980/finmix/blob/documentation/src/ParStudentInd.h" target="_blank">class definition</a> I see: </div><div><br></div><div>#ifndef __FINMIX_PARSTUDENTIND_H__<br>#define __FINMIX_PARSTUDENTIND_H__<br><br>#include "ParStudentFix.h"<br>#include "PriorStudentInd.h"<br><br>class ParStudentInd : virtual public ParStudentFix {<br>public:<br>arma::rowvec weight;<br><br>ParStudentInd (const bool&,<br>               const FinmixModel&);<br>virtual ~ParStudentInd ()<br>{<br>}<br>virtual void update(const PriorStudentInd&);<br>};<br>#endif /* __FINMIX_PARSTUDENTIND_H__ */<br></div><div><br></div><div>Can you give me a hint, what might be the reason here. I have an intuition that it is due to either the "virtual" class inheritance or/and the "virtual" method definition that now includes a different parameter (PriodStudentInd instead of PriorStudentFix). </div><div><br></div><div>Best,</div><div>Simon</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am So., 7. Nov. 2021 um 22:22 Uhr schrieb Simon Urbanek <<a href="mailto:simon.urbanek@r-project.org" target="_blank">simon.urbanek@r-project.org</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Simon,<br>
<br>
this is not a build issue, it breaks on all platforms in clang (tested on macOS and Debian+clang-11). There are tons of warnings in the C++ code (way over 1000 lines!) which lead to an error at link time (most of them are type mismatches leading to overrides of virtual methods). The particular one you see:<br>
<br>
$ for i in `ls *.o`; do nm $i | sed "s:^:$i:" | grep __ZT.13ParStudentInd; done<br>
ParStudentInd.o0000000000001820 S __ZTI13ParStudentInd<br>
ParStudentInd.o0000000000001b50 S __ZTS13ParStudentInd<br>
ParStudentInd.o00000000000017a0 S __ZTV13ParStudentInd<br>
mcmc_student.o                 U __ZTT13ParStudentInd<br>
<br>
So mcmc_student expects a VTT, but there is none defined in the implementation (ParStudentInd). To make it clear pass it thought de-mangler like llvm-cxxfilt:<br>
<br>
ParStudentInd.o: 0000000000001820 S typeinfo for ParStudentInd<br>
ParStudentInd.o: 0000000000001b50 S typeinfo name for ParStudentInd<br>
ParStudentInd.o: 00000000000017a0 S vtable for ParStudentInd<br>
mcmc_student.o:                  U VTT for ParStudentInd<br>
<br>
The above is just one of many link errors (pretty much all classes are mismatched in the mcmc_*.cpp files).<br>
<br>
Cheers,<br>
Simon<br>
<br>
<br>
<br>
> On Nov 8, 2021, at 4:56 AM, Dirk Eddelbuettel <<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>> wrote:<br>
> <br>
> <br>
> Simon,<br>
> <br>
> Your Makevars [1] is very standard so I would suspect it may be the actions<br>
> setup for macOS.  Rcpp is still used by a large number of packages all of<br>
> which appear to build just fine on macOS (as eg evidenced by the CRAN checks)<br>
> if and when everything is setup correctly.<br>
> <br>
> Dirk<br>
> <br>
> [1] <a href="https://github.com/simonsays1980/finmix/blob/documentation/src/Makevars" rel="noreferrer" target="_blank">https://github.com/simonsays1980/finmix/blob/documentation/src/Makevars</a><br>
> <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>
> _______________________________________________<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>
</blockquote></div>
</blockquote></div>