[R-pkg-devel] Compiler optimization flags with R package

Guillaume Chapron carnivorescience at gmail.com
Sat Jun 17 21:32:22 CEST 2017


Hello,

I am trying to debug some C code that is run only through a R package. I debug with lldb but I always get a message telling that the package "was compiled with optimization - stepping may behave oddly; variables may not be available.” And in fact, I cannot evaluate all variables and understand what is wrong. I have created a Makevars file in ~/.R/ that contains C=clang -O0 -g but it does not seem to change much. What should I do to make sure I can evaluate all variables in lldb? I am on a Mac and I wrote C=clang because I read that it produced much better error messages but I am happy to use gcc as well if this can be a solution.

Many thanks

Guillaume


More information about the R-package-devel mailing list