I'm quite happy with -std=c++98 in my /etc/R/Makeconf, but perhaps it's unnecessary.

(My previous message isn't in the mailing list archives. Strange.)


-Kirill


On 12.11.2016 14:23, Kirill Müller wrote:
Thanks. I have now CXX = g++ -std=c++98 in my /etc/R/Makeconf, it's
picked up properly. I can only assume that the last -std= option wins if
more than one are given on the same command line [1].


-Kirill


[1] http://stackoverflow.com/q/40563269/946850



On 12.11.2016 03:01, Dirk Eddelbuettel wrote:
On 11 November 2016 at 23:48, Kirill Müller wrote:
| After upgrading to Ubuntu 16.10, which brings GCC 6, I've noticed that
| packages are compiled in C++14 mode by default. Here's what a g++
| command for compiling one of Rcpp's modules look like on my system:
|
| g++ -I/usr/share/R/include -DNDEBUG -I../inst/include/ -fpic  -g -O2
| -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time
| -D_FORTIFY_SOURCE=2 -g  -c barrier.cpp -o barrier.o
|
| According to GCC news [1], the default is now C++14 if no -std is given.
| R-admin suggests adapting the configuration for GCC 6 [2].
|
| I'm using r-base-core in version 3.3.2-1xenial0 from the Ubuntu repo
| [3]. Please advise.

Hm. We had g++-6.* (which does indeed default to C++14) in Debian unstable
for a while now, without problems.

This issue _may_ be fixable by rebuilding r-base-core, but then it would have
been needed for Debian too. Not sure.

This may be an Ubuntu-lagging-Debian issue because we may be rebuilding more consistently in Debian whereas Ubuntu thinks that R is built with gcc-5 (as
it was) but is now used with gcc-6. Ooops.

You _could_ try idea this by editing /etc/R/Makeconf and inserting the
missing -std=c++-98 for the default CXX builds.

I am still on 16.04 with my machines as I had too much other stuff going on. Please try a test or two at your end and report back. We should be able to
get this squared.

Dirk


_______________________________________________
R-SIG-Debian mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-debian

_______________________________________________
R-SIG-Debian mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-debian

Reply via email to