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.
>From 0b4d199504b9b47ccb3105221b1bb843592c920e Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Thu, 4 Sep 2025 01:09:49 +0200 Subject: [PATCH] build: Respect gnulib code ownership. * gnulib-tests/Makefile.am (AM_CFLAGS): Don't augment after including gnulib.mk. --- gnulib-tests/Makefile.am | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnulib-tests/Makefile.am b/gnulib-tests/Makefile.am index 3085f63..ae4e035 100644 --- a/gnulib-tests/Makefile.am +++ b/gnulib-tests/Makefile.am @@ -1,4 +1,3 @@ -AM_CFLAGS = -include gnulib.mk +AM_CFLAGS = $(GNULIB_TEST_WARN_CFLAGS) $(WERROR_CFLAGS) -AM_CFLAGS += $(GNULIB_TEST_WARN_CFLAGS) $(WERROR_CFLAGS) +include gnulib.mk -- 2.50.1