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

Provide a CMake option to disable the OQGraph backend

Details

    Description

      OpenBSD has a diff like the following which I believe I copied from FreeBSD.

      Please provide a CMake option to disable the OQGraph backend to ensure reproducible builds of packages.

      Index: storage/oqgraph/CMakeLists.txt
      --- storage/oqgraph/CMakeLists.txt.orig
      +++ storage/oqgraph/CMakeLists.txt
      @@ -1,13 +1,12 @@
       set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
      +# Disable oqgraph storage engine
      +IF(TRUE)
      +  RETURN()
      +ENDIF()
       
       FUNCTION(CHECK_OQGRAPH)
       MESSAGE(STATUS "Configuring OQGraph")
       FIND_PACKAGE(Boost 1.40.0)
      -IF(NOT Boost_FOUND)
      -  MESSAGE(STATUS "Boost not found. OQGraph will not be compiled")
      -  SET(OQGRAPH_OK 0 CACHE INTERNAL "")
      -  RETURN()
      -ENDIF()
       INCLUDE_DIRECTORIES(BEFORE ${Boost_INCLUDE_DIRS})
       
       FIND_PACKAGE(Judy)
      

      Attachments

        Activity

          brad0 Brad Smith created issue -
          danblack Daniel Black added a comment -

          `-DPLUGIN_OQGRAPH=NO`

          danblack Daniel Black added a comment - `-DPLUGIN_OQGRAPH=NO`
          brad0 Brad Smith added a comment -

          If that is a valid option it doesn't do anything.

          – Configuring OQGraph
          – Found Boost: /usr/local/include (found suitable version "1.70.0", minimum required is "1.40.0")
          – Judy not found. OQGraph will not be compiled

          I use the option -DPLUGIN_COLUMNSTORE=NO and other -DWITHOUT_foo_STORAGE_ENGINE=1 options as well.

          brad0 Brad Smith added a comment - If that is a valid option it doesn't do anything. – Configuring OQGraph – Found Boost: /usr/local/include (found suitable version "1.70.0", minimum required is "1.40.0") – Judy not found. OQGraph will not be compiled I use the option -DPLUGIN_COLUMNSTORE=NO and other -DWITHOUT_foo_STORAGE_ENGINE=1 options as well.

          Since MariaDB 10.1 any plugin can be disabled with -DPLUGIN_xxx=NO

          The plugin will not be built, but it does not mean compilation-time checks will be skipped.
          It seems that in the OQGraph case it will always perform its checks in cmake and then will or will not build the plugin as instructed.

          serg Sergei Golubchik added a comment - Since MariaDB 10.1 any plugin can be disabled with -DPLUGIN_xxx=NO The plugin will not be built, but it does not mean compilation-time checks will be skipped. It seems that in the OQGraph case it will always perform its checks in cmake and then will or will not build the plugin as instructed.
          brad0 Brad Smith added a comment -

          Ya, still probing for dependencies even if the plugin is still not being built is confusing to packagers and users. That goes against what people would expect.

          brad0 Brad Smith added a comment - Ya, still probing for dependencies even if the plugin is still not being built is confusing to packagers and users. That goes against what people would expect.
          danblack Daniel Black added a comment -

          Agree, So I think I can do something simple before next general release

          danblack Daniel Black added a comment - Agree, So I think I can do something simple before next general release
          danblack Daniel Black made changes -
          Field Original Value New Value
          Assignee Daniel Black [ danblack ]

          Seems that this commit 2400e06946bb

          commit 2400e06946bb5856684fd27ee86f610267bf4dc3
          Author: Sergei Golubchik <serg@mariadb.org>
          Date:   Thu May 9 19:12:34 2019 +0200
           
              remove -fno-rtti
          

          removed previous check of the flag.

          anel Anel Husakovic added a comment - Seems that this commit 2400e06946bb commit 2400e06946bb5856684fd27ee86f610267bf4dc3 Author: Sergei Golubchik <serg@mariadb.org> Date: Thu May 9 19:12:34 2019 +0200   remove -fno-rtti removed previous check of the flag.
          danblack Daniel Black added a comment - Testing: https://buildbot.mariadb.org/#/grid?branch=bb-10.2-danielblack-MDEV-24161-shortcut-oqgraph-tests-if-disabled
          brad0 Brad Smith added a comment -

          That seems to do what would be expected. With the diff from the build log from pre-patched to patched..

          @@ -1046,9 +1059,6 @@ getconf: LEVEL1_DCACHE_LINESIZE: unknown variable
           -- Searching 16 bit integer
           -- Searching 16 bit integer - Using unsigned short
           -- Check if the system is big endian - little endian
          --- Configuring OQGraph
          --- Found Boost: /usr/local/include (found suitable version "1.70.0", minimum required is "1.40.0")
          --- Judy not found. OQGraph will not be compiled
           -- Performing Test HAVE_PTHREAD_THREADID_NP
           -- Performing Test HAVE_PTHREAD_THREADID_NP - Failed
           -- Performing Test HAVE_SYS_GETTID
          

          brad0 Brad Smith added a comment - That seems to do what would be expected. With the diff from the build log from pre-patched to patched.. @@ - 1046 , 9 + 1059 , 6 @@ getconf: LEVEL1_DCACHE_LINESIZE: unknown variable -- Searching 16 bit integer -- Searching 16 bit integer - Using unsigned short -- Check if the system is big endian - little endian --- Configuring OQGraph --- Found Boost: /usr/local/include (found suitable version "1.70.0" , minimum required is "1.40.0" ) --- Judy not found. OQGraph will not be compiled -- Performing Test HAVE_PTHREAD_THREADID_NP -- Performing Test HAVE_PTHREAD_THREADID_NP - Failed -- Performing Test HAVE_SYS_GETTID
          danblack Daniel Black added a comment -

          Thanks Brad, fix will be in next version.

          danblack Daniel Black added a comment - Thanks Brad, fix will be in next version.
          danblack Daniel Black made changes -
          Fix Version/s 10.2.37 [ 25112 ]
          Fix Version/s 10.3.28 [ 25111 ]
          Fix Version/s 10.4.18 [ 25110 ]
          Fix Version/s 10.5.9 [ 25109 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 115543 ] MariaDB v4 [ 158560 ]

          People

            danblack Daniel Black
            brad0 Brad Smith
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.