Source: modsecurity
Version: 3.0.8-2
Severity: serious
Tags: ftbfs patch
Justification: FTBFS

Hi,

as you already know, modsecurity FTBFS on almost all archs, except amd64 and 
i386:
It fails to find libpcre2 on those archs.

It seems that the shipped pcre2.m4 is broken: When using pkg-config to locate 
the library,
it uses
  PCRE2_POSSIBLE_LIB_NAMES="pcre2 pcre2-8"
however, the pkg-config name is *lib*pcre2(-8)

On amd64/i386 some fallback mechansism eventually finds the library, this is 
why it works
there. Possibly, on Debian, only pkg-config should be used?

(Another observation: It finds the headers on the broken archs, so it seems it 
does not use
pkg-config for determining the include paths? This seems dangerous, if 
pkg-config is mixed with
some heurisitcs?)

The attached patch makes autoconf happy at least on arm64, likely also on the 
other archs:

Index: modsecurity-3.0.8/build/pcre2.m4
===================================================================
--- modsecurity-3.0.8.orig/build/pcre2.m4
+++ modsecurity-3.0.8/build/pcre2.m4
@@ -4,7 +4,7 @@ dnl CHECK_PCRE2(ACTION-IF-FOUND [, ACTIO
 AC_DEFUN([PROG_PCRE2], [
 
 # Possible names for the pcre2 library/package (pkg-config)
-PCRE2_POSSIBLE_LIB_NAMES="pcre2 pcre2-8"
+PCRE2_POSSIBLE_LIB_NAMES="libpcre2 libpcre2-8"
 
 # Possible extensions for the library
 PCRE2_POSSIBLE_EXTENSIONS="so so0 la sl dll dylib so.0.0.0"

-- 
tobi

Reply via email to