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?
05-14-2012, 04:10 PM
Mike Frysinger
-Werror unwanted?
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
05-14-2012, 04:13 PM
Alexandre Rostovtsev
-Werror unwanted?
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.
05-14-2012, 05:03 PM
hasufell
-Werror unwanted?
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.
05-14-2012, 06:24 PM
Jeroen Roovers
-Werror unwanted?
On Mon, 14 May 2012 18:01:22 +0200
ChÃ*-Thanh Christopher Nguyá»…n <chithanh@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
05-14-2012, 06:37 PM
Michał Górny
-Werror unwanted?
On Mon, 14 May 2012 17:44:17 +0200
hasufell <hasufell@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
05-14-2012, 06:51 PM
Pacho Ramos
-Werror unwanted?
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 <chithanh@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.
05-14-2012, 06:58 PM
Markos Chandras
-Werror unwanted?
-----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
On 14/05/12 23:42, ChÃ*-Thanh Christopher Nguyá»…n wrote:
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.
You can have breakage without any warnings being emitted, and you can
have warnings that result in no breakage whatsoever.
Furthermore, -Werror on Gentoo makes zero sense; portage will already
produce a QA notice with warnings that have the potential to result in
breakage. -Werror is not needed.
05-15-2012, 11:29 AM
"Tony "Chainsaw" Vroon"
-Werror unwanted?
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.