Uploaded image for project: 'MariaDB Connector/C'
  1. MariaDB Connector/C
  2. CONC-203

macro my_free(PTR) causes build errors for ODBC connector (in my_sys.h)

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Done
    • 2.3.1
    • 2.3.1
    • None
    • None
    • Fedora24

    Description

      Hello, I'm trying to pack and distribute odbc-connector to Fedora repos.

      In Fedora, we build, with mariadb-connector-c pkg also mariadb-connector-c-devel with some libraries, etc. in order to supply them to build this or another packages.

      In file /usr/include/mariadb/my_sys.h there is a macro, that brick build of ODBC connector.
      line ~ 129

      #define my_free(PTR,FG) my_no_flags_free(PTR)

      which does not make even sense (well, otherwise you should commented it).

      __________________________________
      Here is an example of build log form odbc connector (errors like this are all over the log):

      /home/ODBC/rpmbuild/SOURCES/mariadb-connector-odbc-2.0.12-ga-src/odbc_3_api.c: In function ‘SQLTablesW’:
      /home/ODBC/rpmbuild/SOURCES/mariadb-connector-odbc-2.0.12-ga-src/odbc_3_api.c:3180:22: error: macro "my_free" requires 2 arguments, but only 1 given
      MADB_FREE(CpCatalog);
      ^
      ___________________________________

      Suggested solution:

      in file file/usr/include/mariadb/my_sys.h on line 129 change
      #define my_free(PTR,FG) my_no_flags_free(PTR)

      to
      // #define my_free(PTR,FG) my_no_flags_free(PTR)
      #define my_free(PTR) my_no_flags_free(PTR)

      ___________________________________

      Now it works well.

      Note:
      Since it blocks compiling of ODBC connector, first this patch MUST appear in new stable version of C connector or be backported to version 2.3.1.
      Only after that connector C can be rebuld for Fedora, backported to older Fedora versions and only after that ODBC connector can be build for Fedora.

      Attachments

        Activity

          People

            georg Georg Richter
            Faramos Michal Schorm
            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.