pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc/devel/cmph



John Marino <netbsd%marino.st@localhost> writes:

> On 10/12/2012 19:59, Aleksej Saushev wrote:
>> John Marino<netbsd%marino.st@localhost>  writes:
>>> Okay, let me get this straight.
>>> This Werror was set FOR YEARS and didn't come up with any
>>> problems on existing compilers.  You seem to be saying that by
>>> turning it off now, suddenly new problems will magically appear
>>> that affects all these GCC 3.0 - 4.4 systems fatally (or
>>> insidiously).
>>
>> Yes, these are new problems, and they must be attributed to compilers.
>> Yes, it is possible for them to affect all systems fatally, even those
>> using older compilers.
>
> I'm am trying to understand your point of view, but I just can't
> buy this.  Code is code, and it's constant.  Any problems it
> has, it always had.  The dynamic component is what Werror
> checks.  It adds more and more checks, so an existing "problem"
> might get revealed years later with a newer compiler.  To call
> some of these problems is a misnomer, they are simply, "Hey,
> something may be amiss which may be caused by a logic bug".
> These are development error warnings, not release warnings.
>
> Something that passed contemporary checks for years is not
> considered broken just because a new compiler generates a "hey
> look at this" warning.  The job to find bugs in the software is
> upstream.  It's not pkgsrc's job to flush them out.  It happens
> as a side effect.

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.

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.

>> "-Werror" didn't appear out of blue, there're reasons why the flag
>> exists at all. Same reasons apply to existence of compiler warnings.
>> It is possible not to include any diagnostics into compiler. I wonder
>> why people care of those pesky warning messages and their clarity at all.
>> Just imagine how life would be easier if all package would build!
>> It doesn't matter that some of them wouldn't run because they can't find
>> needed library or they don't contain all files they need. All of them
>> would build instead!
>
> 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?
What makes you think that it was GCC 4.7? 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.

>>> Are you in favor of grepping all makefiles and patches to see
>>> what packages are removing -Werror and reworking them?  Because
>>> that is the logical conclusion to your stance.
>>
>> Yes, exactly. Packages should build with -Werror set, if they supported it.
>> Those that don't build should be fixed rather than their problems swept
>> under the rug. Removing -Werror may only be a temporary measure, a hack,
>> it is not a solution in any case.
>
> Well, if you feel SO strongly about it, I suppose you can
> disable BUILDLINK_TRANSFORM when it tries to remove -Werror and
> see how many packages break on the next bulkbuild and fix all of
> them.  Likely patches are removing it too, but it all seems like
> a giant waste of time to me.  Others have the exact opposite
> opinion of yours regarding the use of Werror, so how can this be
> reconciled?

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.

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.


-- 
HE CE3OH...



Home | Main Index | Thread Index | Old Index