public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Packages using -Werror
@ 2013-05-03  4:09 Ryan Hill
  2013-05-03  5:46 ` Peter Stuge
  2013-05-03  8:06 ` Ben de Groot
  0 siblings, 2 replies; 14+ messages in thread
From: Ryan Hill @ 2013-05-03  4:09 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 739 bytes --]

Most of the bugs filed on the gcc 4.8 tracker so far have been caused by
packages being built with -Werror.  I just noticed one package where the
Makefile was being patched to remove -g from CXXFLAGS but -Werror on the same
line was left in.  Just in case people weren't aware, building with -Werror is
a bad idea and against policy*.  If you're fixing one of these bugs by
silencing the warning be sure to remove the flag also.

Thanks!

https://bugs.gentoo.org/show_bug.cgi?id=werror
http://blog.flameeyes.eu/2009/02/future-proof-your-code-dont-use-werror



* said policy might not actually exist in writing outside of the mailing list.
  still a bad idea though.

-- 
gcc-porting
toolchain, wxwidgets
@ gentoo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03  4:09 [gentoo-dev] Packages using -Werror Ryan Hill
@ 2013-05-03  5:46 ` Peter Stuge
  2013-05-03  8:06 ` Ben de Groot
  1 sibling, 0 replies; 14+ messages in thread
From: Peter Stuge @ 2013-05-03  5:46 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 195 bytes --]

Ryan Hill wrote:
> If you're fixing one of these bugs by silencing the warning be sure
> to remove the flag also.

How about sending the fix upstream instead?


Thanks, from an upstream

//Peter

[-- Attachment #2: Type: application/pgp-signature, Size: 190 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03  4:09 [gentoo-dev] Packages using -Werror Ryan Hill
  2013-05-03  5:46 ` Peter Stuge
@ 2013-05-03  8:06 ` Ben de Groot
  2013-05-03  8:36   ` Kacper Kowalik
  2013-05-03 13:46   ` Jeroen Roovers
  1 sibling, 2 replies; 14+ messages in thread
From: Ben de Groot @ 2013-05-03  8:06 UTC (permalink / raw
  To: gentoo-dev

On 3 May 2013 12:09, Ryan Hill <dirtyepic@gentoo.org> wrote:
> Most of the bugs filed on the gcc 4.8 tracker so far have been caused by
> packages being built with -Werror.  I just noticed one package where the
> Makefile was being patched to remove -g from CXXFLAGS but -Werror on the same
> line was left in.  Just in case people weren't aware, building with -Werror is
> a bad idea and against policy*.  If you're fixing one of these bugs by
> silencing the warning be sure to remove the flag also.
>
> Thanks!
>
> https://bugs.gentoo.org/show_bug.cgi?id=werror
> http://blog.flameeyes.eu/2009/02/future-proof-your-code-dont-use-werror
>
>
>
> * said policy might not actually exist in writing outside of the mailing list.
>   still a bad idea though.
>
> --
> gcc-porting
> toolchain, wxwidgets
> @ gentoo.org

If this is a policy, it should be documented in our devmanual.
Personally I've always thought -Werror is a mistake in release code,
but was accepted practice. I've almost never actively removed it from
packages I maintain. That will change now, upon learning of this policy.

--
Cheers,

Ben | yngwin
Gentoo developer
Gentoo Qt project lead, Gentoo Wiki admin


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03  8:06 ` Ben de Groot
@ 2013-05-03  8:36   ` Kacper Kowalik
  2013-05-03  9:50     ` Ben de Groot
  2013-05-03 13:46   ` Jeroen Roovers
  1 sibling, 1 reply; 14+ messages in thread
From: Kacper Kowalik @ 2013-05-03  8:36 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

On 03.05.2013 10:06, Ben de Groot wrote:
> On 3 May 2013 12:09, Ryan Hill <dirtyepic@gentoo.org> wrote:
>> Most of the bugs filed on the gcc 4.8 tracker so far have been caused by
>> packages being built with -Werror.  I just noticed one package where the
>> Makefile was being patched to remove -g from CXXFLAGS but -Werror on the same
>> line was left in.  Just in case people weren't aware, building with -Werror is
>> a bad idea and against policy*.  If you're fixing one of these bugs by
>> silencing the warning be sure to remove the flag also.
>>
>> Thanks!
>>
>> https://bugs.gentoo.org/show_bug.cgi?id=werror
>> http://blog.flameeyes.eu/2009/02/future-proof-your-code-dont-use-werror
>>
>>
>>
>> * said policy might not actually exist in writing outside of the mailing list.
>>   still a bad idea though.
>>
>> --
>> gcc-porting
>> toolchain, wxwidgets
>> @ gentoo.org
> 
> If this is a policy, it should be documented in our devmanual.

It is [1]

Cheers,
Kacper

[1] http://devmanual.gentoo.org/ebuild-writing/common-mistakes/


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03  8:36   ` Kacper Kowalik
@ 2013-05-03  9:50     ` Ben de Groot
  0 siblings, 0 replies; 14+ messages in thread
From: Ben de Groot @ 2013-05-03  9:50 UTC (permalink / raw
  To: gentoo-dev

On 3 May 2013 16:36, Kacper Kowalik <xarthisius@gentoo.org> wrote:
> On 03.05.2013 10:06, Ben de Groot wrote:
>> On 3 May 2013 12:09, Ryan Hill <dirtyepic@gentoo.org> wrote:
>>> Most of the bugs filed on the gcc 4.8 tracker so far have been caused by
>>> packages being built with -Werror.  I just noticed one package where the
>>> Makefile was being patched to remove -g from CXXFLAGS but -Werror on the same
>>> line was left in.  Just in case people weren't aware, building with -Werror is
>>> a bad idea and against policy*.  If you're fixing one of these bugs by
>>> silencing the warning be sure to remove the flag also.
>>>
>>> Thanks!
>>>
>>> https://bugs.gentoo.org/show_bug.cgi?id=werror
>>> http://blog.flameeyes.eu/2009/02/future-proof-your-code-dont-use-werror
>>>
>>>
>>>
>>> * said policy might not actually exist in writing outside of the mailing list.
>>>   still a bad idea though.
>>>
>>> --
>>> gcc-porting
>>> toolchain, wxwidgets
>>> @ gentoo.org
>>
>> If this is a policy, it should be documented in our devmanual.
>
> It is [1]
>
> Cheers,
> Kacper
>
> [1] http://devmanual.gentoo.org/ebuild-writing/common-mistakes/
>

Thanks! We stand corrected.

--
Cheers,

Ben | yngwin
Gentoo developer
Gentoo Qt project lead, Gentoo Wiki admin


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03  8:06 ` Ben de Groot
  2013-05-03  8:36   ` Kacper Kowalik
@ 2013-05-03 13:46   ` Jeroen Roovers
  2013-05-03 13:55     ` Michael Mol
                       ` (2 more replies)
  1 sibling, 3 replies; 14+ messages in thread
From: Jeroen Roovers @ 2013-05-03 13:46 UTC (permalink / raw
  To: gentoo-dev

On Fri, 3 May 2013 16:06:01 +0800
Ben de Groot <yngwin@gentoo.org> wrote:

> Personally I've always thought -Werror is a mistake in release code,
> but was accepted practice. I've almost never actively removed it from
> packages I maintain. That will change now, upon learning of this
> policy.

Debian here and there actively fixes compiler warnings by enabling
-Werror and then checking what fails to build. I even see revision
bumps because of some of the milder compiler warnings. Maybe other
distros do this as well. It's kind of a blunt instrument to perform QA
with, but I guess it does get code cleaned up slightly better than with
no checks at all or by merely depending on runtime failures to be
reported.


     jer


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03 13:46   ` Jeroen Roovers
@ 2013-05-03 13:55     ` Michael Mol
  2013-05-03 14:15     ` hasufell
  2013-05-04  4:46     ` Ryan Hill
  2 siblings, 0 replies; 14+ messages in thread
From: Michael Mol @ 2013-05-03 13:55 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]

On 05/03/2013 09:46 AM, Jeroen Roovers wrote:
> On Fri, 3 May 2013 16:06:01 +0800
> Ben de Groot <yngwin@gentoo.org> wrote:
> 
>> Personally I've always thought -Werror is a mistake in release code,
>> but was accepted practice. I've almost never actively removed it from
>> packages I maintain. That will change now, upon learning of this
>> policy.
> 
> Debian here and there actively fixes compiler warnings by enabling
> -Werror and then checking what fails to build. I even see revision
> bumps because of some of the milder compiler warnings. Maybe other
> distros do this as well. It's kind of a blunt instrument to perform QA
> with, but I guess it does get code cleaned up slightly better than with
> no checks at all or by merely depending on runtime failures to be
> reported.

I'm sure it's intended by upstreams as a blunt QA instrument. I know at
least one project that operates in that way.

For Gentoo, this sounds like something that could be relegated to a
testing stage, but not enabled by default for end users.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03 13:46   ` Jeroen Roovers
  2013-05-03 13:55     ` Michael Mol
@ 2013-05-03 14:15     ` hasufell
  2013-05-03 14:39       ` Rich Freeman
  2013-05-03 14:41       ` Jeroen Roovers
  2013-05-04  4:46     ` Ryan Hill
  2 siblings, 2 replies; 14+ messages in thread
From: hasufell @ 2013-05-03 14:15 UTC (permalink / raw
  To: gentoo-dev

On 05/03/2013 03:46 PM, Jeroen Roovers wrote:
> On Fri, 3 May 2013 16:06:01 +0800
> Ben de Groot <yngwin@gentoo.org> wrote:
> 
>> Personally I've always thought -Werror is a mistake in release code,
>> but was accepted practice. I've almost never actively removed it from
>> packages I maintain. That will change now, upon learning of this
>> policy.
> 
> Debian here and there actively fixes compiler warnings by enabling
> -Werror and then checking what fails to build. I even see revision
> bumps because of some of the milder compiler warnings. Maybe other
> distros do this as well. It's kind of a blunt instrument to perform QA
> with, but I guess it does get code cleaned up slightly better than with
> no checks at all or by merely depending on runtime failures to be
> reported.
> 
> 
>      jer
> 

We don't need that. We already get QA warnings for severe compiler
warnings with a note that it should be reported upstream.

Turning them into errors does not improve anything.


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03 14:15     ` hasufell
@ 2013-05-03 14:39       ` Rich Freeman
  2013-05-03 20:24         ` Tomáš Chvátal
  2013-05-03 14:41       ` Jeroen Roovers
  1 sibling, 1 reply; 14+ messages in thread
From: Rich Freeman @ 2013-05-03 14:39 UTC (permalink / raw
  To: gentoo-dev

On Fri, May 3, 2013 at 10:15 AM, hasufell <hasufell@gentoo.org> wrote:
> We don't need that. We already get QA warnings for severe compiler
> warnings with a note that it should be reported upstream.
>
> Turning them into errors does not improve anything.

Yup - you can't really compare Gentoo build workflows with those for
virtually any binary distro.  On Gentoo building is an operation that
impacts end-users.  On Debian they can run some super-fragile build
system 2000x until they actually manage to get a clean build, and then
they can just package that up and nobody will be the wiser.  On Gentoo
a fragile build system means an endless stream of bugs.

Warnings should not force errors, unless we know they will actually
cause end users problems.

Rich


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03 14:15     ` hasufell
  2013-05-03 14:39       ` Rich Freeman
@ 2013-05-03 14:41       ` Jeroen Roovers
  2013-05-04  4:52         ` [gentoo-dev] " Ryan Hill
  1 sibling, 1 reply; 14+ messages in thread
From: Jeroen Roovers @ 2013-05-03 14:41 UTC (permalink / raw
  To: gentoo-dev

On Fri, 03 May 2013 16:15:35 +0200
hasufell <hasufell@gentoo.org> wrote:

> We don't need that.

I was actually firmly agreeing on that point. The question was where
this was all coming from, and I was pointing out that it's regarded as
inherently good "elsewhere".

> We already get QA warnings for severe compiler
> warnings with a note that it should be reported upstream.

But not all of them.

> Turning them into errors does not improve anything.

Anyone who wants or needs that can add -Werror to C*FLAGS already.


      jer


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Packages using -Werror
  2013-05-03 14:39       ` Rich Freeman
@ 2013-05-03 20:24         ` Tomáš Chvátal
  0 siblings, 0 replies; 14+ messages in thread
From: Tomáš Chvátal @ 2013-05-03 20:24 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

Dne Pá 3. května 2013 10:39:29, Rich Freeman napsal(a):
> On Fri, May 3, 2013 at 10:15 AM, hasufell <hasufell@gentoo.org> wrote:
> > We don't need that. We already get QA warnings for severe compiler
> > warnings with a note that it should be reported upstream.
> > 
> > Turning them into errors does not improve anything.
> 
> Yup - you can't really compare Gentoo build workflows with those for
> virtually any binary distro.  On Gentoo building is an operation that
> impacts end-users.  On Debian they can run some super-fragile build
> system 2000x until they actually manage to get a clean build, and then
> they can just package that up and nobody will be the wiser.  On Gentoo
> a fragile build system means an endless stream of bugs.

Even binary distros don't want the werror.

Trust me on that ;-)

Anyway FWIW, if upstream wants werror in their build and use autotools you can 
grab code that is in libwp* libvisio libcdr and others we use in libreoffice, 
where it is configure switch, you can mess with and having default off or on 
based on prefferences.

Cheers

Tom

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-dev] Re: Packages using -Werror
  2013-05-03 13:46   ` Jeroen Roovers
  2013-05-03 13:55     ` Michael Mol
  2013-05-03 14:15     ` hasufell
@ 2013-05-04  4:46     ` Ryan Hill
  2 siblings, 0 replies; 14+ messages in thread
From: Ryan Hill @ 2013-05-04  4:46 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1088 bytes --]

On Fri, 3 May 2013 15:46:41 +0200
Jeroen Roovers <jer@gentoo.org> wrote:

> On Fri, 3 May 2013 16:06:01 +0800
> Ben de Groot <yngwin@gentoo.org> wrote:
> 
> > Personally I've always thought -Werror is a mistake in release code,
> > but was accepted practice. I've almost never actively removed it from
> > packages I maintain. That will change now, upon learning of this
> > policy.
> 
> Debian here and there actively fixes compiler warnings by enabling
> -Werror and then checking what fails to build. I even see revision
> bumps because of some of the milder compiler warnings. Maybe other
> distros do this as well. It's kind of a blunt instrument to perform QA
> with, but I guess it does get code cleaned up slightly better than with
> no checks at all or by merely depending on runtime failures to be
> reported.

Oh for sure it can be a useful tool for catching stuff, but they're operating
in a controlled environment, with a specific compiler version and build
options.  We don't have that luxury.


-- 
gcc-porting
toolchain, wxwidgets
@ gentoo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [gentoo-dev] Re: Packages using -Werror
  2013-05-03 14:41       ` Jeroen Roovers
@ 2013-05-04  4:52         ` Ryan Hill
  2013-05-04 10:43           ` hasufell
  0 siblings, 1 reply; 14+ messages in thread
From: Ryan Hill @ 2013-05-04  4:52 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

On Fri, 3 May 2013 16:41:33 +0200
Jeroen Roovers <jer@gentoo.org> wrote:

> On Fri, 03 May 2013 16:15:35 +0200
> hasufell <hasufell@gentoo.org> wrote:
 
> > We already get QA warnings for severe compiler
> > warnings with a note that it should be reported upstream.
 
> But not all of them.

I'm not sure what these warnings accomplish really.  They're nice to see if
you're trying to debug something, but in that case you're probably already
looking through the log.  I don't think anyone actually reports them upstream,
and if they do, if upstream actually finds them useful.  I think they're just
noise most of the time (and if I learned anything from the recent thread about
displaying messages only on first install it's that people think we already
output too much noise).  Do others find them useful?


-- 
gcc-porting
toolchain, wxwidgets
@ gentoo.org

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [gentoo-dev] Re: Packages using -Werror
  2013-05-04  4:52         ` [gentoo-dev] " Ryan Hill
@ 2013-05-04 10:43           ` hasufell
  0 siblings, 0 replies; 14+ messages in thread
From: hasufell @ 2013-05-04 10:43 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/04/2013 06:52 AM, Ryan Hill wrote:
> On Fri, 3 May 2013 16:41:33 +0200 Jeroen Roovers <jer@gentoo.org>
> wrote:
> 
>> On Fri, 03 May 2013 16:15:35 +0200 hasufell <hasufell@gentoo.org>
>> wrote:
> 
>>> We already get QA warnings for severe compiler warnings with a
>>> note that it should be reported upstream.
> 
>> But not all of them.
> 
> I'm not sure what these warnings accomplish really.  They're nice
> to see if you're trying to debug something, but in that case you're
> probably already looking through the log.  I don't think anyone
> actually reports them upstream, and if they do, if upstream
> actually finds them useful.  I think they're just noise most of the
> time (and if I learned anything from the recent thread about 
> displaying messages only on first install it's that people think we
> already output too much noise).  Do others find them useful?
> 
> 

I report them for my packages, but often upstream does not care.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJRhOZqAAoJEFpvPKfnPDWziX8IAIUlHotHvIbYnpAImogN3Kdd
f+NJ7xA5f+bFzoSWU5Oan099QNDltSk/a3DJUJp91blUD2l9kEhOTuBACw2WKlYu
Shf4GGGWA7VFj01N6oZkefBRmlZbCHaizSFQKFelnNaJWOCs7hD3dJJZ9hD25Afy
nDM2PLg+M5n0u31AuXTYoVuAB2Af9g6ElV6uTMmAjH+SBKPRBKUENEgUVmHxQBsE
JWgy1T3IjHiOBvXi4PP4WzCMqysLyzEJH0nIju1VeMrWZ2hqXbu6xMhrwgsoylKT
2QvqH6qr106x43dMYZvEpIl3VnIXNgmGyWHTi8J6q8o8XIvpPib6MEhg2S5PGJA=
=i5sL
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-05-04 10:44 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-03  4:09 [gentoo-dev] Packages using -Werror Ryan Hill
2013-05-03  5:46 ` Peter Stuge
2013-05-03  8:06 ` Ben de Groot
2013-05-03  8:36   ` Kacper Kowalik
2013-05-03  9:50     ` Ben de Groot
2013-05-03 13:46   ` Jeroen Roovers
2013-05-03 13:55     ` Michael Mol
2013-05-03 14:15     ` hasufell
2013-05-03 14:39       ` Rich Freeman
2013-05-03 20:24         ` Tomáš Chvátal
2013-05-03 14:41       ` Jeroen Roovers
2013-05-04  4:52         ` [gentoo-dev] " Ryan Hill
2013-05-04 10:43           ` hasufell
2013-05-04  4:46     ` Ryan Hill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox