We have a custom linux environment. The system PCRE was recently updated to 8.42, and mariadb now detects that it has a pcre_stack_guard and tries to use it.
However, when building clients/mysqltest, it fails to link saying:
I have found that changing the order of the pcre and pcreposix libraries will resolve this issue. As pcreposix clearly needs pcre, I think the order specified in client/CMakeLists.txt is wrong. pcreposix should be specified before pcre, so the linker knows to load needed symbols from prce.
(I don't know why this fails with our system libpcre, and doesn't fail when linking against the bundled pcre. If there is another solution for us at the system level, feel free to suggest).