Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-17868

mysqltest fails to link with system PCRE libraries

    XMLWordPrintable

Details

    Description

      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:

      [ 95%] Linking CXX executable mysqltest
      /usr/lib/../lib/libpcreposix.a(libpcreposix_la-pcreposix.o): In function `regfre
      e':
      pcreposix.c:(.text+0xf8): undefined reference to `pcre_free'
      /usr/lib/../lib/libpcreposix.a(libpcreposix_la-pcreposix.o): In function `regcom
      p':
      pcreposix.c:(.text+0x1b9): undefined reference to `pcre_compile2'
      pcreposix.c:(.text+0x205): undefined reference to `pcre_fullinfo'
      /usr/lib/../lib/libpcreposix.a(libpcreposix_la-pcreposix.o): In function `regexe
      c':
      pcreposix.c:(.text+0x38a): undefined reference to `pcre_exec'
      collect2: error: ld returned 1 exit status
      

      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).

      Attachments

        Activity

          People

            serg Sergei Golubchik
            cross Chris Ross
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.