[R-pkg-devel] SystemRequirements and .R/Makevars

Ramon Diaz-Uriarte rdiaz02 at gmail.com
Fri Jun 19 18:44:32 CEST 2015

Dear Martyn,

On Fri, 19-06-2015, at 14:59, Martyn Plummer <plummerm at iarc.fr> wrote:
> Dear Ramon,
> You should be able to work around this by putting the line
> in the package's Makevars file (or Makevars.win for Windows). The idea
> of putting SystemRequirements: C++ in the DESCRIPTION file was to

A question here, though: I thought that by using "SystemRequirements:
C++11" we make it easy for the user to know that (e.g., it is explicitly
shown by both CRAN's and BioConductor's information about a package). But
commenting that out, it is no longer explicit (but then, maybe it is not
that big a deal).

> provide a shortcut for packages that have no Makevars file. From your

Aha, I see. I think I removed the Makevars file after Rcpp 0.11 was

I just added a src/Makevars file, and following Dirk's response I also
added entries in .R/Makevars for


and these, as well as possible entries for


all are now followed.

> description, it sounds like this shortcut has the unintended consequence
> of overriding the user's Makevars file.
> I will look into it, but you can make this task a lot easier by telling
> me which packages using C++11 are affected and give me some examples of
> specific Makevars entries that are ignored.

This is a BioConductor package:
http://www.bioconductor.org/packages/devel/bioc/html/OncoSimulR.html (the
version right now at bioc fails in Windows and Mac but that should be

with github repo here: https://github.com/rdiaz02/OncoSimul

I can of course send you the tar.gz with the latest sources that build OK
with both gcc and clang.

Makevars entries ignored:

things such as:


CXXFLAGS= -g -O3 -Wall -Wextra -pedantic 



> Martyn 
> On Fri, 2015-06-19 at 12:01 +0200, Ramon Diaz-Uriarte wrote:
>> Dear All,
>> Some of my packages use
>> SystemRequirements: C++11
>> in the DESCRIPTION. But then .R/Makevars seems to be ignored (e.g., flags
>> such as -Wall or using clang) in all that concerns C++ (only CXX and
>> CXXFLAGS are ignored, not CC or CFLAGS). So I keep commenting that line for
>> normal development and uncommenting it for final checking before release.
>> I vaguely remember reading somewhere this is the way things work, but this
>> is not what I understand from reading again
>> http://cran.r-project.org/doc/manuals/r-devel/R-exts.html#Using-C_002b_002b11-code.
>> After googling I have not been able to locate anything, and since I guess
>> it is probably common to use both C++11 and a custom .R/Makevars I think
>> something is wrong somewhere in my setup. But I have no idea what. I am
>> using Debian (a mix of testing and unstable), both with stock Debian R and
>> with custom built Rs.
>> Best,
>> R.
> -----------------------------------------------------------------------
> This message and its attachments are strictly confiden...{{dropped:24}}

More information about the R-package-devel mailing list