Control: tags -1 patch

On 2016-09-19 17:12:17 +0200, Emilio Pozuelo Monfort wrote:
> On Tue, 19 Jan 2016 16:50:22 -0800 Martin Michlmayr <t...@hpe.com> wrote:
> > This package fails to build with GCC 6.  GCC 6 has not been released
> > yet, but it's expected that GCC 6 will become the default compiler for
> > stretch.
> 
> Any news on this? This is blocking the boost1.58 removal, which in
> turn is blocking the ongoing openmpi transition. I'd appreciate if
> you could take a look at this.

The main difference between GCC 6 and the previous version for C++ is:

  The default mode for C++ is now -std=gnu++14 instead of -std=gnu++98.

(from https://gcc.gnu.org/gcc-6/changes.html), as incompatible changes
have been introduced in the new C++ standard.

This seems to be the cause of the failure here. One simple solution,
IMHO, is to switch back to -std=gnu++98. This is what the attached
patch does. I was not sure where to put -std=gnu++98, but with what
I did, it applies only to GCC, not to clang. So, I suppose that this
is what is expected. On my machine, ceph builds without any error
with this patch, but I have not tested the behavior when installed
(I don't see why there would be any new problem).

I don't think it would be worth to try to make this version C++14
compliant while there is a new version upstream (see the package in
experimental, for instance).

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Index: ceph-0.80.11/src/Makefile-env.am
===================================================================
--- ceph-0.80.11.orig/src/Makefile-env.am
+++ ceph-0.80.11/src/Makefile-env.am
@@ -80,7 +80,7 @@ AM_CXXFLAGS = \
        -Wnon-virtual-dtor \
        -Wno-invalid-offsetof
 if !CLANG
-       AM_CXXFLAGS += -Wstrict-null-sentinel
+       AM_CXXFLAGS += -Wstrict-null-sentinel -std=gnu++98
 endif
 
 # note: this is position dependant, it affects the -l options that

Reply via email to