Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-302

Compilation with -WITH_ZLIB=bundled causes an CMake error (5.7)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Low
    • Resolution: Fixed
    • Affects Version/s: 5.7.x, Not 5.5.x, Not 5.6.x
    • Fix Version/s: 5.7.21-20
    • Component/s: None
    • Labels:
      None

      Description

      Compilation with -WITH_ZLIB=bundled causes the following CMake calls:
      MYSQL_CHECK_ZLIB_WITH_COMPRESS()
      FIND_PACKAGE(ZLIB REQUIRED)
      FIND_PACKAGE(ZLIB REQUIRED)

      1st FIND_PACKAGE is called by libbinlogevents/CMakeLists.txt
      2nd FIND_PACKAGE is called by storage/tokudb/PerconaFT/cmake_modules/TokuFeatureDetection.cmake

      CMake reports an error on the second FIND_PACKAGE(ZLIB REQUIRED).

      The reason is that at the first time find_path used by FIND_PACKAGE(ZLIB REQUIRED) doesn't change ZLIB_INCLUDE_DIR but at the second time find_path uses search cache what changes ZLIB_INCLUDE_DIR to an empty string.

      A proposed solution: We are not sure what FIND_PACKAGE will do in the future so I think that the safest option is not to call FIND_PACKAGE(ZLIB) after MYSQL_CHECK_ZLIB_WITH_COMPRESS at all. Therefore all FIND_PACKAGE(ZLIB) have to be removed or surrounded by if (NOT ZLIB_FOUND).

        Attachments

          Activity

            People

            Assignee:
            przemyslaw.skibinski Przemyslaw Skibinski
            Reporter:
            przemyslaw.skibinski Przemyslaw Skibinski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist