Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-83

linkage fails when system pcre library is recent

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.1
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Archlinux, develop branch

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            markus makela markus makela
            Reporter:
            yhager Yuval Hager
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration