rhub icon indicating copy to clipboard operation
rhub copied to clipboard

Windows machines should define CXX14 and CXX14STD

Open DavisVaughan opened this issue 6 years ago • 6 comments

R packages requiring C++14 currently do not pass on rhub, but do pass on win-builder. Even though both use RTools34, on win-builder CXX14 and CXX14STD are defined. That prevents you from getting this error, which you do get on rhub:

C++14 standard requested but CXX14 is not defined

The suggestions from Jeroen is to set the following in ~/.R/Makevars.win (or is it just ~/.R/Makevars? I'm not sure):

  • CXX14 = g++
  • CXX14STD = -std=gnu++1y
  • We are not sure about gnu++1y, which win-builder might be setting to gnu++14 instead, but I think either will work.

See this issue for a little bit more information: https://github.com/r-windows/r-testing/issues/1#issue-379473228

DavisVaughan avatar Jul 17 '19 21:07 DavisVaughan

@jeroen would it make sense to set these by default in the Windows build?

gaborcsardi avatar Jul 17 '19 21:07 gaborcsardi

Yes I think it makes sense to mimic what Cran does. You need the same think for the rstan package.

On Wed, Jul 17, 2019, 23:21 Gábor Csárdi [email protected] wrote:

@jeroen https://github.com/jeroen would it make sense to set these by default in the Windows build?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/r-hub/rhub/issues/292?email_source=notifications&email_token=AABUZ7ZI34BYOR3DAYU6LRDP76EOFA5CNFSM4IEUTG4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2GUBLA#issuecomment-512573612, or mute the thread https://github.com/notifications/unsubscribe-auth/AABUZ7267Q3DKNDCI6GGGYDP76EOFANCNFSM4IEUTG4A .

jeroen avatar Jul 17 '19 21:07 jeroen

@jeroen Sorry, what I mean is to set it up in the Windows installer by default? If windows packages are built by rtools, and rtools supports this, then why not set it in the default Makevars?

gaborcsardi avatar Jul 17 '19 21:07 gaborcsardi

This is up to r-core, not me. But the c++14 support in gcc 4.9.3 is incomplete so that's probably why it isn't advertised. Some things work but some other features do not.

jeroen avatar Jul 18 '19 07:07 jeroen

Please in Linux,how to define CXX14 and CXX14STD

BINBINCC avatar Nov 18 '20 07:11 BINBINCC

Can these set via environment variables?

gaborcsardi avatar Nov 18 '20 08:11 gaborcsardi

This issue is about the previous R-hub system, it does not apply to the new system, so I am closing it now. Please see https://r-hub.github.io/rhub/ for the new system, R-hub v2.

gaborcsardi avatar May 09 '24 12:05 gaborcsardi