Thanks for reporting the problem. It looks like we did not sufficiently
test 'grep' on older systems when we made some fixes that anticipate
adding multithreading support. I installed the attached patch to fix the
problem, and this should appear in the next 'grep' release.
From cf59e930a6e1a0a79c2d84f7346476f3851a52df Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 7 Feb 2017 14:53:24 -0800
Subject: [PATCH] Do not assume PCRE 8.20 or later
Problem reported by Zube (Bug#25647)
* NEWS: Document this.
* src/pcresearch.c (struct pcre.com.jit_stack):
Declare only if PCRE_STUDY_JIT_COMPILE.
---
NEWS | 5 +++++
src/pcresearch.c | 5 ++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/NEWS b/NEWS
index 53ba76e..072b1e9 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*-
* Noteworthy changes in release ?.? (????-??-??) [?]
+** Bug fixes
+
+ grep no longer fails to build on PCRE versions before 8.20.
+ [bug introduced in grep 2.28]
+
* Noteworthy changes in release 2.28 (2017-02-06) [stable]
diff --git a/src/pcresearch.c b/src/pcresearch.c
index 703498c..43f91d0 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -42,15 +42,14 @@ struct pcre_comp
pcre_extra *extra;
# if PCRE_STUDY_JIT_COMPILE
- /* Maximum size of the JIT stack. */
+ /* The JIT stack and its maximum size. */
+ pcre_jit_stack *jit_stack;
int jit_stack_size;
# endif
/* Table, indexed by ! (flag & PCRE_NOTBOL), of whether the empty
string matches when that flag is used. */
int empty_match[2];
-
- pcre_jit_stack *jit_stack;
};
--
2.9.3