MariaDB includes a bundled and patched pcre source tree. When building mariadb, with WITH_PCRE=auto (the default), cmake checks the system pcre for a specific patch (existence of the symbol pcre_stack_guard). If the system pcre has that, mysqld will be dynamically linked to it, and the bundled pcre version will not be used.
For Ubuntu and debian, the system pcre is too old, so the bundled pcre ends up being statically linked to libmysqld.
MaxScale assumes that libmysqld defines the PCRE symbols. Linkage thus fails on missing pcre_* symbols.
Adding -lpcre to the linkage command, or adding pcre to target_link_libraries fixes the issue.
Probably the correct fix would be to test for the existence of pcre_stack_guard in libmysqld or in the system's libpcre, and link appropriately. If this is correct, let me know, I'll work on a patch.