[R-sig-Debian] Ubuntu 16.10 Yakkety Yak uses GCC 6 but -std=c++98 is missing
George N. White III
gnwiii at gmail.com
Sun Nov 13 14:32:07 CET 2016
On Sat, Nov 12, 2016 at 7:41 PM, Dirk Eddelbuettel <edd at debian.org> wrote:
> On 13 November 2016 at 00:13, Kirill Müller wrote:
> | On 13.11.2016 00:00, Dirk Eddelbuettel wrote:
> | > On 12 November 2016 at 22:54, Kirill Müller wrote:
> | >
> | > [... lots of stuff deleted ...]
> | >
> | > | I noticed this because plogr logging crashed in dplyr (compiled with
> | > | 6) right after upgrading to yakkety; I still had a gcc-5 built
> | > | of Rcpp installed. As soon as I added -std, everything worked as
> | > | No minimal example, sorry. Don't we need "-std=c++98" in Makevars
> | > | anyway, even if it's just to avoid users using C++11 constructs and
> | > | wondering why their packages fail on CRAN?
The fact that many current R installations use gcc-5 may be incentive
enough for packagers to avoid C++11 constructs. In my limited gcc-6
experience, the main issue has been libraries that rely on coding
that were allowed by gcc-5 but are not allowed by gcc-6 defaults
such as "code that tries to check for stream errors by comparing to NULL or
if (file != NULL)
> | >
> | > There is still no minimally preproducible example here; just a (pardon
> | > here) rambling description of a hasty system upgrade.
> | >
> | > It is _somewhat common_ to have to recompile C++ shared objects when
> | > major versions change.
> | >
> | > So I am unsure if we have actually demonstrated a bug here.
> | Don't we need "-std=c++98" for GCC 6 in Makevars anyway, even if it's
> | just to save users from using C++11 constructs and then wondering why
> | their packages fail on CRAN/winbuilder? In my case it also saves me from
> | recompiling "all of CRAN" (at least for now); that's a nice side effect,
> | but the first part also looks important to me.
> It's a fair, and open, question.
> We may, and then we may get away with not rebuilding; or we may not, but
> have to pay by rebuilding all.
> I am somewhat surprised I haven't been asked to rebuild Debian packages.
> There too we do have binary depends on C++ packages from CRAN, ie
> and r-cran-dplyr and whatnot. But then ... then Debian archive managers
> just do 'binary rebuilds' as needed and I may be out of the loop.
Unless intractable problems arise, wider use of gcc-6 outside of LTS
should be encouraged.
> Sorry but I just don't have much better information. There are Debian Wiki
> pages on g++ transitions...
It is worth noting that the macports default is to build R with gcc6, so
is not alone in using gcc-6. If gcc-6 was a disaster, there would be bug
now. This says nothing about package authors using gcc-6 specific code in
work, but one hopes authors will test on LTS releases or at least response
reports from LTS users.
https://cran.r-project.org/bin/linux/ubuntu/README.html says there is
for Yakkety Yak, but the sample sources.list lines lack an entry for
This may result in users mixing gcc-5 R with gcc-6 libraries so needs to be
clarified. Rather the provide a list of similar lines, why not one line:
deb https://<my.favorite.cran.mirror>/bin/linux/ubuntu <release>/
and mention ways to determine the release name. One way is from /etc/apt
which works for derivatives such as Linux MINT. I have seen instances
where a user
tried to use an older R disto in the the hope of avoiding rebuilding
existing libraries, so it
may be worth adding some sanity check to R to warn when R is run under a
that is newer than the build release.
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia
[[alternative HTML version deleted]]
More information about the R-SIG-Debian