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

TokuDB tries to build on OS X, even when disabled in compile flag

Details

    • 10.1.9-3

    Description

      I compile MariaDB from a shell script that I have written that runs CMake from the command line. I do not use a repository like Homebrew. When compiling 10.1.8 on my OS X 10.11 MacBook Pro, I ran into a couple of issues. The first was easy to sort out and involved patching a CMakesList.txt file so mroonga will compile with clang.

      The other issue was a bit more perplexing. I disable TokuDB in my builds with “-DWITHOUT_TOKUDB_STORAGE_ENGINE=ON”. This does not work 10.1.8 and my builds kept failing during make when the script tried to build TokuDB. I also tried using “-DWITH_TOKUDB_STORAGE_ENGINE=OFF” and “-DWITHOUT_TOKUDB=1” in my script, but make still wanted to build TokuDB. Interestingly, if I used the CMake GUI and un-ticked TokuDB, make was successful.

      Eventually, I compared the CMakeList.txt for TokuDB in 10.1.8 to the one in 10.0.21. I replaced this section from the 10.1.8 TokuDB CMakeList.txt file…

      IF(NOT TOKUDB_OK OR PLUGIN_TOKUDB STREQUAL "NO")
        RETURN()
      ENDIF()

      with this from the 10.0.21 TokuDB CMakeList.txt file:

      IF(NOT TOKUDB_OK OR WITHOUT_TOKUDB OR WITHOUT_TOKUDB_STORAGE_ENGINE)
        RETURN()
      ENDIF()

      Now my code builds without TokuDB.

      It looks like the 10.1.8 change to the TokuDB CMakeList.txt broke the ability to compile on OS X. Or has the syntax changed for disabling TokuDB?

      Attachments

        Activity

          richardhd Richard Dunn created issue -
          richardhd Richard Dunn added a comment -

          Note, I also tried -DPLUGIN_tokudb=NO and that does not work either.

          richardhd Richard Dunn added a comment - Note, I also tried -DPLUGIN_tokudb=NO and that does not work either.
          richardhd Richard Dunn added a comment -

          Okay, it's case-sensitive – -DPLUGIN_TOKUDB=NO does work.

          Having said that, if the default setting is 'DYNAMIC', I would think that TokuDB would be disabled if OS X is detected.

          richardhd Richard Dunn added a comment - Okay, it's case-sensitive – -DPLUGIN_TOKUDB=NO does work. Having said that, if the default setting is 'DYNAMIC', I would think that TokuDB would be disabled if OS X is detected.
          elenst Elena Stepanova made changes -
          Field Original Value New Value
          Status Open [ 1 ] Confirmed [ 10101 ]

          I agree, the whole check looks weird. According to the KB page and final comments in MDEV-6248, DYNAMIC is supposed to mean "compile dynamically, if possible, otherwise not at all".

          Apparently that's not what happens now.

          Our OS X builder successfully skips TokuDB, but that's because it runs cmake 2.8.8, so the very first check fails. However, a newer cmake passes the test and later issues the warning:

          CMake Warning at storage/tokudb/CMakeLists.txt:17 (MESSAGE):
            TokuDB is enabled, but jemalloc is not.  This configuration is not
            supported

          Why not to disable TokuDB at this point, unless it's forced by cmake options?

          elenst Elena Stepanova added a comment - I agree, the whole check looks weird. According to the KB page and final comments in MDEV-6248 , DYNAMIC is supposed to mean "compile dynamically, if possible, otherwise not at all". Apparently that's not what happens now. Our OS X builder successfully skips TokuDB, but that's because it runs cmake 2.8.8, so the very first check fails. However, a newer cmake passes the test and later issues the warning: CMake Warning at storage/tokudb/CMakeLists.txt:17 (MESSAGE): TokuDB is enabled, but jemalloc is not. This configuration is not supported Why not to disable TokuDB at this point, unless it's forced by cmake options?
          elenst Elena Stepanova made changes -
          Component/s Compiling [ 11001 ]
          Component/s Storage Engine - TokuDB [ 10134 ]
          Fix Version/s 10.1 [ 16100 ]
          Assignee Sergei Golubchik [ serg ]
          serg Sergei Golubchik made changes -
          Sprint 10.1.9-3 [ 20 ]
          serg Sergei Golubchik made changes -
          Status Confirmed [ 10101 ] In Progress [ 3 ]
          serg Sergei Golubchik made changes -
          Description I compile MariaDB from a shell script that I have written that runs CMake from the command line. I do not use a repository like Homebrew. When compiling 10.1.8 on my OS X 10.11 MacBook Pro, I ran into a couple of issues. The first was easy to sort out and involved patching a CMakesList.txt file so mroonga will compile with clang.

          The other issue was a bit more perplexing. I disable TokuDB in my builds with “-DWITHOUT_TOKUDB_STORAGE_ENGINE=ON”. This does not work 10.1.8 and my builds kept failing during make when the script tried to build TokuDB. I also tried using “-DWITH_TOKUDB_STORAGE_ENGINE=OFF” and “-DWITHOUT_TOKUDB=1” in my script, but make still wanted to build TokuDB. Interestingly, if I used the CMake GUI and un-ticked TokuDB, make was successful.

          Eventually, I compared the CMakeList.txt for TokuDB in 10.1.8 to the one in 10.0.21. I replaced this section from the 10.1.8 TokuDB CMakeList.txt file…

          IF(NOT TOKUDB_OK OR PLUGIN_TOKUDB STREQUAL "NO")
            RETURN()
          ENDIF()

          with this from the 10.0.21 TokuDB CMakeList.txt file:

          IF(NOT TOKUDB_OK OR WITHOUT_TOKUDB OR WITHOUT_TOKUDB_STORAGE_ENGINE)
            RETURN()
          ENDIF()

          Now my code builds without TokuDB.

          It looks like the 10.1.8 change to the TokuDB CMakeList.txt broke the ability to compile on OS X. Or has the syntax changed for disabling TokuDB?
          I compile MariaDB from a shell script that I have written that runs CMake from the command line. I do not use a repository like Homebrew. When compiling 10.1.8 on my OS X 10.11 MacBook Pro, I ran into a couple of issues. The first was easy to sort out and involved patching a CMakesList.txt file so mroonga will compile with clang.

          The other issue was a bit more perplexing. I disable TokuDB in my builds with “-DWITHOUT_TOKUDB_STORAGE_ENGINE=ON”. This does not work 10.1.8 and my builds kept failing during make when the script tried to build TokuDB. I also tried using “-DWITH_TOKUDB_STORAGE_ENGINE=OFF” and “-DWITHOUT_TOKUDB=1” in my script, but make still wanted to build TokuDB. Interestingly, if I used the CMake GUI and un-ticked TokuDB, make was successful.

          Eventually, I compared the CMakeList.txt for TokuDB in 10.1.8 to the one in 10.0.21. I replaced this section from the 10.1.8 TokuDB CMakeList.txt file…
          {code}
          IF(NOT TOKUDB_OK OR PLUGIN_TOKUDB STREQUAL "NO")
            RETURN()
          ENDIF()
          {code}
          with this from the 10.0.21 TokuDB CMakeList.txt file:
          {code}
          IF(NOT TOKUDB_OK OR WITHOUT_TOKUDB OR WITHOUT_TOKUDB_STORAGE_ENGINE)
            RETURN()
          ENDIF()
          {code}
          Now my code builds without TokuDB.

          It looks like the 10.1.8 change to the TokuDB CMakeList.txt broke the ability to compile on OS X. Or has the syntax changed for disabling TokuDB?
          serg Sergei Golubchik made changes -
          Status In Progress [ 3 ] Stalled [ 10000 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.1.9 [ 20301 ]
          Fix Version/s 10.1 [ 16100 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 72148 ] MariaDB v4 [ 149723 ]

          People

            serg Sergei Golubchik
            richardhd Richard Dunn
            Votes:
            0 Vote for this issue
            Watchers:
            3 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.