[Rcpp-devel] ___assert_rtn warning with package check

Jason Serviss jason.serviss at ki.se
Wed Jun 13 13:05:10 CEST 2018

Hello everyone,

I am currently in the process of trying to utilise C++ via Rcpp, RcppEigen, and RcppArmadillo in a package for the first time. I am experiencing the following on running devtools::check() with the package:

checking compiled code ... WARNING
File ‘check/libs/check.so’:
  Found ‘___assert_rtn’, possibly from ‘assert’ (C)
    Object: ‘RcppExports.o’

I found a similar problem previously discussed (here: http://rcpp-devel.r-forge.r-project.narkive.com/yc1h8bf6/rcppeigen-package-skeleton-r-cmd-check-warning) some time ago although, in this case, it seemed to be system specific. Based on the comments, I created a minimal reproducible example (here: https://github.com/jasonserviss/check) and automated the build with TravisCI (build report here: https://travis-ci.org/jasonserviss/check/builds/391685256).

I have noticed two things:

1) there are 2 functions in the package, function “a" and function “b”, if I remove function “b” I no longer receive the warning. Despite this, there wouldn’t, to my eyes, seem to be anything extremely unusual about function “b”.

2) If I remove RcppArmadillo from the LinkingTo section in the DESCRIPTION file I, again, no longer receive the warning. I am aware of the fact that, in the example, there is no need to link to RcppArmadillo although, in the real use case, there is.

Id be very appreciative if anyone here could help me get an understanding for this warning and how it can be resolved!

Kind Regards,
Jason Serviss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20180613/a1c5cd92/attachment.html>

More information about the Rcpp-devel mailing list