Skip to content

Commit

Permalink
fix(deps): enable JIT support for pcre2 (#12464)
Browse files Browse the repository at this point in the history
PCRE2 requires JIT support to be explicitly enabled during build.
From https://pcre.org/current/doc/html/pcre2jit.html:

"JIT support is an optional feature of PCRE2. The "configure"
option --enable-jit (or equivalent CMake option) must be set when
PCRE2 is built if you want to use JIT."

Without the flag in this commit, Kong logs display several
entries containing failures in `pcre2_jit_compile`, such as

```
2024/01/30 16:25:20 [info] 747309#0: pcre2_jit_compile() failed: -45 in "^\s*HTTP/1\.1\s+", ignored
```

(cherry picked from commit cc25516)
  • Loading branch information
hishamhm authored and github-actions[bot] committed Mar 4, 2024
1 parent e3a89cb commit e74b35c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions build/openresty/pcre/BUILD.pcre.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cmake(
],
cache_entries = {
"CMAKE_C_FLAGS": "${CMAKE_C_FLAGS:-} -fPIC",
"PCRE2_SUPPORT_JIT": "ON", # enable JIT support for pcre2_jit_compile
"PCRE2_BUILD_PCRE2GREP": "OFF", # we don't need the cli binary
"PCRE2_BUILD_TESTS": "OFF", # test doesn't compile on aarch64-linux-gnu (cross)
"CMAKE_INSTALL_LIBDIR": "lib", # force distros that uses lib64 (rhel family) to use lib
Expand Down

0 comments on commit e74b35c

Please sign in to comment.