From a07d0c7d345f87bab16f3fcffb05d53a93bd6b91 Mon Sep 17 00:00:00 2001 From: Gabor Berkes Date: Tue, 10 Dec 2024 21:40:09 +0000 Subject: [PATCH] Fix missing libpcre2 dependency on macOS GitHub runner Identified an issue where the macOS GitHub runner no longer includes the libpcre2 library by default. Updated the workflow configuration to explicitly add libpcre2 as a dependency, ensuring successful builds and compatibility with the updated build system. This change prevents build failures on macOS environments and aligns the runner's setup with project requirements. --- .github/workflows/ci.yml | 1 + build/pcre2.m4 | 35 +++++++++++++++++++++-------------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 65984320..06bbe07f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,6 +105,7 @@ jobs: geoip \ ssdeep \ pcre \ + pcre2 \ bison \ flex - uses: actions/checkout@v4 diff --git a/build/pcre2.m4 b/build/pcre2.m4 index bd28c7df..dde0bca9 100644 --- a/build/pcre2.m4 +++ b/build/pcre2.m4 @@ -29,10 +29,12 @@ if test "x${with_pcre2}" == "xno"; then AC_MSG_NOTICE([Support for PCRE2 was disabled by the utilization of --without-pcre2 or --with-pcre2=no]) PCRE2_DISABLED=yes else - if test "x${with_pcre2}" == "xyes"; then - PCRE2_MANDATORY=yes - AC_MSG_NOTICE([PCRE2 support was marked as mandatory by the utilization of --with-pcre2=yes]) - fi + # pcre2 is the default + PCRE2_MANDATORY=yes +# if test "x${with_pcre2}" == "xyes"; then +# PCRE2_MANDATORY=yes +# AC_MSG_NOTICE([PCRE2 support was marked as mandatory by the utilization of --with-pcre2=yes]) +# fi # for x in ${PCRE2_POSSIBLE_LIB_NAMES}; do # CHECK_FOR_PCRE2_AT(${x}) # if test -n "${PCRE2_VERSION}"; then @@ -91,16 +93,21 @@ if test -z "${PCRE2_LDADD}"; then PCRE2_FOUND=-1 fi else - PCRE2_FOUND=1 - AC_MSG_NOTICE([using PCRE2 v${PCRE2_VERSION}]) - PCRE2_CFLAGS="${PCRE2_CFLAGS}" - PCRE2_DISPLAY="${PCRE2_LDADD}, ${PCRE2_CFLAGS}" - AC_SUBST(PCRE2_VERSION) - AC_SUBST(PCRE2_LDADD) - AC_SUBST(PCRE2_LIBS) - AC_SUBST(PCRE2_LDFLAGS) - AC_SUBST(PCRE2_CFLAGS) - AC_SUBST(PCRE2_DISPLAY) + if test -z "${PCRE2_MANDATORY}"; then + PCRE2_FOUND=2 + AC_MSG_NOTICE([PCRE2 is disabled by default.]) + else + PCRE2_FOUND=1 + AC_MSG_NOTICE([using PCRE2 v${PCRE2_VERSION}]) + PCRE2_CFLAGS="${PCRE2_CFLAGS}" + PCRE2_DISPLAY="${PCRE2_LDADD}, ${PCRE2_CFLAGS}" + AC_SUBST(PCRE2_VERSION) + AC_SUBST(PCRE2_LDADD) + AC_SUBST(PCRE2_LIBS) + AC_SUBST(PCRE2_LDFLAGS) + AC_SUBST(PCRE2_CFLAGS) + AC_SUBST(PCRE2_DISPLAY) + fi fi