[Rcpp-devel] g++ flags

Martyn Plummer plummerm at iarc.fr
Wed May 7 12:08:54 CEST 2014


On Tue, 2014-05-06 at 22:50 -0700, Kevin Ushey wrote:
> Hi Gabor,
> 
> Looks like it was a bug on our end -- R-exts specifies that USE_CXX1X
> should be set to any value; we try to set it to nothing (ie, define it
> but leave it empty) but apparently that is not accepted.

Yes it is. We use Sys.getenv("USE_CXX1X", NA) to distinguish the case
where USE_CXX1X is set to an empty string (as you did) from the case
where it is unset. So I don't know why this isn't working for you.

The relevant code is src/library/tools/R/install.R.

Martyn

> I just pushed a bug fix to GitHub and it works on my Windows VM; can
> you give it another shot?
> 
> Thanks,
> Kevin
> 
> On Tue, May 6, 2014 at 9:09 PM, Gabor Grothendieck
> <ggrothendieck at gmail.com> wrote:
> > On Windows with R 3.1 I installed the latest Rcpp from github and did
> > the following but the compliation gave an error which was was due to
> > the C++11 constructs.  If I rerun it but uncomment the Sys.setenv line
> > then it works. What do I do to get the cpp11 attribute to work?
> >
> > library(Rcpp)
> > # Sys.setenv("PKG_CXXFLAGS"="-std=c++0x")
> > cat('
> > // [[Rcpp::plugins("cpp11")]]
> > // [[Rcpp::export]]
> > int useCpp11() {
> >     auto x = 10;
> >     return x;
> > }
> > ', file = "testauto.cpp")
> > sourceCpp("testauto.cpp")
> >
> > On Wed, Apr 30, 2014 at 11:12 AM, Dirk Eddelbuettel <edd at debian.org> wrote:
> >>
> >> On 30 April 2014 at 10:05, Dirk Eddelbuettel wrote:
> >> |
> >> | On 30 April 2014 at 10:41, JJ Allaire wrote:
> >> | | I think that might be overkill (or something that we can do later if users ask
> >> | | for it).
> >> |
> >> | It is a one-liner, and it just sits there to be used, like OpenMP plugin.
> >> |
> >> | So in that sense it doesn't hurt, and it may yet help those for which both R
> >> | < 3.1.0 and Windows are true.
> >>
> >> Actually, as Gabor points out, where 'R < 3.1.0' and 'g++ < 4.7' which may
> >> also be a bunch of servers running older RHEL or Ubuntu LTS.
> >>
> >> Dirk
> >>
> >> --
> >> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
> >> _______________________________________________
> >> 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
> >
> >
> >
> > --
> > Statistics & Software Consulting
> > GKX Group, GKX Associates Inc.
> > tel: 1-877-GKX-GROUP
> > email: ggrothendieck at gmail.com
> > _______________________________________________
> > 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
> _______________________________________________
> 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

-----------------------------------------------------------------------
This message and its attachments are strictly confidential. If you are
not the intended recipient of this message, please immediately notify 
the sender and delete it. Since its integrity cannot be guaranteed, 
its content cannot involve the sender's responsibility. Any misuse, 
any disclosure or publication of its content, either whole or partial, 
is prohibited, exception made of formally approved use
-----------------------------------------------------------------------


More information about the Rcpp-devel mailing list