Kirill Müller
2016-Nov-11 22:48 UTC
[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
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. Best regards Kirill [1] https://gcc.gnu.org/gcc-6/changes.html [2] https://cran.r-project.org/doc/manuals/r-release/R-admin.html#C_002b_002b-Support [3] http://stat.ethz.ch/CRAN/bin/linux/ubuntu
Dirk Eddelbuettel
2016-Nov-12 02:01 UTC
[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
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 -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
Dirk Eddelbuettel
2016-Nov-12 02:03 UTC
[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
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 -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
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 >
Apparently Analagous Threads
- Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
- Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
- Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
- Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
- Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing