Re: [Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action
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.o1820 S __ZTI13ParStudentInd ParStudentInd.o1b50 S __ZTS13ParStudentInd ParStudentInd.o17a0 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: 1820 S typeinfo for ParStudentInd ParStudentInd.o: 1b50 S typeinfo name for ParStudentInd ParStudentInd.o: 17a0 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 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 | e...@debian.org > ___ > Rcpp-devel mailing list > Rcpp-devel@lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
Re: [Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action
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 | e...@debian.org ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
[Rcpp-devel] Package does not compile on MAC when running R-CMD-check github action
Hi everyone, I have a problem with the compilation of a package on MacOS when running the R-CDM-check github action. On all other platforms the package compiles, but on MacOS. I get a problem with the shared library on MacOS: OE> Error: package or namespace load failed for ‘finmix’ in dyn.load(file, DLLpath = DLLpath, ...): OE> unable to load shared object '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvmgn/T/RtmpYiig6P/pkg-libc181f84f0aa/finmix/libs/finmix.so': OE> dlopen(/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvmgn/T/RtmpYiig6P/pkg-libc181f84f0aa/finmix/libs/finmix.so, 6): Symbol not found: __ZTT13ParStudentInd OE> Referenced from: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvmgn/T/RtmpYiig6P/pkg-libc181f84f0aa/finmix/libs/finmix.so OE> Expected in: flat namespace OE> in /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvmgn/T/RtmpYiig6P/pkg-libc181f84f0aa/finmix/libs/finmix.so OE> Error: loading failed OE> Execution halted OE> ERROR: loading failed OE> * removing ‘/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvmgn/T/RtmpYiig6P/pkg-libc181f84f0aa/finmix’ Here is the link to the package on github (the documentation branch): https://github.com/simonsays1980/finmix/tree/documentation I suspect that the reason might be somewhere in the Makevars. Has anyone encountered a similar error when running the R-CMD-check github action on his/her package? What might be the reason for this behavior? I am thankful for any hint. Best, Simon ___ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel