disabling -Werror on a autotools based build

Richard W.M. Jones rjones at redhat.com
Mon Mar 28 07:41:23 UTC 2011


On Sun, Mar 27, 2011 at 02:54:56PM -0300, Sergio Belkin wrote:
> 2011/3/27 Ralf Corsepius <rc040203 at freenet.de>:
> > On 03/27/2011 11:22 AM, giallu at gmail.com wrote:
> >> I'm trying to rebuild a package with an autotools based toolchain and
> >> it's failing because they use -Werror and gcc 4.6 spits out few new
> >> warnings on the code.
> >
> > Packages adding -Werror by themselves are poorly designed.
> >
> 
> Just to learn: Ralf, Why do you say that? :-)

Because it's an invitation for the package build to fail, often for
fairly spurious reasons.  eg. There was a bug that I found in gcc 4.6
(now fixed) which caused any program that used glibc + -O3 + strcmp to
give a warning, which would cause it to fail to compile with -Werror.

However developers themselves should definitely be using compiler
warnings and fixing them.

In libguestfs we have some pretty complex autotools magic to deal with
all this:

http://git.annexia.org/?p=libguestfs.git;a=blob;f=configure.ac;h=f1b56d2dbe9a118901f7426bcc176f624d841f63;hb=HEAD#l67

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


More information about the devel mailing list