GNU bug report logs -
#79385
build: don't force specific warning options on gnulib code
Previous Next
To reply to this bug, email your comments to 79385 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-grep <at> gnu.org
:
bug#79385
; Package
grep
.
(Wed, 03 Sep 2025 23:26:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Bruno Haible <bruno <at> clisp.org>
:
New bug report received and forwarded. Copy sent to
bug-grep <at> gnu.org
.
(Wed, 03 Sep 2025 23:26:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
On 2020-11-26, gnulib-tests/Makefile.am was modified, so as to append
'-Werror' to the AM_CFLAGS, thus forcing the warning options chosen by
the GNU grep maintainer(s) on the GNU gnulib test code.
Meanwhile, it was mentioned several times on the Gnulib mailing list that
this is unsupported. E.g.
https://lists.gnu.org/archive/html/bug-gnulib/2023-08/msg00145.html
Still, in some circumstances, the current state of grep's
gnulib-tests/Makefile.am forces errors for warnings that the GNU grep
maintainer(s) are picky about and the GNU gnulib maintainers allow.
Please apply this patch, to respect the code ownership of Gnulib.
Thanks.
[0001-build-Respect-gnulib-code-ownership.patch (text/x-patch, attachment)]
Information forwarded
to
bug-grep <at> gnu.org
:
bug#79385
; Package
grep
.
(Thu, 04 Sep 2025 01:02:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 79385 <at> debbugs.gnu.org (full text, mbox):
On 2025-09-03 16:25, Bruno Haible via Bug reports for GNU grep wrote:
> Still, in some circumstances, the current state of grep's
> gnulib-tests/Makefile.am forces errors for warnings
What circumstances are these? For grep we don't recommend
--enable-gcc-warnings unless you know what you're doing.
In the past I've preferred stricter warnings even for Gnulib, to help
maintain the Gnulib stuff that I maintain.
Information forwarded
to
bug-grep <at> gnu.org
:
bug#79385
; Package
grep
.
(Thu, 04 Sep 2025 01:39:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 79385 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert wrote:
> > Still, in some circumstances, the current state of grep's
> > gnulib-tests/Makefile.am forces errors for warnings
>
> What circumstances are these?
As detailed in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00033.html>:
$ ./configure --enable-gcc-warnings
$ make CFLAGS='-g -O2' V=1
> For grep we don't recommend
> --enable-gcc-warnings unless you know what you're doing.
Still, --enable-gcc-warnings is enabled by default, in certain situations,
through grep/configure.ac lines 107..111. I won't argue about that; that's
entirely your choice which GCC warnings to apply to your package.
I won't argue about "make CFLAGS='-g -O2'" either; that's part of the
freedom that a user has when building a package; see also
https://www.gnu.org/software/automake/manual/html_node/User-Variables.html
What I'm opposed to is that these users then get a failing build, with
an "error" claimed by gcc or clang, and report it as a gnulib "bug",
just like it happened two days ago
<https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00018.html>
and numerous times before.
> In the past I've preferred stricter warnings even for Gnulib, to help
> maintain the Gnulib stuff that I maintain.
That's OK because this happens on the bug-gnulib mailing list, and because
you are listening when I happen to say "this warning option is silly, I
don't want to hear about this type of warning in code that I maintain.
Whereas the grep/gnulib-tests/Makefile.am is doing a different thing:
here the grep maintainer chooses warning options for code in gnulib/tests/
(including code that they don't maintain) and adds '-Werror', thereby
triggering "bug" reports to bug-gnulib.
My proposed patch has the purpose to stop this. I respect the warning
options the grep maintainer chooses for code that they maintain; and I
want the grep maintainer to respect the warning options that I choose
for code that I maintain.
Bruno
Information forwarded
to
bug-grep <at> gnu.org
:
bug#79385
; Package
grep
.
(Thu, 04 Sep 2025 01:45:03 GMT)
Full text and
rfc822 format available.
Message #14 received at 79385 <at> debbugs.gnu.org (full text, mbox):
Paul Eggert <eggert <at> cs.ucla.edu> writes:
> On 2025-09-03 16:25, Bruno Haible via Bug reports for GNU grep wrote:
>> Still, in some circumstances, the current state of grep's
>> gnulib-tests/Makefile.am forces errors for warnings
>
> What circumstances are these? For grep we don't recommend
> --enable-gcc-warnings unless you know what you're doing.
>
> In the past I've preferred stricter warnings even for Gnulib, to help
> maintain the Gnulib stuff that I maintain.
If grep is the same as coreutils, then it is --enable-gcc-warnings is
enabled by default when there is a .git subdirectory.
Also, this patch makes things look similar to coreutils:
$ head -n 3 coreutils/gnulib-tests/Makefile.am
AM_CFLAGS = $(GNULIB_TEST_WARN_CFLAGS) $(WERROR_CFLAGS)
include gnulib.mk
Collin
Information forwarded
to
bug-grep <at> gnu.org
:
bug#79385
; Package
grep
.
(Thu, 04 Sep 2025 03:28:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 79385 <at> debbugs.gnu.org (full text, mbox):
On 2025-09-03 18:38, Bruno Haible wrote:
>> What circumstances are these?
> As detailed in
> <https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00033.html>:
>
> $ ./configure --enable-gcc-warnings
> $ make CFLAGS='-g -O2' V=1
But that bug report is about vma-iter, which grep doesn't use.
This bug report was last modified 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.