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

cmake fails to detect boost libraries

Details

    • 10.0.20

    Description

      When building MariaDB 10.0.19 (as well as 10.0.17, 10.0.18 and possibly earlier) cmake fails to pick up the installed boost libraries.

      # cmake . -LAH
      -- Running cmake version 3.1.3
      -- MariaDB 10.0.19
      -- Packaging as: mariadb-10.0.19-FreeBSD10.1-x86_64
      getconf: no such configuration parameter `LEVEL1_DCACHE_LINESIZE'
      -- suffixes <.so;.a>
      -- OPENSSL_INCLUDE_DIR = /usr/local/include
      -- OPENSSL_LIBRARIES = /usr/local/lib/libssl.so
      -- CRYPTO_LIBRARY = /usr/local/lib/libcrypto.so
      -- OPENSSL_MAJOR_VERSION = 1
      -- SSL_LIBRARIES = /usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so
      -- Configuring OQGraph
      -- Boost version: 1.55.0
      -- Requisites for OQGraph not met. OQGraph will not be compiled

      When I add LDFLAGS and CXXFLAGS cmake starts detecting Boost OK and reports Requisites for OQGraph are OK but then fails to compile storage/perfschema/pfs.cc

      /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:5285:3: error: cannot initialize
             a member subobject of type 'digest_add_token_v1_t' (aka 'struct PSI_digest_locker *(*)(struct PSI_digest_locker
             *, uint, struct OPAQUE_LEX_YYSTYPE *)') with an lvalue of type 'void (PSI_digest_locker *, const
             sql_digest_storage *)': different number of parameters (3 vs 2)
         pfs_digest_end_v1,

      Attachments

        Activity

          spil Bernard Spil added a comment - - edited

          At least I've fixed the Boost detection problem... Thanks to ngladitz on #cmake@Freenode

          --- storage/oqgraph/CMakeLists.txt.orig	2015-05-08 14:37:46 UTC
          +++ storage/oqgraph/CMakeLists.txt
          @@ -24,6 +24,8 @@ IF(MSVC)
           #  ENDIF()
           ELSE()
           # See if that works. On old gcc it'll fail because of -fno-rtti
          +SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
          +SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${Boost_INCLUDES_DIRS}")
           CHECK_CXX_SOURCE_COMPILES(
           "
           #define BOOST_NO_RTTI 1
          @@ -32,6 +34,7 @@ CHECK_CXX_SOURCE_COMPILES(
           #include <boost/property_map/property_map.hpp>
           int main() { return 0; }
           " BOOST_OK)
          +SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
           ENDIF()
           
           IF(BOOST_OK)

          Now back to failing with

          [ 21%] Building CXX object storage/perfschema/CMakeFiles/perfschema.dir/pfs.cc.o
          /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:4511:10: error: no member named 'm_digest' in
                'PSI_statement_locker_state_v1'
            state->m_digest= NULL;
            ~~~~~  ^
          /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:4799:30: error: no member named 'm_digest' in
                'PSI_statement_locker_state_v1'
                digest_storage= state->m_digest;
                                ~~~~~  ^
          /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:4875:32: error: no member named 'm_digest' in
                'PSI_statement_locker_state_v1'
                  digest_storage= state->m_digest;
                                  ~~~~~  ^
          /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:5145:22: error: no member named 'm_digest' in
                'PSI_statement_locker_state_v1'
              statement_state->m_digest= digest;
              ~~~~~~~~~~~~~~~  ^
          /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:5285:3: error: cannot initialize a member
                subobject of type 'digest_add_token_v1_t' (aka 'struct PSI_digest_locker *(*)(struct PSI_digest_locker *, uint, struct
                OPAQUE_LEX_YYSTYPE *)') with an lvalue of type 'void (PSI_digest_locker *, const sql_digest_storage *)': different number of
                parameters (3 vs 2)
            pfs_digest_end_v1,
            ^~~~~~~~~~~~~~~~~
          5 errors generated.
          storage/perfschema/CMakeFiles/perfschema.dir/build.make:169: recipe for target 'storage/perfschema/CMakeFiles/perfschema.dir/pfs.cc.o
          ' failed

          spil Bernard Spil added a comment - - edited At least I've fixed the Boost detection problem... Thanks to ngladitz on #cmake@Freenode --- storage/oqgraph/CMakeLists.txt.orig 2015-05-08 14:37:46 UTC +++ storage/oqgraph/CMakeLists.txt @@ -24,6 +24,8 @@ IF(MSVC) # ENDIF() ELSE() # See if that works. On old gcc it'll fail because of -fno-rtti +SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES}) +SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${Boost_INCLUDES_DIRS}") CHECK_CXX_SOURCE_COMPILES( " #define BOOST_NO_RTTI 1 @@ -32,6 +34,7 @@ CHECK_CXX_SOURCE_COMPILES( #include <boost/property_map/property_map.hpp> int main() { return 0; } " BOOST_OK) +SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE}) ENDIF() IF(BOOST_OK) Now back to failing with [ 21%] Building CXX object storage/perfschema/CMakeFiles/perfschema.dir/pfs.cc.o /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:4511:10: error: no member named 'm_digest' in 'PSI_statement_locker_state_v1' state->m_digest= NULL; ~~~~~ ^ /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:4799:30: error: no member named 'm_digest' in 'PSI_statement_locker_state_v1' digest_storage= state->m_digest; ~~~~~ ^ /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:4875:32: error: no member named 'm_digest' in 'PSI_statement_locker_state_v1' digest_storage= state->m_digest; ~~~~~ ^ /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:5145:22: error: no member named 'm_digest' in 'PSI_statement_locker_state_v1' statement_state->m_digest= digest; ~~~~~~~~~~~~~~~ ^ /usr/ports/databases/mariadb100-server/work/mariadb-10.0.19/storage/perfschema/pfs.cc:5285:3: error: cannot initialize a member subobject of type 'digest_add_token_v1_t' (aka 'struct PSI_digest_locker *(*)(struct PSI_digest_locker *, uint, struct OPAQUE_LEX_YYSTYPE *)') with an lvalue of type 'void (PSI_digest_locker *, const sql_digest_storage *)': different number of parameters (3 vs 2) pfs_digest_end_v1, ^~~~~~~~~~~~~~~~~ 5 errors generated. storage/perfschema/CMakeFiles/perfschema.dir/build.make:169: recipe for target 'storage/perfschema/CMakeFiles/perfschema.dir/pfs.cc.o ' failed

          I'll fix boost detection, but oqgraph still won't compile with clang.

          serg Sergei Golubchik added a comment - I'll fix boost detection, but oqgraph still won't compile with clang.

          People

            serg Sergei Golubchik
            spil Bernard Spil
            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.