git master build fail with gcc 4.8

Alexander Bokovoy ab at samba.org
Thu May 2 21:53:15 MDT 2013


On Fri, May 3, 2013 at 2:31 AM, Andrew Bartlett <abartlet at samba.org> wrote:

> On Mon, 2013-04-29 at 16:34 +0200, Aurélien Aptel wrote:
> > Hi all,
> >
> > GCC changed the semantics of some warning flags related to format
> > checking. Because of these changes, python headers now trigger
> > warnings which are treated as errors (-Werror). This prevents the
> > python bindings from compiling:
> >
> > --
> > $ make
> > WAF_MAKE=1 python ./buildtools/bin/waf build
> > Waf: Entering directory `/home/knarf/prog/c/samba/bin'
> >       Selected embedded Heimdal build
> > [ 127/3920] Generating VERSION
> > [ 160/3920] Generating smbd/build_options.c
> > [ 711/3920] Compiling lib/ntdb/pyntdb.c
> > In file included from /usr/include/python2.7/Python.h:126:0,
> >                  from ../lib/ntdb/pyntdb.c:28:
> > /usr/include/python2.7/modsupport.h:27:1: error: ‘PyArg_ParseTuple’ is
> > an unrecognized format function type [-Werror=format=]
> >  PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
> > Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
> >  ^
> > cc1: some warnings being treated as errors
> > Waf: Leaving directory `/home/knarf/prog/c/samba/bin'
> > Build failed:  -> task failed (err #1):
> >       {task: cc pyntdb.c -> pyntdb_129.o}
> > make: *** [all] Error 1
> > --
> >
> > I think the bug has been fixed upstream. (see discussion at [1])
> >
> > In the meantime I would like to either :
> > - compile without -Werror
> > - or disable the python bindings
> > but I'm not familiar enough with the build system to do so.
> >
> > 1: https://bugzilla.redhat.com/show_bug.cgi?id=927358
>
> The bug is a bit hard to parse from the perspective of what is 'wrong'
> with Samba (that is fixed again), but for now, configure without
> --enable-developer and it should be fine.
>

Since this error comes from the system-provided header, one needs to fix
that one
.
In case of Samba we rely on -Werror=format in libldb or otherwise
ldb_search() will be incorrectly identified as wrongly defined by some
compilers.
Not enabling developer build should indeed make build usable from Samba
perspective if Python dev. environment is fixed. Currently there is no way
to disable python bindings because they are used in AD DC build extensively.
-- 
/ Alexander Bokovoy


More information about the samba-technical mailing list