pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: pkgsrc/devel/cmph



On 10/12/2012 21:10, Aleksej Saushev wrote:
John Marino<netbsd%marino.st@localhost>  writes:

My point is straightforward, "-Werror" is there for reason.
Code is not something god blessed. If some compiler arrives that
provides more checks or performs more aggressive optimizations
and thus breaks traditional semantics code should be adapted.

Then the compiler is broken. Although I will give you some leeway with the C language itself being broken. With your logic, Werror should be on all packages, not ones that the author decided it was necessary.


GCC is notorious for becoming more and more aggressive over time in its
optimizations. If anything is allowed by language standard which has
drifted over time, GCC takes liberty of interpreting it in its own way.
Hopefully it emits a warning when it sees language usage "problematic"
in view of current GCC interpretation of language standard. The latter
may (and often does) differ from the standard applicable to the code.

That's why I insist on either fixing the problem properly, or leaving
"-Werror" alone, or implementing your "fix" as a hack which it is in fact.


This is COMPLETELY unfair. You've put me in a no-win situation. My original fix was to disable the warning that popped it. Oh no, you can't do that! My compiler from 1995 wouldn't like it! So then I disable Werror which A) I was told to do and B) there is a ton of precedent for it including on a similar package and C) people agree its the best of the options. Oh no! You can't do that! Some fantasy case that I can't articulate might blow it up!

The only option you've left is to fix the author's crappy code. That's not what pkgsrc is supposed to do. It's supposed to build packages. If the package has bugs in it, kill the package. I have no patience for a bad product, and I'm expecting the code to be released bug-free and to be future-proof. If that can't be delivered, it's subpar and worthy of getting cut out.


Right.  Once the developer is certain his product is release
quality, he can turn off all the warning switches.   That's why
you have development settings and release settings.  Werror is a
development setting.

How do you know which compiler developer used for his product?

Irrelevant.

What makes you think that it was GCC 4.7?

I don't assume this for old packages.

Contrary to what you think
release version is built with all warnings on. At least, this was the
practice in all companies I worked for until now. You're confusing
warnings with NDEBUG, other definitions that control assertions, and
debug symbols.

No I am not. There are a lot of companies out there. Not all do the right or logical thing.


It may be that some packages I have never used and have never touched
do turn warnings off. In any case that doesn't give you right to disable
measures that protect users from spurious breakage, whether it comes
from compiler, their header files, or other sources.


This is nonsense. Werror is not "protection". If you are relying on this... What you are talking about is logic bugs / runtime errors, and nobody here is checking for those. Unless perhaps you have 3 packages total, don't contribute anywhere else, and have the time to methodically test the package on as many platforms as possible, you're not extensively checking that.


If you want pkgsrc build for your system that uses GCC 4.7, then you're
free to do whatever you mean. Just stop setting mines for others.
Removal of "-Werror" is equivalent to setting a mine, since some compilers,
GCC is the best example, optimize aggressively, and thus any warning counts.
Without "-Werror" a package may build but work incorrectly, and these
problems are frequently very hard to debug.


Then permit the use of Wno-xxxx flags and accept some old gcc's can't cope. Then you can live behind the illusion of protection with Werror.

John



Home | Main Index | Thread Index | Old Index