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

Cannot compile Python adapters against MariaDB 10.2.6 - mysqlclient-python or MySQL-python

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None
    • Linux, Debian Jessie, Official Docker Image mariadb:10.2.6

    Description

      When trying to pip install the Python adapters, I am getting compile errors. The following is the error installing MySQL-python:

      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
          In file included from _mysql.c:46:0:
          /usr/include/mysql/mysql.h:438:3: warning: function declaration isn't a prototype [-Wstrict-prototypes]
             MYSQL_CLIENT_PLUGIN_HEADER
             ^
          /usr/include/mysql/mysql.h:583:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
           my_bool STDCALL mysql_embedded();
           ^
          _mysql.c: In function '_mysql_server_init':
          _mysql.c:351:3: warning: label 'finish' defined but not used [-Wunused-label]
             finish:
             ^
          _mysql.c:268:53: warning: unused variable 'item' [-Wunused-variable]
            PyObject *cmd_args=NULL, *groups=NULL, *ret=NULL, *item;
                                                               ^
          _mysql.c:267:21: warning: unused variable 'groupc' [-Wunused-variable]
            int cmd_argc=0, i, groupc;
                               ^
          _mysql.c:267:18: warning: unused variable 'i' [-Wunused-variable]
            int cmd_argc=0, i, groupc;
                            ^
          _mysql.c:267:6: warning: unused variable 'cmd_argc' [-Wunused-variable]
            int cmd_argc=0, i, groupc;
                ^
          _mysql.c:266:44: warning: unused variable 's' [-Wunused-variable]
            char **cmd_args_c=NULL, **groups_c=NULL, *s;
                                                      ^
          _mysql.c: In function '_mysql_ConnectionObject_field_count':
          _mysql.c:1943:47: warning: passing argument 1 of 'mysql_num_fields' from incompatible pointer type
            return PyInt_FromLong((long)mysql_num_fields(&(self->connection)));
                                                         ^
          In file included from _mysql.c:46:0:
          /usr/include/mysql/mysql.h:470:22: note: expected 'struct MYSQL_RES *' but argument is of type 'struct MYSQL *'
           unsigned int STDCALL mysql_num_fields(MYSQL_RES *res);
                                ^
          _mysql.c: In function '_mysql_ConnectionObject_ping':
          _mysql.c:2005:41: error: 'MYSQL' has no member named 'reconnect'
            if ( reconnect != -1 ) self->connection.reconnect = reconnect;
                                                   ^
          _mysql.c: In function '_mysql_ConnectionObject_shutdown':
          _mysql.c:2081:6: error: too few arguments to function 'mysql_shutdown'
            r = mysql_shutdown(&(self->connection)
                ^
          In file included from _mysql.c:46:0:
          /usr/include/mysql/mysql.h:518:14: note: declared here
           int  STDCALL mysql_shutdown(MYSQL *mysql, enum mysql_enum_shutdown_level shutdown_level);
                        ^
          error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
      
      

      When compiling mysqlclient-python I get the following error that is pretty similar:

      x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Dversion_info=(1,3,10,'final',0) -D__version__=1.3.10 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o
          In file included from _mysql.c:30:0:
          /usr/include/mysql/mysql.h:438:3: warning: function declaration isn't a prototype [-Wstrict-prototypes]
             MYSQL_CLIENT_PLUGIN_HEADER
             ^
          /usr/include/mysql/mysql.h:583:1: warning: function declaration isn't a prototype [-Wstrict-prototypes]
           my_bool STDCALL mysql_embedded();
           ^
          _mysql.c: In function '_mysql_ConnectionObject_ping':
          _mysql.c:1911:41: error: 'MYSQL' has no member named 'reconnect'
            if ( reconnect != -1 ) self->connection.reconnect = reconnect;
                                                   ^
          error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
      
      

      Attachments

        Activity

          People

            georg Georg Richter
            igremmer Isaac Gremmer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.