Hello,

There is a build error when building from TOT using the currently pinned
commit of gnulib:

gcc -DHAVE_CONFIG_H -DEXEEXT=\"\" -I. -I..  -DIN_GREP_GNULIB_TESTS=1 -I.
-I. -I.. -I./.. -I../lib -I./../lib  -fstrict-flex-arrays -Wall
-Warith-conversion -Wbad-function-cast -Wcast-align=strict -Wdate-time
-Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra
-Wflex-array-member-not-at-end -Wformat-signedness -Wfree-labels
-Winit-self -Winvalid-pch -Wkeyword-macro -Wlogical-op
-Wmissing-include-dirs -Wnested-externs -Wopenmp-simd -Wpacked
-Wpointer-arith -Wshadow -Wstrict-flex-arrays -Wstrict-overflow
-Wsuggest-attribute=malloc -Wsuggest-attribute=noreturn -Wsync-nand
-Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations
-Wvariadic-macros -Wvector-operation-performance -Wwrite-strings
-Warray-bounds=2 -Wattribute-alias=2 -Wbidi-chars=any,ucn
-Wformat-overflow=2 -Wformat=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2
-Wstringop-overflow=4 -Wuse-after-free=3 -Wunused-const-variable=2
-Wvla-larger-than=4031 -Wuseless-cast -Wzero-as-null-pointer-constant
-Wtrailing-whitespace -Wno-missing-field-initializers -Wno-sign-compare
-Wno-unused-parameter -Wno-cast-function-type -Wno-deprecated-declarations
-Wno-logical-op -Wno-format-nonliteral -Wno-return-type -Werror -Wno-error
-Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare
-Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion
-Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits
-Wno-unused-const-variable -Wno-unsuffixed-float-constants -Wno-error
-Wno-cast-qual -Wno-conversion -Wno-float-equal -Wno-sign-compare
-Wno-undef -Wno-unused-function -Wno-unused-parameter -Wno-float-conversion
-Wimplicit-fallthrough -Wno-pedantic -Wno-sign-conversion -Wno-type-limits
-Wno-unused-const-variable -Wno-unsuffixed-float-constants -g -O2 -MT
localename.o -MD -MP -MF $depbase.Tpo -c -o localename.o localename.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from localename.c:34:
../lib/glthread/lock.h:85:11: fatal error: glthread/once.h: No such file or
directory
   85 | # include "glthread/once.h"
      |           ^~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:6560: localename.o] Error 1
make[4]: Leaving directory '/usr/src/grep/gnulib-tests'
make[3]: *** [Makefile:6603: all-recursive] Error 1
make[3]: Leaving directory '/usr/src/grep/gnulib-tests'
make[2]: *** [Makefile:5050: all] Error 2
make[2]: Leaving directory '/usr/src/grep/gnulib-tests'
make[1]: *** [Makefile:2359: all-recursive] Error 1
make[1]: Leaving directory '/usr/src/grep'
make: *** [Makefile:2300: all] Error 2

This only occurs when configuring with --threads=posix.
On 3/31/26 a change was made to glthread/lock.h adding a dependency on
glthread/once.h.
The pinned commit for gnulib is from 5/18/26.

Attached is a patch that fixes the issue.

-Trent Tanchin
--- grep/bootstrap.conf.orig	2026-07-28 23:43:39.369943827 -0400
+++ grep/bootstrap.conf	2026-07-28 23:45:31.574186949 -0400
@@ -198,8 +198,9 @@
   $gnulib_tool --copy-file tests/init.sh
 
   # grep is single-threaded.
-  # Copy lib/glthread/lock.h from Gnulib, sans the lock module.
+  # Copy lib/glthread/lock.h and lib/glthread/once.h from Gnulib, sans the lock module.
   $gnulib_tool --copy-file lib/glthread/lock.h
+  $gnulib_tool --copy-file lib/glthread/once.h
 
   # For an unknown reason the bootstrap script can override Gnulib with
   # files from places like /usr/share/gettext/m4.

Reply via email to