Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-265

Does not compile without patched CMakeList.txt

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Not a Bug
    • 3.1.3
    • N/A
    • General
    • Alpine Linux

    Description

      Does not compile without patching CMakeList.txt to include /usr/include/mysql

      Patch here:

      --- mariadb-connector-odbc-3.1.3-ga-src/CMakeLists.txt
      +++ mariadb-connector-odbc-3.1.3-ga-src-patched/CMakeLists.txt
      @@ -144,6 +144,7 @@
       
       INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/libmariadb/include)
       INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR}/libmariadb/include)
      +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} /usr/include/mysql)
       
       IF(WIN32)
         INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR} ${CMAKE_SOURCE_DIR}/dsn)
      

      Build error when not using patch:

      In file included from /home/joe/aports/testing/mariadb-connector-odbc/src/mariadb-connector-odbc-3.1.4/odbc_3_api.c:21:                                                                                                                                                          
      /home/joe/aports/testing/mariadb-connector-odbc/src/mariadb-connector-odbc-3.1.4/ma_odbc.h:32:10: fatal error: mysql.h: No such file or directory                                                                                                                                
       #include <mysql.h>                                                                                                                                                                                                                                                              
                ^~~~~~~~~                                                                                                                                                                                                                                                              
      compilation terminated.                                                                                                                                                                                                                                                          
      make[2]: *** [CMakeFiles/maodbc.dir/build.make:63: CMakeFiles/maodbc.dir/odbc_3_api.c.o] Error 1                                                                                                                                                                                 
      make[2]: *** Waiting for unfinished jobs....                                                                                                                                                                                                                                     
      In file included from /home/joe/aports/testing/mariadb-connector-odbc/src/mariadb-connector-odbc-3.1.4/ma_error.c:19:                                                                                                                                                            
      /home/joe/aports/testing/mariadb-connector-odbc/src/mariadb-connector-odbc-3.1.4/ma_odbc.h:32:10: fatal error: mysql.h: No such file or directory                                                                                                                                
       #include <mysql.h>                                                                                                                                                                                                                                                              
                ^~~~~~~~~                                                                                                                                                                                                                                                              
      compilation terminated.     
      

      Attachments

        Activity

          People

            Lawrin Lawrin Novitsky
            jjsearle Joe Searle
            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.