cmake test for stacksize >256 fails which prevents e.g. mariadb update Performing C SOURCE FILE Test PCRE_STACK_SIZE_OK failed with the following output: [...] Return value: 1 Source file was: #include <pcre.h> int main() { return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256; }
looks like cmake does not recognize our pcre_stack_guard patch (see https://jira.mariadb.org/browse/MDEV-5620) the cmake test for pcre is as follows: INCLUDE (CheckCSourceRuns) SET(WITH_PCRE "auto" CACHE STRING "Which pcre to use (possible values are 'bundled', 'system', or 'auto')") MACRO (CHECK_PCRE) IF(WITH_PCRE STREQUAL "system" OR WITH_PCRE STREQUAL "auto") CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD) IF(NOT CMAKE_CROSSCOMPILING) SET(CMAKE_REQUIRED_LIBRARIES "pcre") CHECK_C_SOURCE_RUNS(" #include <pcre.h> int main() { return -pcre_exec(NULL, NULL, NULL, -999, -999, 0, NULL, 0) < 256; }" PCRE_STACK_SIZE_OK) SET(CMAKE_REQUIRED_LIBRARIES) ENDIF() ENDIF() IF(NOT HAVE_PCRE_STACK_GUARD OR NOT PCRE_STACK_SIZE_OK OR WITH_PCRE STREQUAL "bundled") IF (WITH_PCRE STREQUAL "system") MESSAGE(FATAL_ERROR "system pcre is not found or unusable") ENDIF() SET(PCRE_INCLUDES ${CMAKE_BINARY_DIR}/pcre ${CMAKE_SOURCE_DIR}/pcre) ADD_SUBDIRECTORY(pcre) ENDIF() ENDMACRO()
Assigning to all packagers collectively, since the registered maintainer for this package is currently unavailable. CC'ing the Perl maintainers, because this library is "Perl-compatible", which might be a reason for one of them to update pcre.
CC: (none) => marja11, perlAssignee: bugsquad => pkg-bugs
Summary: Update pcre => Update pcre (needed for mariadb update)
I had missed that pcre-8.41-2.mga7 was pushed yesterday.... does it fix the problem?
Keywords: (none) => NEEDINFO
Not really. I'm still investigation what is wrong. My latest findings are: CHECK_LIBRARY_EXISTS(pcre pcre_stack_guard "" HAVE_PCRE_STACK_GUARD) produces a file which results in Segmentation fault, since it calls pcre_stack_guard which is null by default. I'm not sure, if this definition/test is faulty, or if this function has to be defined (in the lib?). A stack check which is not implemented is quite useless...
Blocks: (none) => 22078
URL: (none) => https://bugs.exim.org/show_bug.cgi?id=2173
we have an external
CC: (none) => jackal.j
we have an external Bugreport for pcre, since the stacksize is not determined correctly, if the library is compiled with -O2 or higher (which is the default in mga). I suggest to patch pcre and see, if the new version returns a stack size bigger than 4 bytes. (call of pcretest -m -C)
The bug report on jira seems to be pretty old one, and if upstream has accepted it then maybe it is not related to the current issue?
According to the exim link, there seems to be no fix. They are talking about using pcre2 for the next mariadb release.
I've added the patch and it does correct the mentioned behaviour. So, now the stacksize is correct. After pcre rel 3 is built and you've installed it, this should work for mariadb! Closing this one as resolved, see you in the mariadb udpate bug ;-)
Status: NEW => RESOLVEDResolution: (none) => FIXED