[sword-devel] Use of -Werror (was: Re: Is --enable-debug what I want? )
Jonathan Marsden
jmarsden at fastmail.fm
Sat May 16 16:08:26 MST 2009
Troy A. Griffitts wrote:
> Yes, --enable-debug is what you want. New in 1.6.x, this flag turns on
> -Werror which means that warnings should be treated as errors.
>
> You can either fix the warnings, or turn off -Werror (should be easy to
> find in configure.ac)
Indeed. Somewhat confusingly, the usrinst.sh script (which defines what
a "normal" default production build is, basically) also has
--enable-debug turned on... so normal builds are debug builds? Should
we actually be building SWORD packages with --enable-debug turned on by
default?
To my mind, the underlying unanswered question is why -Werror is
associated with debugging now? (And, did manage to I miss the
discussion about it on this list when it was added?).
My instinct is that either the codebase can be compiled with -Wall
-Werror, or else it cannot. If it can, then IMO those flags can and
should be the default (so they catch any issues introduced by future
changes, patches etc.). If it can't... then adding them only when
debugging is likely to be unhelpful :)
Can you provide the answer to: *why* does --enable-debug change the
build-time definition of what is considered an error? Further, is
making a change like that for debugging (only) actually useful, and if
so, how?
> Oddly, I build with debug turned on all using Jaunty and don't get this
> warning. Maybe it's only on 32-bit systems?
If you already have a modern 64bit (amd64) machine to work on, then I'd
suggest it makes good sense to test build in a 32bit chroot or virtual
machine fairly often, so that errors caused by different word length are
spotted quickly. (But see below).
I'll try a build of SWORD 1.6.0 with --enable-debug in a Jaunty 32bit
(x86) VM here... hmmm, it works fine for me! However, uncommenting the
--enable-debug in debian/rules gets me FTBFS, on 32bit and 64bit Jaunty.
Dmitrij: This looks more and more like a packaging bug of some sort?
Jonathan
More information about the sword-devel
mailing list