[Xapian-discuss] Revision 13824 compilation failure

Olly Betts olly at survex.com
Thu Jan 14 11:29:42 GMT 2010


On Thu, Jan 14, 2010 at 10:19:52AM +0200, henka at cityweb.co.za wrote:
> Thanks, don't know what I was thinking.  I think at some point in the past
> I incorrectly latched onto that flag to suppress warnings-as-errors.

--enable-maintainer-mode enables -Werror if you're using a recent GCC
version.  The aim is that people doing development will fix warnings
as they go, rather than committing code which generates them without
realising.  Once a file has been compiled you won't see the warning
unless you modify it, so it's easy to overlook them if they aren't
promoted to errors during development.  And it's usually less work
to fix things while the code is still fresh in your mind.

> Anyway, now using CXXFLAGS=-W on configure to suppress -Werror.

I'm surprised that works - I'd expect you would need to use:

./configure CXXFLAGS='-g -O2 -Wno-error'

Or alternatively you can override when you run make:

make CXXFLAGS='-g -O2 -Wno-error'

Oh, unless the warning is one which only gets reported if optimisation is
on - your approach disables optimisation so will disable such warnings.

What's the warning?  It may be something worth fixing.

Currently the only bogus warnings I'm aware of from GCC >= 4.0 are with
Apple's customised GCC 4.0, because of which the latest trunk only enable
-Werror for GCC >= 4.1.

Cheers,
    Olly



More information about the Xapian-discuss mailing list