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

MariaDB does not make full use of pkgconfig

    XMLWordPrintable

Details

    Description

      Hi.

      This problem i had also in previous releases.

      I've installed openssl, pcre2, curl, zlib, ncurses ect. from source.
      My installation structure is "/own/dep/..."

      The .pc-files (PKG-Config) are in /usr/share/pkgconfig and if i test each of them with pkg-config (e.g "pkg-config zlib --libs / --cflags") all is fine.

      For compiling mariadb i set the cmake-options:

      • -DWITH_ZLIB=system
      • -DWITH_LIBFMT=system
      • -DWITH_PCRE=system
      • ...

      but zlib, libfmt, pcre2-8 and ncurses are not found:

      Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
      ...
      CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
        Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
      ...
      CMake Error at cmake/pcre.cmake:84 (MESSAGE):
        system pcre2-8 library is not found or unusable
      

      Why mariadb doesn't find these packages while others like openssl and curl are found?

      The output of pkg-config (libdir | includedir | libs | cflags):

      zlib:
      ====================================

      • /own/dep/zlib/lib
      • /own/dep/zlib/include
      • -L/own/dep/zlib/lib -lz
      • -I/own/dep/zlib/include
        ====================================

      fmt:
      ====================================

      • /own/dep/libfmt/lib
      • /own/dep/libfmt/include
      • -L/own/dep/libfmt/lib -lfmt
      • -I/own/dep/libfmt/include
        ====================================

      ncurses:
      ====================================

      • /own/dep/libncurses/lib
      • /own/dep/libncurses/include/ncurses
      • -L/own/dep/pcre2/lib -lncurses -lpcre2-posix
      • -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/own/dep/libncurses/include/ncurses -I/own/dep/libncurses/include
        ====================================

      libpcre2-8 / libpcre2-posix
      ====================================

      • /own/dep/pcre2/lib
      • /own/dep/pcre2/include
      • -L/own/dep/pcre2/lib -lpcre2-8 / -lpcre2-posix
      • -I/own/dep/pcre2/include
        ====================================

      I know that i can use additional options like -DZLIB_... or -DCURSES_...

      But why, as i said mariadb found openssl and curl with pkg-config but not the others?

      Other programs like nginx and php found all of them!

      Attachments

        1. 1_CMakeCache.txt
          48 kB
          Dimitri
        2. 1_CMakeError.log
          90 kB
          Dimitri
        3. 1_CMakeOutput.log
          302 kB
          Dimitri
        4. 2_CMakeCache.txt
          50 kB
          Dimitri
        5. 2_CMakeError.log
          92 kB
          Dimitri
        6. 2_CMakeOutput.log
          306 kB
          Dimitri
        7. screenshot-1.png
          35 kB
          Vladislav Vaintroub

        Activity

          People

            wlad Vladislav Vaintroub
            JustMe Dimitri
            Votes:
            0 Vote for this issue
            Watchers:
            8 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.