Re: [gentoo-dev] -Werror unwanted?

2012-05-15 Thread Tony Chainsaw Vroon
On 14/05/12 16:44, hasufell wrote:
 However, I don't see references to ebuild policy (in devmanual or
 howtos) how to handle Werror.

As can be judged by the title of my patches on the subject, I consider
-Werror to be short-sighted at best and idiotic at worst. The next GCC
version, which will add *loads* of warnings to anything that compiled
cleanly before, is going to kill you.
Remove it from the build system. It is one of those patches that will
probably live downstream until the end of time, but that is acceptable.

Regards,
Tony V.



Re: [gentoo-dev] -Werror unwanted?

2012-05-15 Thread Kacper Kowalik
On 15.05.2012 13:29, Tony Chainsaw Vroon wrote:
 On 14/05/12 16:44, hasufell wrote:
 However, I don't see references to ebuild policy (in devmanual or
 howtos) how to handle Werror.
 
 As can be judged by the title of my patches on the subject, I consider
 -Werror to be short-sighted at best and idiotic at worst. The next GCC
 version, which will add *loads* of warnings to anything that compiled
 cleanly before, is going to kill you.
 Remove it from the build system. It is one of those patches that will
 probably live downstream until the end of time, but that is acceptable.

That's why IMHO the best way to fix those bugs is to make -Werror
optional. It the hardest path, but both upstream and downstream should
be satisfied.
Cheers,
Kacper



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] -Werror unwanted?

2012-05-15 Thread Mike Frysinger
On Tuesday 15 May 2012 07:29:36 Tony Chainsaw Vroon wrote:
 On 14/05/12 16:44, hasufell wrote:
  However, I don't see references to ebuild policy (in devmanual or
  howtos) how to handle Werror.
 
 As can be judged by the title of my patches on the subject, I consider
 -Werror to be short-sighted at best and idiotic at worst. The next GCC
 version, which will add *loads* of warnings to anything that compiled
 cleanly before, is going to kill you.

to clarify, having -Werror in upstream packages and getting enabled by default 
when doing development is not short-sighted or idiotic at all, but in fact 
makes a lot of sense for a lot of setups.  shipping it enabled by default in a 
release could be considered those things though.

a good compromise is what toolchain (and a few other) packages do: provide a 
configure flag like --disable-werror.
-mike


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] -Werror unwanted?

2012-05-14 Thread hasufell
https://bugs.gentoo.org/show_bug.cgi?id=260867

However, I don't see references to ebuild policy (in devmanual or
howtos) how to handle Werror.

Is there a common opinion on that. And shouldn't we add that to the
documentation then?



Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Chí-Thanh Christopher Nguyễn
hasufell schrieb:
 https://bugs.gentoo.org/show_bug.cgi?id=260867

 However, I don't see references to ebuild policy (in devmanual or
 howtos) how to handle Werror.

 Is there a common opinion on that. And shouldn't we add that to the
 documentation then?


-Werror is basically saying that it is not safe to ship code which
produces warnings.

I personally think that if an upstream says that no warnings must be
produced by the code, and a developer should look at them before
declaring any warnings safe, then that is best followed.

However this causes a heavy maintenance burden and will frequently break
compilation, so the majority opinion is to remove -Werror from compiler
flags.


Best regards,
Chí-Thanh Christopher Nguyễn




Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Mike Frysinger
On Monday 14 May 2012 11:44:17 hasufell wrote:
 https://bugs.gentoo.org/show_bug.cgi?id=260867
 
 However, I don't see references to ebuild policy (in devmanual or
 howtos) how to handle Werror.
 
 Is there a common opinion on that. And shouldn't we add that to the
 documentation then?

the common opinion is that no package in the tree should ever allow upstream 
to add -Werror to the build
-mike


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Alexandre Rostovtsev
On Mon, 2012-05-14 at 17:44 +0200, hasufell wrote:
 https://bugs.gentoo.org/show_bug.cgi?id=260867
 
 However, I don't see references to ebuild policy (in devmanual or
 howtos) how to handle Werror.
 
 Is there a common opinion on that. And shouldn't we add that to the
 documentation then?

-Werror is unwanted in anything that links to glib, gtk+, or other gnome
libraries. This is because gnome upstream developers have been adding
compiler warnings for usage of deprecated API which, despite being
deprecated, will in all likelihood remain supported for years; -Werror
turns those warnings into fatal build errors, and tracking down all
instances of deprecated API use twice a year (after a new version of
gnome is released) increases maintenance burden for little benefit.

-Alexandre.




Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread hasufell
On 05/14/2012 06:13 PM, Alexandre Rostovtsev wrote:
 On Mon, 2012-05-14 at 17:44 +0200, hasufell wrote:
 https://bugs.gentoo.org/show_bug.cgi?id=260867

 However, I don't see references to ebuild policy (in devmanual or
 howtos) how to handle Werror.

 Is there a common opinion on that. And shouldn't we add that to the
 documentation then?
 
 -Werror is unwanted in anything that links to glib, gtk+, or other gnome
 libraries. This is because gnome upstream developers have been adding
 compiler warnings for usage of deprecated API which, despite being
 deprecated, will in all likelihood remain supported for years; -Werror
 turns those warnings into fatal build errors, and tracking down all
 instances of deprecated API use twice a year (after a new version of
 gnome is released) increases maintenance burden for little benefit.
 
 -Alexandre.
 
 

So, I will file a documentation bug unless someone can point me in the
right direction. I didn't find a reference to that issue.



Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Jeroen Roovers
On Mon, 14 May 2012 18:01:22 +0200
Chí-Thanh Christopher Nguyễn chith...@gentoo.org wrote:

 -Werror is basically saying that it is not safe to ship code which
 produces warnings.

An upstream demanding -Werror should work means upstream would need to
test rather a lot more than their own favourite
distro/architecture/library versions/kernel/userland, which isn't
going to happen.

 I personally think that if an upstream says that no warnings must be
 produced by the code, and a developer should look at them before
 declaring any warnings safe, then that is best followed.

Upstream does not need to take into account warnings produced by
compilers for lesser known architectures, as explained above.

As an upstream development aid to check code that has just been added
or changed, -Werror is fine, but not in the wild jungle that is Gentoo.
You might as well just look at the warnings themselves instead of
breaking the build system by making them fatal. In other words, for
upstream development it's convenient, but never for our users out there.

Also, bug reports based on *FLAGS=-Werror will be closed as INVALID.
(Perhaps we should document that too.)


 jer



Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Michał Górny
On Mon, 14 May 2012 17:44:17 +0200
hasufell hasuf...@gentoo.org wrote:

 https://bugs.gentoo.org/show_bug.cgi?id=260867
 
 However, I don't see references to ebuild policy (in devmanual or
 howtos) how to handle Werror.
 
 Is there a common opinion on that. And shouldn't we add that to the
 documentation then?

Upstream which enforces a particular warning flags on users is a dumb
upstream. Necessary warning flags should be set locally by devs /
distro maintainers rather than through autoconf. If they can't handle
that, someone should probably be replaced.

-- 
Best regards,
Michał Górny


signature.asc
Description: PGP signature


Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Pacho Ramos
El lun, 14-05-2012 a las 20:24 +0200, Jeroen Roovers escribió:
 On Mon, 14 May 2012 18:01:22 +0200
 Chí-Thanh Christopher Nguyễn chith...@gentoo.org wrote:
 
  -Werror is basically saying that it is not safe to ship code which
  produces warnings.
 
 An upstream demanding -Werror should work means upstream would need to
 test rather a lot more than their own favourite
 distro/architecture/library versions/kernel/userland, which isn't
 going to happen.
 
  I personally think that if an upstream says that no warnings must be
  produced by the code, and a developer should look at them before
  declaring any warnings safe, then that is best followed.
 
 Upstream does not need to take into account warnings produced by
 compilers for lesser known architectures, as explained above.
 
 As an upstream development aid to check code that has just been added
 or changed, -Werror is fine, but not in the wild jungle that is Gentoo.
 You might as well just look at the warnings themselves instead of
 breaking the build system by making them fatal. In other words, for
 upstream development it's convenient, but never for our users out there.
 
 Also, bug reports based on *FLAGS=-Werror will be closed as INVALID.
 (Perhaps we should document that too.)
 
 
  jer
 
 

I fully agree with Jeroen on this, -Werror problems should be reported
directly to upstream if people want to help them on fixing warnings.


signature.asc
Description: This is a digitally signed message part


Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Markos Chandras
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 05/14/2012 06:03 PM, hasufell wrote:
 On 05/14/2012 06:13 PM, Alexandre Rostovtsev wrote:
 On Mon, 2012-05-14 at 17:44 +0200, hasufell wrote:
 https://bugs.gentoo.org/show_bug.cgi?id=260867
 
 However, I don't see references to ebuild policy (in devmanual
 or howtos) how to handle Werror.
 
 Is there a common opinion on that. And shouldn't we add that to
 the documentation then?
 
 -Werror is unwanted in anything that links to glib, gtk+, or
 other gnome libraries. This is because gnome upstream developers
 have been adding compiler warnings for usage of deprecated API
 which, despite being deprecated, will in all likelihood remain
 supported for years; -Werror turns those warnings into fatal
 build errors, and tracking down all instances of deprecated API
 use twice a year (after a new version of gnome is released)
 increases maintenance burden for little benefit.
 
 -Alexandre.
 
 
 
 So, I will file a documentation bug unless someone can point me in
 the right direction. I didn't find a reference to that issue.
 

Open a bug, write a devmanual patch and I will be happy to apply it

- -- 
Regards,
Markos Chandras / Gentoo Linux Developer / Key ID: B4AFF2C2
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)

iQIcBAEBCgAGBQJPsVXFAAoJEPqDWhW0r/LCu6wQAL4PnIdPbockkXyrQY0srnWw
Y+3bPlaLJgMecHFwiLzA6LNzk6Tc69JmPio0kGvGKxgL+lfsdhwq3FPqqq8X92lU
Ao+gIdxr4ALGZNS4b5bJAdgQHSNo8NndezBaNFjXzKAr5fzI449/6oFQwucDFA/a
c2smuoKfK690RP4dLjoB0uXvFmTyCRHpUK8mikaXxnMnQlQ0DpkzuVAWJHaR7u1e
XuuMMHlaaQ/EJMt1p1VXfvkekTHQ60R0U/CuDNc5CjjAQRJpqIao7quwZAg0OMeY
ty56OC5hu/AdqAngnEY3wUAt/iho6yDCUhKM0Z4lEHVgsJWDmZuMF3yidZTbXIP1
7Zg73zqHRfYUJLMqyWiXy7+32gTTlIjZGivbWK6KH0QB55pdKindWmsUcQfiblTD
yhfOhTur6w89GH7uepB+jMPY5VRk55z3qQ1wVUe1b+rCRrgDeGAe+AIh6TWOxsrE
EeuRSe9CWFR85sCFlACevTRNnZ40Nfms/Cr48eDzNNbS7Ldfmb231DHB90m1MWMT
/nHRKjwYmspEnE4e3qwjSgTHvJufkm0A08cEWgUBBXxjaepsRgKfXSIrJBVHqL7T
xJPKzN9zm8K3nEnQC9bXfcm4XwoerUDbSPLeIUzHTPURJHO5b1hQkhCPfwrhA9b8
Kt5bsmo1KEmD9sGBzREr
=471E
-END PGP SIGNATURE-



Re: [gentoo-dev] -Werror unwanted?

2012-05-14 Thread Chí-Thanh Christopher Nguyễn
Jeroen Roovers schrieb:
 -Werror is basically saying that it is not safe to ship code which
 produces warnings.
 
 An upstream demanding -Werror should work means upstream would need to
 test rather a lot more than their own favourite
 distro/architecture/library versions/kernel/userland, which isn't
 going to happen.

No. -Werror just means that if a warning is encountered, the user should
be prevented from installing the software. Then a developer looks at the
issue and determines whether it is safe to ignore or needs to be addressed.

 I personally think that if an upstream says that no warnings must be
 produced by the code, and a developer should look at them before
 declaring any warnings safe, then that is best followed.
 
 Upstream does not need to take into account warnings produced by
 compilers for lesser known architectures, as explained above.

These warnings could be harmless or introduce silent breakage. The user
often can't tell.

 As an upstream development aid to check code that has just been added
 or changed, -Werror is fine, but not in the wild jungle that is Gentoo.
 You might as well just look at the warnings themselves instead of
 breaking the build system by making them fatal. In other words, for
 upstream development it's convenient, but never for our users out there.

-Werror is not convenient for anybody. When the developer has looked at
the issue, then the particular warning could be made non-fatal. hasufell
mentioned in another post the GTK+ deprecated warnings.

Note that I don't propose the current policy to be changed. I can
totally live with filtering -Werror in order to reduce maintenance work,
at the small cost mentioned above.


Best regards,
Chí-Thanh Christopher Nguyễn