Uploaded image for project: 'MariaDB ColumnStore'
  1. MariaDB ColumnStore
  2. MCOL-3982

MCS requires autotools to build

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 1.4.3, 1.5.3
    • 1.4.5, 1.5.2
    • Build
    • None
    • 2020-7

    Description

      MCS uses libmarias3, which, for some reason, uses autotools. Neither MCS itself, MariaDB Server, nor Connector/C need autotools. Furthermore, MariaDB Server builds Aria/S3 engine, which uses libmarias3 without autotools. MCS should do the same, the following patch implements it:

      diff --git a/CMakeLists.txt b/CMakeLists.txt
      --- a/CMakeLists.txt
      +++ b/CMakeLists.txt
      @@ -311,11 +311,6 @@ SET (ENGINE_COMMON_INCLUDES  ${ENGINE_DEFAULT_INCLUDES} ${Boost_INCLUDE_DIR} ${L
       
       ADD_SUBDIRECTORY(utils)
       
      -add_library(marias3 SHARED IMPORTED)
      -set_target_properties(marias3 PROPERTIES IMPORTED_LOCATION ${CMAKE_BINARY_DIR}/lib/libmarias3.so.3.1.2)
      -add_dependencies(marias3 ms3)
      -
      -
       ADD_SUBDIRECTORY(oam/oamcpp)
       ADD_SUBDIRECTORY(dbcon/execplan)
       ADD_SUBDIRECTORY(dbcon/joblist)
      diff --git a/storage-manager/CMakeLists.txt b/storage-manager/CMakeLists.txt
      --- a/storage-manager/CMakeLists.txt
      +++ b/storage-manager/CMakeLists.txt
      @@ -1,7 +1,7 @@
       cmake_minimum_required(VERSION 2.8.12)
       project(storagemanager)
       
      -include_directories(include ${CMAKE_BINARY_DIR}/include ${ENGINE_UTILS_COMMON_INCLUDE})
      +include_directories(include ${CMAKE_BINARY_DIR}/include ${ENGINE_UTILS_COMMON_INCLUDE} ${S3API_DIR})
       
       set(storagemanager_SRCS 
           src/AppendTask.cpp
      diff --git a/utils/libmarias3/CMakeLists.txt b/utils/libmarias3/CMakeLists.txt
      --- a/utils/libmarias3/CMakeLists.txt
      +++ b/utils/libmarias3/CMakeLists.txt
      @@ -16,22 +16,19 @@ if(GIT_FOUND AND EXISTS ${ENGINE_SRC_DIR}/.git)
           endif()
       endif()
       
      -include(ExternalProject)
      -ExternalProject_Add(ms3
      -    SOURCE_DIR ${S3API_DIR}
      -    CONFIGURE_COMMAND autoreconf -fi ${S3API_DIR} && ${S3API_DIR}/configure --enable-shared --disable-static --prefix=${CMAKE_BINARY_DIR} ${S3_CONFIGURE_OPT}
      -    BUILD_COMMAND make
      -    BUILD_IN_SOURCE 0
      -    EXCLUDE_FROM_ALL TRUE
      -    BUILD_BYPRODUCTS ${CMAKE_BINARY_DIR}/lib/libmarias3.so.3.1.2
      -)
      +SET(S3_SOURCES ${S3API_DIR}/src/debug.c ${S3API_DIR}/src/error.c
      +  ${S3API_DIR}/src/marias3.c ${S3API_DIR}/src/request.c ${S3API_DIR}/src/response.c
      +  ${S3API_DIR}/src/sha256.c ${S3API_DIR}/src/sha256-internal.c)
      +
      +ADD_LIBRARY(marias3 SHARED ${S3_SOURCES})
      +FIND_PACKAGE(LibXml2 REQUIRED)
      +FIND_PACKAGE(CURL REQUIRED)
      +TARGET_LINK_LIBRARIES(marias3 curl xml2)
      +INCLUDE_DIRECTORIES(${S3API_DIR} ${LIBXML2_INCLUDE_DIR})
       
      -set(S3API_DEPS marias3 curl xml2 CACHE INTERNAL "S3API_DEPS")
      +set(S3API_DEPS marias3 CACHE INTERNAL "S3API_DEPS")
       
      -install(PROGRAMS
      -    ${CMAKE_BINARY_DIR}/lib/libmarias3.so.3.1.2
      -    ${CMAKE_BINARY_DIR}/lib/libmarias3.so.3
      -    ${CMAKE_BINARY_DIR}/lib/libmarias3.so
      +install(TARGETS marias3
           DESTINATION ${ENGINE_LIBDIR}
           COMPONENT columnstore-platform
       )
      

      Note, while I did test that it builds, I did not run MCS nor I tested packaging or installation.

      Attachments

        Issue Links

          Activity

            People

              pleblanc Patrick LeBlanc (Inactive)
              serg Sergei Golubchik
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.