Kirill Müller
2016-Nov-12 13:23 UTC
[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
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 >
Dirk Eddelbuettel
2016-Nov-12 13:59 UTC
[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
On 12 November 2016 at 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]. Good to know it works. I am still a little puzzled why it was needed when it doesn't seem to be needed on the Debian side. Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Dirk Eddelbuettel
2016-Nov-12 17:38 UTC
[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
On 12 November 2016 at 07:59, Dirk Eddelbuettel wrote: | | On 12 November 2016 at 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]. | | Good to know it works. | | I am still a little puzzled why it was needed when it doesn't seem to be | needed on the Debian side. I just upgraded an old (unused, underpowered) box to 16.10 as a first test. No issues so far, and basic cppFunction("...") tests with Rcpp work. Could you get us a minimal reproducible example of what broke without the explicit -std=c++98 ? Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Kirill Müller
2017-Feb-01 09:21 UTC
[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
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 > R-SIG-Debian at r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-debian