Bug#615157: Using -Werror in CFLAGS for a debian package build

2011-05-17 Thread Matthias Klose

On 05/17/2011 01:31 AM, Wouter Verhelst wrote:
[...]

see
http://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-werror;users=debian-...@lists.debian.org


This package builds with -Werror, and GCC 4.6 triggers new warnings
which will make the package fail to build.  Currently a Debian patch
just passes
-Wno-error=unused-but-set-variable and
-Wno-error=unused-but-set-parameter
to avoid build failures, but this patch will be reverted with the
GCC 4.6.1 release, and the severity of the report will be raised.


The list of packages may contain some false positives.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#615157: Using -Werror in CFLAGS for a debian package build

2011-05-17 Thread Charles Plessy
Le Tue, May 17, 2011 at 01:31:14AM +0200, Wouter Verhelst a écrit :
 
 What I didn't notice immediately was that gcc was emitting some
 warnings, but that the -Werror option was not honored for those
 warnings. Investigating turned up #615157 (Cc'd): the gcc maintainers
 have decided to disable -Werror for some new warnings, because otherwise
 it would cause FTBFS bugs in packages that have -Werror set in their
 debian/rules file.

Dear Wouter and Matthias, and everybody,

while I do not question the choice made for GCC 4.6, I also note that after
forwarding a disabled FTBFS bug upstream, I had within a day an answer that he
could not reproduce the failure in an up-to-date Sid virtual machine.  Of
course he may have read the explanations more carefully, but he has a point:
even after fixing the error that stopped the build, it is not straightforward
to make sure that the successful build will still be successful after the GCC
patch is reverted.

Is there an easy way we can suggest to our upstreams to re-enable the errors ?
That may be useful for them to update their code.

Have a nice day,

-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#615157: Using -Werror in CFLAGS for a debian package build

2011-05-17 Thread Matthias Klose

On 05/17/2011 02:00 PM, Charles Plessy wrote:


Is there an easy way we can suggest to our upstreams to re-enable the errors ?
That may be useful for them to update their code.


- look out for / grep for the warnings
- use gcc-snapshot
- explicitly pass -Werror=unused-but...



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#615157: Using -Werror in CFLAGS for a debian package build

2011-05-16 Thread Wouter Verhelst
Hi -devel,

I was working on nbd-server upstream, and so had ran ./configure with
CFLAGS='-Wall -Werror', which I consider good practice when writing C
code.

What I didn't notice immediately was that gcc was emitting some
warnings, but that the -Werror option was not honored for those
warnings. Investigating turned up #615157 (Cc'd): the gcc maintainers
have decided to disable -Werror for some new warnings, because otherwise
it would cause FTBFS bugs in packages that have -Werror set in their
debian/rules file.

IMHO, this is the wrong way to handle such things.

First and foremost, I do not believe that setting -Werror in a
debian/rules file is the best way to maintain a package; -Werror is a
development option which should not be used in a release build (which a
Debian package is). When a package sets -Werror in its debian/rules
file, it *will* FTBFS when the default compiler is changed, while not
necessarily breaking the package itself. I don't think it adds value.

That's a personal opinion, however, and we don't have a policy on this;
so if a maintainer is willing to deal with the fallout of their packages
failing to build when the default compiler is changed, that should
probably be their problem. So long as they are ready to receive FTBFS
bugs and fix them in a timely manner, oh well. It might still be an
annoyance for a user who wants to build a package on a different
compiler than what happens to be the default one, but it's not a fatal
problem. And I can see how using -Werror *might* increase the quality of
a package; some warnings are emitted on only some architectures, so
having -Werror *could* ensure that architecture-specific bugs are
eliminated before they potentially become a problem. It's not totally
silly, but it still seems a bit excessive.

At any rate, all that is undermined if gcc does not turn all warnings
into errors; if a maintainer uses -Werror in a package, that means they
*want* their package to FTBFS on warnings. Reducing the effect of
-Werror would not seem to help these maintainers; presumably they want
the warnings to be fixed in their source anyway, because eventually this
breakage of -Werror will be reverted, and then their packages will FTBFS
again. And while it's a very bad idea to introduce RC bugs in your
reverse dependencies when we're near or in a freeze, I was under the
impression that we're not currently in such a time, which would suggest
that doing so would be acceptable currently.

Additionally, reducing the effect of -Werror in that manner has an
effect on those who use Debian sid as a development environment; put
otherwise, the Debian default compiler is used for more than just Debian
packages, and I don't think we should be mucking with it in this manner.

Thoughts?

-- 
The volume of a pizza of thickness a and radius z can be described by
the following formula:

pi zz a


signature.asc
Description: Digital signature