[MDEV-8962] TokuDB tries to build on OS X, even when disabled in compile flag Created: 2015-10-18  Updated: 2015-11-16  Resolved: 2015-11-16

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Storage Engine - TokuDB
Affects Version/s: 10.1.8
Fix Version/s: 10.1.9

Type: Bug Priority: Major
Reporter: Richard Dunn Assignee: Sergei Golubchik
Resolution: Fixed Votes: 0
Labels: None
Environment:

Apple OS X 10.11


Sprint: 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?



 Comments   
Comment by Richard Dunn [ 2015-10-18 ]

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

Comment by Richard Dunn [ 2015-10-18 ]

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.

Comment by Elena Stepanova [ 2015-10-20 ]

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?

Generated at Thu Feb 08 07:31:06 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.