From: "kremenek (Ted Kremenek)" Date: 2013-02-16T05:59:30+09:00 Subject: [ruby-core:52295] [ruby-trunk - Bug #7830] Ruby packages should not build with -Werror when distributed Issue #7830 has been updated by kremenek (Ted Kremenek). kosaki (Motohiro KOSAKI) wrote: > > -Werror-implicit-function-declaration isn't really an issue. It is a standard warning > > with very clear semantics. If Ruby always builds with that warning promoted to an error > > that's not likely to be an issue in practice. > > > > The problem is when a new compiler (gcc, clang, or whatever) comes out with a *new* warning > > that is enabled by default, or changes some existing warning in a way that causes it to > > trigger in a way it did not before. That will cause the build to break with -Werror. > > You don't understand current situation correctly. We didn't and never use -Werror. The problem is, > we used -Werror=shorten-64-to-32 and other some specific -Werror= options and _Apple_ changed the > behavior of -Werror=shorten-64-to-32. > > So, your comment completely make no sense. I was simply responding to the comment regarding -Werror-implicit-function-declaration, which was posted before my comment. My main point was that Ruby building with *any* flag that promotes a warning to an error for source package distribution is a bad idea. No compiler warning should be treated as being stable output between compiler versions and compiler vendors. There are legitimate reasons for this: (1) Between compiler versions, the behavior of a warning may change. There may be a case that warning that was accidentally not being emitted before (a compiler bug) now gets emitted in a new version. Moreover, some new warnings may get added under an existing -W flag because that's where they belong. (2) Different compiler vendors support different warnings, or the same warnings with slightly different behavior. What may warn with one compiler may not with another, etc. For this reason, I believe that Ruby should *not* build with any of the following flags for source package distribution: -Werror -Werror-* -Werror=* Hopefully this comment makes more sense, in the broader context in which it was intended. ---------------------------------------- Bug #7830: Ruby packages should not build with -Werror when distributed https://bugs.ruby-lang.org/issues/7830#change-36327 Author: kremenek (Ted Kremenek) Status: Assigned Priority: Normal Assignee: nagachika (Tomoyuki Chikanaga) Category: Target version: ruby -v: N/A I represent the Clang compiler team at Apple, and I've heard some complaints that Clang does not work well for building Ruby. Clearly we care that Clang can compile the Ruby sources. The complaints seemed to have varied over time, but the most recent one that was reported to me seems captured by the following discussion: https://github.com/plamoni/SiriProxy/issues/436 Here the problem is that a warning is being promoted to an error via -Werror. While -Werror is a great development tool, it is not a great mechanism to enable for distributing packages as sources. Different compilers, and different versions of the same compiler, may issue different warnings, and using -Werror in source packages makes those packages very brittle to new compiler changes. With Xcode releases, we frequently enable new (or existing) warnings by default that have shown to be quite useful to finding problems. Those new warnings typically are great for development, but when coupled with -Werror and packaged sources (that aren't really changing) they can be disastrous. I do not actively build Ruby myself, but I request that Ruby software packages should not be distributed with -Werror enabled. This will greatly help users installing Ruby via homebrew or macports, and this likely will be an issue on other platforms besides OS X as well. -- http://bugs.ruby-lang.org/