[Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action

Simon Urbanek simon.urbanek at R-project.org
Sun Nov 7 22:22:43 CET 2021


Simon,

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:

$ for i in `ls *.o`; do nm $i | sed "s:^:$i:" | grep __ZT.13ParStudentInd; done
ParStudentInd.o0000000000001820 S __ZTI13ParStudentInd
ParStudentInd.o0000000000001b50 S __ZTS13ParStudentInd
ParStudentInd.o00000000000017a0 S __ZTV13ParStudentInd
mcmc_student.o                 U __ZTT13ParStudentInd

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:

ParStudentInd.o: 0000000000001820 S typeinfo for ParStudentInd
ParStudentInd.o: 0000000000001b50 S typeinfo name for ParStudentInd
ParStudentInd.o: 00000000000017a0 S vtable for ParStudentInd
mcmc_student.o:                  U VTT for ParStudentInd

The above is just one of many link errors (pretty much all classes are mismatched in the mcmc_*.cpp files).

Cheers,
Simon



> On Nov 8, 2021, at 4:56 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
> 
> 
> Simon,
> 
> Your Makevars [1] is very standard so I would suspect it may be the actions
> setup for macOS.  Rcpp is still used by a large number of packages all of
> which appear to build just fine on macOS (as eg evidenced by the CRAN checks)
> if and when everything is setup correctly.
> 
> Dirk
> 
> [1] https://github.com/simonsays1980/finmix/blob/documentation/src/Makevars
> 
> -- 
> https://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
> _______________________________________________
> Rcpp-devel mailing list
> Rcpp-devel at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel



More information about the Rcpp-devel mailing list