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

linkage fails when system pcre library is recent

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 1.1.1
    • Core
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.