Repository navigation
ENT-14716: Added PCRE2 declarations check to configure.ac - #300
Open
aleksandrychev wants to merge 1 commit into
Open
aleksandrychev wants to merge 1 commit into
aleksandrychev wants to merge 1 commit into
Conversation
larsewi
previously approved these changes
Nov 4, 2026
larsewi
left a comment
Contributor
There was a problem hiding this comment.
If you know which feature was missing, then that would be a better check to do for autoconf. E.g., AC_CHECK_FUNCS
libutils/buffer.c uses PCRE2_SUBSTITUTE_MATCHED and PCRE2_SUBSTITUTE_LITERAL (PCRE2 10.34+). configure only checked that PCRE2 exists, so with an older PCRE2 (RHEL 8 ships 10.32) the build failed later in buffer.c. Added AC_CHECK_DECLS for both so configure fails early. Ticket: ENT-14716 Changelog: none Signed-off-by: Ihor Aleksandrychiev <ihor.aleksandrychiev@northern.tech>
aleksandrychev
force-pushed
the
ENT-14716_pcre2_min_version
branch
from
November 4, 2026 17:50
9bf32cf to
29af16a
Compare
craigcomstock
requested changes
Nov 4, 2026
| )] | ||
| ) | ||
| dnl libutils/buffer.c uses these substitute options (PCRE2 10.34+). | ||
| dnl core's ci/dependencies.sh reads this line to check the system PCRE2 has them. |
Contributor
There was a problem hiding this comment.
maybe remove mention of core
| dnl libutils/buffer.c uses these substitute options (PCRE2 10.34+). | ||
| dnl core's ci/dependencies.sh reads this line to check the system PCRE2 has them. | ||
| AC_CHECK_DECLS([PCRE2_SUBSTITUTE_MATCHED, PCRE2_SUBSTITUTE_LITERAL], [], | ||
| [AC_MSG_ERROR(This release of CFEngine requires PCRE2 with PCRE2_SUBSTITUTE_MATCHED and PCRE2_SUBSTITUTE_LITERAL (10.34+))], |
Contributor
There was a problem hiding this comment.
this is just libntech, so change "this release of CFEngine" to just "libntech".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket: ENT-14716
Merge together:
#300
cfengine/core#6472
libutils/buffer.cusesPCRE2_SUBSTITUTE_MATCHEDandPCRE2_SUBSTITUTE_LITERAL, which were added in PCRE2 10.34. libntech's configure only checked that PCRE2 exists, so with an older PCRE2 (RHEL 8 ships 10.32) it passed and the build failed later:Change: next to the existing PCRE2 checks, configure now runs
AC_CHECK_DECLS([PCRE2_SUBSTITUTE_MATCHED, PCRE2_SUBSTITUTE_LITERAL], ...)and fails early if either is missing. They are macros, not functions, so it usesAC_CHECK_DECLSrather thanAC_CHECK_FUNCS, as libntech already does forSSL_CTX_clear_options:core's
ci/dependencies.sh(cfengine/core#6472) reads the declaration list from thisAC_CHECK_DECLSline. It uses the list to decide whether the system PCRE2 is good enough or whether to build a newer one, following this review comment: "If libntech needs a particular version of pcre2 then libntech should specify that and we should use that specification here."Testing (Rocky Linux 8 container, system PCRE2 10.32):
ci/install.sh(with ENT-14716: Fixed building core from source on RHEL 8 and 9 in ci scripts cfengine/core#6472) builds PCRE2 10.49 into/opt/pcre2; both checks printyesand the build completescfengine/core#6472 depends on this change.
🤖 Generated with Claude Code