1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

mysqltest crashes on Debian

Debian is apparently offended that pcre2-posix implements POSIX API,
thus it renames all posix-compatible symbols in libpcre2-posix to have the
PCRE2 prefix. But Debian doesn't do anything to pcre2posix.h header,
so any unaware application will get POSIX compatible type names
and function prototypes from pcre2, but actual symbols will come
from libc.

To remedy this enormous incongruity we have to redefine POSIX-compatible
function names in pcre2posix to match Debian's hack.
This commit is contained in:
Sergei Golubchik
2020-01-13 13:08:55 +01:00
parent 1b1bf430b8
commit ff5a528f26
4 changed files with 8 additions and 1 deletions

View File

@@ -61,6 +61,11 @@ MACRO (CHECK_PCRE)
MESSAGE(FATAL_ERROR "system pcre2-8 library is not found or unusable")
ENDIF()
BUNDLE_PCRE2()
ELSE()
CHECK_LIBRARY_EXISTS(pcre2-posix PCRE2regcomp "" NEEDS_PCRE2_DEBIAN_HACK)
IF(NEEDS_PCRE2_DEBIAN_HACK)
SET(PCRE2_DEBIAN_HACK "-Dregcomp=PCRE2regcomp -Dregexec=PCRE2regexec -Dregerror=PCRE2regerror -Dregfree=PCRE2regfree")
ENDIF()
ENDIF()
ENDMACRO()